Commit 4dc68897 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[objects] Remove unused {Code::trap_handler_index} field.

R=titzer@chromium.org
BUG=v8:7549

Change-Id: Ie77a22f0a6204d673d130be45ca20d5986cddd88
Reviewed-on: https://chromium-review.googlesource.com/962423
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51928}
parent 662cfb44
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "src/snapshot/serializer-common.h" #include "src/snapshot/serializer-common.h"
#include "src/snapshot/snapshot.h" #include "src/snapshot/snapshot.h"
#include "src/tracing/trace-event.h" #include "src/tracing/trace-event.h"
#include "src/trap-handler/trap-handler.h"
#include "src/unicode-decoder.h" #include "src/unicode-decoder.h"
#include "src/unicode-inl.h" #include "src/unicode-inl.h"
#include "src/utils-inl.h" #include "src/utils-inl.h"
...@@ -3288,7 +3287,6 @@ AllocationResult Heap::AllocateCode( ...@@ -3288,7 +3287,6 @@ AllocationResult Heap::AllocateCode(
code->set_source_position_table(source_position_table); code->set_source_position_table(source_position_table);
code->set_constant_pool_offset(desc.instr_size - desc.constant_pool_size); code->set_constant_pool_offset(desc.instr_size - desc.constant_pool_size);
code->set_builtin_index(builtin_index); code->set_builtin_index(builtin_index);
code->set_trap_handler_index(Smi::FromInt(-1));
switch (code->kind()) { switch (code->kind()) {
case Code::OPTIMIZED_FUNCTION: case Code::OPTIMIZED_FUNCTION:
...@@ -3344,11 +3342,6 @@ AllocationResult Heap::CopyCode(Code* code, CodeDataContainer* data_container) { ...@@ -3344,11 +3342,6 @@ AllocationResult Heap::CopyCode(Code* code, CodeDataContainer* data_container) {
// Set the {CodeDataContainer}, it cannot be shared. // Set the {CodeDataContainer}, it cannot be shared.
new_code->set_code_data_container(data_container); new_code->set_code_data_container(data_container);
// Clear the trap handler index since they can't be shared between code. We
// have to do this before calling Relocate because relocate would adjust the
// base pointer for the old code.
new_code->set_trap_handler_index(Smi::FromInt(trap_handler::kInvalidIndex));
// Relocate the copy. // Relocate the copy.
new_code->Relocate(new_addr - old_addr); new_code->Relocate(new_addr - old_addr);
// We have to iterate over the object and process its pointers when black // We have to iterate over the object and process its pointers when black
......
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
#include "src/string-builder.h" #include "src/string-builder.h"
#include "src/string-search.h" #include "src/string-search.h"
#include "src/string-stream.h" #include "src/string-stream.h"
#include "src/trap-handler/trap-handler.h"
#include "src/unicode-cache-inl.h" #include "src/unicode-cache-inl.h"
#include "src/unicode-decoder.h" #include "src/unicode-decoder.h"
#include "src/utils-inl.h" #include "src/utils-inl.h"
...@@ -13901,12 +13900,6 @@ void Code::InvalidateEmbeddedObjects() { ...@@ -13901,12 +13900,6 @@ void Code::InvalidateEmbeddedObjects() {
void Code::Relocate(intptr_t delta) { void Code::Relocate(intptr_t delta) {
if (trap_handler::IsTrapHandlerEnabled() && is_wasm_code()) {
const int index = trap_handler_index()->value();
if (index >= 0) {
trap_handler::UpdateHandlerDataCodePointer(index, instruction_start());
}
}
for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) {
it.rinfo()->apply(delta); it.rinfo()->apply(delta);
} }
......
...@@ -183,7 +183,6 @@ CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset) ...@@ -183,7 +183,6 @@ CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset)
CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset) CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset)
CODE_ACCESSORS(source_position_table, Object, kSourcePositionTableOffset) CODE_ACCESSORS(source_position_table, Object, kSourcePositionTableOffset)
CODE_ACCESSORS(code_data_container, CodeDataContainer, kCodeDataContainerOffset) CODE_ACCESSORS(code_data_container, CodeDataContainer, kCodeDataContainerOffset)
CODE_ACCESSORS(trap_handler_index, Smi, kTrapHandlerIndex)
#undef CODE_ACCESSORS #undef CODE_ACCESSORS
void Code::WipeOutHeader() { void Code::WipeOutHeader() {
......
...@@ -83,10 +83,6 @@ class Code : public HeapObject { ...@@ -83,10 +83,6 @@ class Code : public HeapObject {
// [code_data_container]: A container indirection for all mutable fields. // [code_data_container]: A container indirection for all mutable fields.
DECL_ACCESSORS(code_data_container, CodeDataContainer) DECL_ACCESSORS(code_data_container, CodeDataContainer)
// [trap_handler_index]: An index into the trap handler's master list of code
// objects.
DECL_ACCESSORS(trap_handler_index, Smi)
// [stub_key]: The major/minor key of a code stub. // [stub_key]: The major/minor key of a code stub.
inline uint32_t stub_key() const; inline uint32_t stub_key() const;
inline void set_stub_key(uint32_t key); inline void set_stub_key(uint32_t key);
...@@ -388,8 +384,7 @@ class Code : public HeapObject { ...@@ -388,8 +384,7 @@ class Code : public HeapObject {
static const int kConstantPoolOffset = kStubKeyOffset + kIntSize; static const int kConstantPoolOffset = kStubKeyOffset + kIntSize;
static const int kBuiltinIndexOffset = static const int kBuiltinIndexOffset =
kConstantPoolOffset + kConstantPoolSize; kConstantPoolOffset + kConstantPoolSize;
static const int kTrapHandlerIndex = kBuiltinIndexOffset + kIntSize; static const int kHeaderPaddingStart = kBuiltinIndexOffset + kIntSize;
static const int kHeaderPaddingStart = kTrapHandlerIndex + kPointerSize;
// Add padding to align the instruction start following right after // Add padding to align the instruction start following right after
// the Code object header. // the Code object header.
...@@ -401,8 +396,6 @@ class Code : public HeapObject { ...@@ -401,8 +396,6 @@ class Code : public HeapObject {
// Objects embedded into code is visited via reloc info. // Objects embedded into code is visited via reloc info.
static const int kDataStart = kInstructionSizeOffset; static const int kDataStart = kInstructionSizeOffset;
enum TrapFields { kTrapCodeOffset, kTrapLandingOffset, kTrapDataSize };
inline int GetUnwindingInfoSizeOffset() const; inline int GetUnwindingInfoSizeOffset() const;
class BodyDescriptor; class BodyDescriptor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment