Commit 4214aa7d authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[objects] Remove obsolete Code::prologue_offset field.

R=mvstanton@chromium.org
BUG=v8:6409

Change-Id: I9252055a395287381d2646fedc59c8c376333694
Reviewed-on: https://chromium-review.googlesource.com/652469Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47927}
parent dca02f0c
......@@ -120,8 +120,8 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(TurboAssembler* tasm,
tasm->GetCode(isolate, &desc);
if (eh_frame_writer) eh_frame_writer->GetEhFrame(&desc);
Handle<Code> code = isolate->factory()->NewCode(
desc, flags, self_reference, false, info->prologue_offset());
Handle<Code> code =
isolate->factory()->NewCode(desc, flags, self_reference, false);
isolate->counters()->total_compiled_code_size()->Increment(
code->instruction_size());
return code;
......
......@@ -77,7 +77,6 @@ CompilationInfo::CompilationInfo(Handle<Script> script,
deferred_handles_(nullptr),
dependencies_(isolate, zone),
bailout_reason_(kNoReason),
prologue_offset_(Code::kPrologueOffsetNotSet),
parameter_count_(0),
optimization_id_(-1),
osr_expr_stack_height_(-1),
......
......@@ -202,16 +202,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
BailoutReason bailout_reason() const { return bailout_reason_; }
int prologue_offset() const {
DCHECK_NE(Code::kPrologueOffsetNotSet, prologue_offset_);
return prologue_offset_;
}
void set_prologue_offset(int prologue_offset) {
DCHECK_EQ(Code::kPrologueOffsetNotSet, prologue_offset_);
prologue_offset_ = prologue_offset;
}
CompilationDependencies* dependencies() { return &dependencies_; }
int optimization_id() const {
......@@ -331,8 +321,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
BailoutReason bailout_reason_;
int prologue_offset_;
InlinedFunctionList inlined_functions_;
// Number of parameters used for compilation of stubs that require arguments.
......
......@@ -142,9 +142,6 @@ void CodeGenerator::AssembleCode() {
BailoutIfDeoptimized();
}
// Architecture-specific, linkage-specific prologue.
info->set_prologue_offset(tasm()->pc_offset());
// Define deoptimization literals for all inlined functions.
DCHECK_EQ(0u, deoptimization_literals_.size());
for (CompilationInfo::InlinedFunctionHolder& inlined :
......
......@@ -1735,8 +1735,7 @@ Handle<Code> Factory::NewCodeRaw(int object_size, bool immovable) {
}
Handle<Code> Factory::NewCode(const CodeDesc& desc, Code::Flags flags,
Handle<Object> self_ref, bool immovable,
int prologue_offset) {
Handle<Object> self_ref, bool immovable) {
Handle<ByteArray> reloc_info = NewByteArray(desc.reloc_size, TENURED);
bool has_unwinding_info = desc.unwinding_info != nullptr;
......@@ -1773,7 +1772,6 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc, Code::Flags flags,
code->set_next_code_link(*undefined_value(), SKIP_WRITE_BARRIER);
code->set_handler_table(*empty_fixed_array(), SKIP_WRITE_BARRIER);
code->set_source_position_table(*empty_byte_array(), SKIP_WRITE_BARRIER);
code->set_prologue_offset(prologue_offset);
code->set_constant_pool_offset(desc.instr_size - desc.constant_pool_size);
code->set_builtin_index(-1);
code->set_trap_handler_index(Smi::FromInt(-1));
......
......@@ -657,8 +657,7 @@ class V8_EXPORT_PRIVATE Factory final {
// This allows generated code to reference its own Code object
// by containing this handle.
Handle<Code> NewCode(const CodeDesc& desc, Code::Flags flags,
Handle<Object> self_reference, bool immovable = false,
int prologue_offset = Code::kPrologueOffsetNotSet);
Handle<Object> self_reference, bool immovable = false);
Handle<Code> CopyCode(Handle<Code> code);
......
......@@ -4846,7 +4846,6 @@ SMI_ACCESSORS(JSMessageObject, end_position, kEndPositionOffset)
SMI_ACCESSORS(JSMessageObject, error_level, kErrorLevelOffset)
INT_ACCESSORS(Code, instruction_size, kInstructionSizeOffset)
INT_ACCESSORS(Code, prologue_offset, kPrologueOffset)
INT_ACCESSORS(Code, constant_pool_offset, kConstantPoolOffset)
#define CODE_ACCESSORS(name, type, offset) \
ACCESSORS_CHECKED2(Code, name, type, offset, true, \
......
......@@ -3683,8 +3683,6 @@ class Code: public HeapObject {
static const char* Kind2String(Kind kind);
static const int kPrologueOffsetNotSet = -1;
#if defined(OBJECT_PRINT) || defined(ENABLE_DISASSEMBLER)
// Printing
static const char* ICState2String(InlineCacheState state);
......@@ -3736,11 +3734,6 @@ class Code: public HeapObject {
// Note that storage for this field is overlapped with typefeedback_info.
DECL_ACCESSORS(next_code_link, Object)
// [prologue_offset]: Offset of the function prologue, used for aging
// FUNCTIONs and OPTIMIZED_FUNCTIONs.
inline int prologue_offset() const;
inline void set_prologue_offset(int offset);
// [constant_pool offset]: Offset of the constant pool.
// Valid for FLAG_enable_embedded_constant_pool only
inline int constant_pool_offset() const;
......@@ -4013,9 +4006,7 @@ class Code: public HeapObject {
static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize;
static const int kKindSpecificFlags2Offset =
kKindSpecificFlags1Offset + kIntSize;
// Note: We might be able to squeeze this into the flags above.
static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize;
static const int kConstantPoolOffset = kPrologueOffset + kIntSize;
static const int kConstantPoolOffset = kKindSpecificFlags2Offset + kIntSize;
static const int kBuiltinIndexOffset =
kConstantPoolOffset + kConstantPoolSize;
static const int kTrapHandlerIndex = kBuiltinIndexOffset + kIntSize;
......
......@@ -29,7 +29,6 @@ class CodeGeneratorTester : public InitializedHandleScope {
frame_(descriptor_->CalculateFixedFrameSize()),
generator_(&zone_, &frame_, &linkage_, &sequence_, &info_,
base::Optional<OsrHelper>(), kNoSourcePosition, nullptr) {
info_.set_prologue_offset(generator_.tasm()->pc_offset());
}
enum PushTypeFlag {
......
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