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) {
Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size)
: AssemblerBase(isolate_data, buffer, buffer_size),
recorded_ast_id_(TypeFeedbackId::None()),
constant_pool_builder_(kLoadPtrMaxReachBits, kLoadDoubleMaxReachBits) {
reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_);
......@@ -246,7 +245,6 @@ Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size)
optimizable_cmpi_pos_ = -1;
trampoline_emitted_ = FLAG_force_long_branches;
tracked_branch_count_ = 0;
ClearRecordedAstId();
relocations_.reserve(128);
}
......@@ -2056,10 +2054,6 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
!emit_debug_code())) {
return;
}
if (rmode == RelocInfo::CODE_TARGET_WITH_ID) {
data = RecordedAstId().ToInt();
ClearRecordedAstId();
}
DeferredRelocInfo rinfo(pc_offset(), rmode, data);
relocations_.push_back(rinfo);
}
......
......@@ -1267,22 +1267,6 @@ class Assembler : public AssemblerBase {
// Mark address of a debug break slot.
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.
// Use --code-comments to enable.
void RecordComment(const char* msg);
......@@ -1376,11 +1360,6 @@ class Assembler : public AssemblerBase {
void EmitRelocations();
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_; }
// Decode instruction(s) at pos and return backchain to previous
......
......@@ -140,29 +140,25 @@ void MacroAssembler::Call(Address target, RelocInfo::Mode rmode,
int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) {
Condition cond) {
AllowDeferredHandleDereference using_raw_address;
return CallSize(reinterpret_cast<Address>(code.location()), rmode, cond);
}
void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) {
Condition cond) {
BlockTrampolinePoolScope block_trampoline_pool(this);
DCHECK(RelocInfo::IsCodeTarget(rmode));
#ifdef DEBUG
// 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).
int expected_size = CallSize(code, rmode, ast_id, cond);
int expected_size = CallSize(code, rmode, cond);
Label start;
bind(&start);
#endif
if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) {
SetRecordedAstId(ast_id);
rmode = RelocInfo::CODE_TARGET_WITH_ID;
}
AllowDeferredHandleDereference using_raw_address;
Call(reinterpret_cast<Address>(code.location()), rmode, cond);
DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start));
......@@ -2112,10 +2108,9 @@ void MacroAssembler::GetMapConstructor(Register result, Register map,
bind(&done);
}
void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id,
Condition cond) {
void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
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 {
void Call(Address target, RelocInfo::Mode rmode, Condition cond = al);
int CallSize(Handle<Code> code,
RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al);
void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al);
void Ret() { blr(); }
void Ret(Condition cond, CRegister cr = cr7) { bclr(cond, cr); }
......@@ -917,7 +915,7 @@ class MacroAssembler : public Assembler {
// Runtime calls
// Call a code stub.
void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(),
void CallStub(CodeStub* stub,
Condition cond = al);
// Call a code stub.
......
......@@ -371,15 +371,10 @@ void Assembler::CheckBuffer() {
}
}
int32_t Assembler::emit_code_target(Handle<Code> target, RelocInfo::Mode rmode,
TypeFeedbackId ast_id) {
int32_t Assembler::emit_code_target(Handle<Code> target,
RelocInfo::Mode rmode) {
DCHECK(RelocInfo::IsCodeTarget(rmode));
if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) {
SetRecordedAstId(ast_id);
RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID);
} else {
RecordRelocInfo(rmode);
}
RecordRelocInfo(rmode);
int current = code_targets_.length();
if (current > 0 && code_targets_.last().is_identical_to(target)) {
......
......@@ -339,12 +339,10 @@ MemOperand::MemOperand(Register rx, Register rb, int32_t offset) {
Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size)
: AssemblerBase(isolate_data, buffer, buffer_size),
recorded_ast_id_(TypeFeedbackId::None()),
code_targets_(100) {
reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_);
last_bound_pos_ = 0;
ClearRecordedAstId();
relocations_.reserve(128);
}
......@@ -1815,11 +1813,10 @@ void Assembler::srdl(Register r1, const Operand& opnd) {
rs_form(SRDL, r1, r0, r0, opnd.immediate());
}
void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode,
TypeFeedbackId ast_id) {
void Assembler::call(Handle<Code> target, RelocInfo::Mode rmode) {
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));
}
......@@ -2169,10 +2166,6 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
!emit_debug_code())) {
return;
}
if (rmode == RelocInfo::CODE_TARGET_WITH_ID) {
data = RecordedAstId().ToInt();
ClearRecordedAstId();
}
DeferredRelocInfo rinfo(pc_offset(), rmode, data);
relocations_.push_back(rinfo);
}
......
......@@ -842,8 +842,7 @@ class Assembler : public AssemblerBase {
basr(r14, r1);
}
void call(Handle<Code> target, RelocInfo::Mode rmode,
TypeFeedbackId ast_id = TypeFeedbackId::None());
void call(Handle<Code> target, RelocInfo::Mode rmode);
void jump(Handle<Code> target, RelocInfo::Mode rmode, Condition cond);
// S390 instruction generation
......@@ -1273,17 +1272,6 @@ class Assembler : public AssemblerBase {
// Mark address of a debug break slot.
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.
// Use --code-comments to enable.
void RecordComment(const char* msg);
......@@ -1352,11 +1340,6 @@ class Assembler : public AssemblerBase {
byte* buffer_pos() const { return buffer_; }
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_; }
// Decode instruction(s) at pos and return backchain to previous
......@@ -1396,8 +1379,7 @@ class Assembler : public AssemblerBase {
inline void UntrackBranch();
inline int32_t emit_code_target(
Handle<Code> target, RelocInfo::Mode rmode,
TypeFeedbackId ast_id = TypeFeedbackId::None());
Handle<Code> target, RelocInfo::Mode rmode);
// Helpers to emit binary encoding of 2/4/6 byte instructions.
inline void emit2bytes(uint16_t x);
......
......@@ -126,22 +126,22 @@ void MacroAssembler::Call(Address target, RelocInfo::Mode rmode,
}
int MacroAssembler::CallSize(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) {
Condition cond) {
return 6; // BRASL
}
void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
TypeFeedbackId ast_id, Condition cond) {
Condition cond) {
DCHECK(RelocInfo::IsCodeTarget(rmode) && cond == al);
#ifdef DEBUG
// 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).
int expected_size = CallSize(code, rmode, ast_id, cond);
int expected_size = CallSize(code, rmode, cond);
Label start;
bind(&start);
#endif
call(code, rmode, ast_id);
call(code, rmode);
DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start));
}
......@@ -1948,10 +1948,9 @@ void MacroAssembler::GetMapConstructor(Register result, Register map,
bind(&done);
}
void MacroAssembler::CallStub(CodeStub* stub, TypeFeedbackId ast_id,
Condition cond) {
void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
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) {
......
......@@ -188,10 +188,8 @@ class MacroAssembler : public Assembler {
void Call(Address target, RelocInfo::Mode rmode, Condition cond = al);
int CallSize(Handle<Code> code,
RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al);
void Call(Handle<Code> code, RelocInfo::Mode rmode = RelocInfo::CODE_TARGET,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = al);
void Ret() { b(r14); }
void Ret(Condition cond) { b(cond, r14); }
......@@ -1216,7 +1214,7 @@ class MacroAssembler : public Assembler {
// Runtime calls
// Call a code stub.
void CallStub(CodeStub* stub, TypeFeedbackId ast_id = TypeFeedbackId::None(),
void CallStub(CodeStub* stub,
Condition cond = al);
// 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