Commit 24bf7ef5 authored by sampsong's avatar sampsong Committed by Commit Bot

PPC/s390: Remove TypeFeedbackId parameters from assembler and full-code.

Port a42473ab

Original Commit Message:

    These are no longer being used.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:6408
LOG=N

Review-Url: https://codereview.chromium.org/2949103005
Cr-Commit-Position: refs/heads/master@{#46192}
parent d00d52be
...@@ -233,7 +233,6 @@ MemOperand::MemOperand(Register ra, Register rb) { ...@@ -233,7 +233,6 @@ MemOperand::MemOperand(Register ra, Register rb) {
Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size)
: AssemblerBase(isolate_data, buffer, buffer_size), : AssemblerBase(isolate_data, buffer, buffer_size),
recorded_ast_id_(TypeFeedbackId::None()),
constant_pool_builder_(kLoadPtrMaxReachBits, kLoadDoubleMaxReachBits) { constant_pool_builder_(kLoadPtrMaxReachBits, kLoadDoubleMaxReachBits) {
reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_);
...@@ -246,7 +245,6 @@ Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) ...@@ -246,7 +245,6 @@ Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size)
optimizable_cmpi_pos_ = -1; optimizable_cmpi_pos_ = -1;
trampoline_emitted_ = FLAG_force_long_branches; trampoline_emitted_ = FLAG_force_long_branches;
tracked_branch_count_ = 0; tracked_branch_count_ = 0;
ClearRecordedAstId();
relocations_.reserve(128); relocations_.reserve(128);
} }
...@@ -2056,10 +2054,6 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { ...@@ -2056,10 +2054,6 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
!emit_debug_code())) { !emit_debug_code())) {
return; return;
} }
if (rmode == RelocInfo::CODE_TARGET_WITH_ID) {
data = RecordedAstId().ToInt();
ClearRecordedAstId();
}
DeferredRelocInfo rinfo(pc_offset(), rmode, data); DeferredRelocInfo rinfo(pc_offset(), rmode, data);
relocations_.push_back(rinfo); relocations_.push_back(rinfo);
} }
......
...@@ -1267,22 +1267,6 @@ class Assembler : public AssemblerBase { ...@@ -1267,22 +1267,6 @@ class Assembler : public AssemblerBase {
// Mark address of a debug break slot. // Mark address of a debug break slot.
void RecordDebugBreakSlot(RelocInfo::Mode mode); void RecordDebugBreakSlot(RelocInfo::Mode mode);
// Record the AST id of the CallIC being compiled, so that it can be placed
// in the relocation information.
void SetRecordedAstId(TypeFeedbackId ast_id) {
// Causes compiler to fail
// DCHECK(recorded_ast_id_.IsNone());
recorded_ast_id_ = ast_id;
}
TypeFeedbackId RecordedAstId() {
// Causes compiler to fail
// DCHECK(!recorded_ast_id_.IsNone());
return recorded_ast_id_;
}
void ClearRecordedAstId() { recorded_ast_id_ = TypeFeedbackId::None(); }
// Record a comment relocation entry that can be used by a disassembler. // Record a comment relocation entry that can be used by a disassembler.
// Use --code-comments to enable. // Use --code-comments to enable.
void RecordComment(const char* msg); void RecordComment(const char* msg);
...@@ -1376,11 +1360,6 @@ class Assembler : public AssemblerBase { ...@@ -1376,11 +1360,6 @@ class Assembler : public AssemblerBase {
void EmitRelocations(); void EmitRelocations();
protected: protected:
// Relocation for a type-recording IC has the AST id added to it. This
// member variable is a way to pass the information from the call site to
// the relocation info.
TypeFeedbackId recorded_ast_id_;
int buffer_space() const { return reloc_info_writer.pos() - pc_; } int buffer_space() const { return reloc_info_writer.pos() - pc_; }
// Decode instruction(s) at pos and return backchain to previous // Decode instruction(s) at pos and return backchain to previous
......
...@@ -140,29 +140,25 @@ void MacroAssembler::Call(Address target, RelocInfo::Mode rmode, ...@@ -140,29 +140,25 @@ void MacroAssembler::Call(Address target, RelocInfo::Mode rmode,
int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode, int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) { Condition cond) {
AllowDeferredHandleDereference using_raw_address; AllowDeferredHandleDereference using_raw_address;
return CallSize(reinterpret_cast<Address>(code.location()), rmode, cond); return CallSize(reinterpret_cast<Address>(code.location()), rmode, cond);
} }
void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) { Condition cond) {
BlockTrampolinePoolScope block_trampoline_pool(this); BlockTrampolinePoolScope block_trampoline_pool(this);
DCHECK(RelocInfo::IsCodeTarget(rmode)); DCHECK(RelocInfo::IsCodeTarget(rmode));
#ifdef DEBUG #ifdef DEBUG
// Check the expected size before generating code to ensure we assume the same // Check the expected size before generating code to ensure we assume the same
// constant pool availability (e.g., whether constant pool is full or not). // constant pool availability (e.g., whether constant pool is full or not).
int expected_size = CallSize(code, rmode, ast_id, cond); int expected_size = CallSize(code, rmode, cond);
Label start; Label start;
bind(&start); bind(&start);
#endif #endif
if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) {
SetRecordedAstId(ast_id);
rmode = RelocInfo::CODE_TARGET_WITH_ID;
}
AllowDeferredHandleDereference using_raw_address; AllowDeferredHandleDereference using_raw_address;
Call(reinterpret_cast<Address>(code.location()), rmode, cond); Call(reinterpret_cast<Address>(code.location()), rmode, cond);
DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start));
...@@ -2112,10 +2108,9 @@ void MacroAssembler::GetMapConstructor(Register result, Register map, ...@@ -2112,10 +2108,9 @@ void MacroAssembler::GetMapConstructor(Register result, Register map,
bind(&done); bind(&done);
} }
void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id, void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
Condition cond) {
DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id, cond); Call(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
} }
......
...@@ -133,10 +133,8 @@ class MacroAssembler : public Assembler { ...@@ -133,10 +133,8 @@ class MacroAssembler : public Assembler {
void Call(Address target, RelocInfo::Mode rmode, Condition cond = al); void Call(Address target, RelocInfo::Mode rmode, Condition cond = al);
int CallSize(Handle<Code> code, int CallSize(Handle<Code> code,
RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al); Condition cond = al);
void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al); Condition cond = al);
void Ret() { blr(); } void Ret() { blr(); }
void Ret(Condition cond, CRegister cr = cr7) { bclr(cond, cr); } void Ret(Condition cond, CRegister cr = cr7) { bclr(cond, cr); }
...@@ -917,7 +915,7 @@ class MacroAssembler : public Assembler { ...@@ -917,7 +915,7 @@ class MacroAssembler : public Assembler {
// Runtime calls // Runtime calls
// Call a code stub. // Call a code stub.
void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), void CallStub(CodeStub* stub,
Condition cond = al); Condition cond = al);
// Call a code stub. // Call a code stub.
......
...@@ -371,15 +371,10 @@ void Assembler::CheckBuffer() { ...@@ -371,15 +371,10 @@ void Assembler::CheckBuffer() {
} }
} }
int32_t Assembler::emit_code_target(Handle<Code> target, RelocInfo::Mode rmode, int32_t Assembler::emit_code_target(Handle<Code> target,
TypeFeedbackId ast_id) { RelocInfo::Mode rmode) {
DCHECK(RelocInfo::IsCodeTarget(rmode)); DCHECK(RelocInfo::IsCodeTarget(rmode));
if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) { RecordRelocInfo(rmode);
SetRecordedAstId(ast_id);
RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID);
} else {
RecordRelocInfo(rmode);
}
int current = code_targets_.length(); int current = code_targets_.length();
if (current > 0 && code_targets_.last().is_identical_to(target)) { if (current > 0 && code_targets_.last().is_identical_to(target)) {
......
...@@ -339,12 +339,10 @@ MemOperand::MemOperand(Register rx, Register rb, int32_t offset) { ...@@ -339,12 +339,10 @@ MemOperand::MemOperand(Register rx, Register rb, int32_t offset) {
Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size)
: AssemblerBase(isolate_data, buffer, buffer_size), : AssemblerBase(isolate_data, buffer, buffer_size),
recorded_ast_id_(TypeFeedbackId::None()),
code_targets_(100) { code_targets_(100) {
reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_);
last_bound_pos_ = 0; last_bound_pos_ = 0;
ClearRecordedAstId();
relocations_.reserve(128); relocations_.reserve(128);
} }
...@@ -1815,11 +1813,10 @@ void Assembler::srdl(Register r1, const Operand& opnd) { ...@@ -1815,11 +1813,10 @@ void Assembler::srdl(Register r1, const Operand& opnd) {
rs_form(SRDL, r1, r0, r0, opnd.immediate()); rs_form(SRDL, r1, r0, r0, opnd.immediate());
} }
void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode, void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) {
TypeFeedbackId ast_id) {
EnsureSpace ensure_space(this); EnsureSpace ensure_space(this);
int32_t target_index = emit_code_target(target, rmode, ast_id); int32_t target_index = emit_code_target(target, rmode);
brasl(r14, Operand(target_index)); brasl(r14, Operand(target_index));
} }
...@@ -2169,10 +2166,6 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { ...@@ -2169,10 +2166,6 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
!emit_debug_code())) { !emit_debug_code())) {
return; return;
} }
if (rmode == RelocInfo::CODE_TARGET_WITH_ID) {
data = RecordedAstId().ToInt();
ClearRecordedAstId();
}
DeferredRelocInfo rinfo(pc_offset(), rmode, data); DeferredRelocInfo rinfo(pc_offset(), rmode, data);
relocations_.push_back(rinfo); relocations_.push_back(rinfo);
} }
......
...@@ -842,8 +842,7 @@ class Assembler : public AssemblerBase { ...@@ -842,8 +842,7 @@ class Assembler : public AssemblerBase {
basr(r14, r1); basr(r14, r1);
} }
void call(Handle<Code> target, RelocInfo::Mode rmode, void call(Handle<Code> target, RelocInfo::Mode rmode);
TypeFeedbackId ast_id = TypeFeedbackId::None());
void jump(Handle<Code> target, RelocInfo::Mode rmode, Condition cond); void jump(Handle<Code> target, RelocInfo::Mode rmode, Condition cond);
// S390 instruction generation // S390 instruction generation
...@@ -1273,17 +1272,6 @@ class Assembler : public AssemblerBase { ...@@ -1273,17 +1272,6 @@ class Assembler : public AssemblerBase {
// Mark address of a debug break slot. // Mark address of a debug break slot.
void RecordDebugBreakSlot(RelocInfo::Mode mode); void RecordDebugBreakSlot(RelocInfo::Mode mode);
// Record the AST id of the CallIC being compiled, so that it can be placed
// in the relocation information.
void SetRecordedAstId(TypeFeedbackId ast_id) { recorded_ast_id_ = ast_id; }
TypeFeedbackId RecordedAstId() {
// roohack - another issue??? DCHECK(!recorded_ast_id_.IsNone());
return recorded_ast_id_;
}
void ClearRecordedAstId() { recorded_ast_id_ = TypeFeedbackId::None(); }
// Record a comment relocation entry that can be used by a disassembler. // Record a comment relocation entry that can be used by a disassembler.
// Use --code-comments to enable. // Use --code-comments to enable.
void RecordComment(const char* msg); void RecordComment(const char* msg);
...@@ -1352,11 +1340,6 @@ class Assembler : public AssemblerBase { ...@@ -1352,11 +1340,6 @@ class Assembler : public AssemblerBase {
byte* buffer_pos() const { return buffer_; } byte* buffer_pos() const { return buffer_; }
protected: protected:
// Relocation for a type-recording IC has the AST id added to it. This
// member variable is a way to pass the information from the call site to
// the relocation info.
TypeFeedbackId recorded_ast_id_;
int buffer_space() const { return reloc_info_writer.pos() - pc_; } int buffer_space() const { return reloc_info_writer.pos() - pc_; }
// Decode instruction(s) at pos and return backchain to previous // Decode instruction(s) at pos and return backchain to previous
...@@ -1396,8 +1379,7 @@ class Assembler : public AssemblerBase { ...@@ -1396,8 +1379,7 @@ class Assembler : public AssemblerBase {
inline void UntrackBranch(); inline void UntrackBranch();
inline int32_t emit_code_target( inline int32_t emit_code_target(
Handle<Code> target, RelocInfo::Mode rmode, Handle<Code> target, RelocInfo::Mode rmode);
TypeFeedbackId ast_id = TypeFeedbackId::None());
// Helpers to emit binary encoding of 2/4/6 byte instructions. // Helpers to emit binary encoding of 2/4/6 byte instructions.
inline void emit2bytes(uint16_t x); inline void emit2bytes(uint16_t x);
......
...@@ -126,22 +126,22 @@ void MacroAssembler::Call(Address target, RelocInfo::Mode rmode, ...@@ -126,22 +126,22 @@ void MacroAssembler::Call(Address target, RelocInfo::Mode rmode,
} }
int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode, int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) { Condition cond) {
return 6; // BRASL return 6; // BRASL
} }
void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) { Condition cond) {
DCHECK(RelocInfo::IsCodeTarget(rmode) && cond == al); DCHECK(RelocInfo::IsCodeTarget(rmode) && cond == al);
#ifdef DEBUG #ifdef DEBUG
// Check the expected size before generating code to ensure we assume the same // Check the expected size before generating code to ensure we assume the same
// constant pool availability (e.g., whether constant pool is full or not). // constant pool availability (e.g., whether constant pool is full or not).
int expected_size = CallSize(code, rmode, ast_id, cond); int expected_size = CallSize(code, rmode, cond);
Label start; Label start;
bind(&start); bind(&start);
#endif #endif
call(code, rmode, ast_id); call(code, rmode);
DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start));
} }
...@@ -1948,10 +1948,9 @@ void MacroAssembler::GetMapConstructor(Register result, Register map, ...@@ -1948,10 +1948,9 @@ void MacroAssembler::GetMapConstructor(Register result, Register map,
bind(&done); bind(&done);
} }
void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id, void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
Condition cond) {
DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. DCHECK(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id, cond); Call(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
} }
void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) { void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
......
...@@ -188,10 +188,8 @@ class MacroAssembler : public Assembler { ...@@ -188,10 +188,8 @@ class MacroAssembler : public Assembler {
void Call(Address target, RelocInfo::Mode rmode, Condition cond = al); void Call(Address target, RelocInfo::Mode rmode, Condition cond = al);
int CallSize(Handle<Code> code, int CallSize(Handle<Code> code,
RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al); Condition cond = al);
void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET, void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al); Condition cond = al);
void Ret() { b(r14); } void Ret() { b(r14); }
void Ret(Condition cond) { b(cond, r14); } void Ret(Condition cond) { b(cond, r14); }
...@@ -1216,7 +1214,7 @@ class MacroAssembler : public Assembler { ...@@ -1216,7 +1214,7 @@ class MacroAssembler : public Assembler {
// Runtime calls // Runtime calls
// Call a code stub. // Call a code stub.
void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(), void CallStub(CodeStub* stub,
Condition cond = al); Condition cond = al);
// Call a code stub. // Call a code stub.
......
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