Commit 74026ea4 authored by ulan@chromium.org's avatar ulan@chromium.org

MIPS: Enable type feedback for branch statement and function call

Port r13288 (5fa2c889)

Original commit message:
This change associates TypeFeedbackIds with ToBoolean stubs in
full-compiled code on ARM, allowing their information to be used in
Crankshaft. This eliminates unnecessary checks, especially in
DoBranch.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/11801003
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a8962e89
......@@ -675,7 +675,7 @@ void FullCodeGenerator::DoTest(Expression* condition,
Label* fall_through) {
if (CpuFeatures::IsSupported(FPU)) {
ToBooleanStub stub(result_register());
__ CallStub(&stub);
__ CallStub(&stub, condition->test_id());
__ mov(at, zero_reg);
} else {
// Call the runtime to find the boolean value of the source and then
......@@ -2353,7 +2353,7 @@ void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) {
CallFunctionStub stub(arg_count, flags);
__ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
__ CallStub(&stub);
__ CallStub(&stub, expr->CallFeedbackId());
RecordJSReturnSite(expr);
// Restore context register.
__ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
......
......@@ -3935,12 +3935,13 @@ void MacroAssembler::GetObjectType(Register object,
// Runtime calls.
void MacroAssembler::CallStub(CodeStub* stub,
TypeFeedbackId ast_id,
Condition cond,
Register r1,
const Operand& r2,
BranchDelaySlot bd) {
ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
Call(stub->GetCode(), RelocInfo::CODE_TARGET, TypeFeedbackId::None(),
Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id,
cond, r1, r2, bd);
}
......@@ -4266,7 +4267,7 @@ void MacroAssembler::CallExternalReference(const ExternalReference& ext,
PrepareCEntryFunction(ext);
CEntryStub stub(1);
CallStub(&stub, al, zero_reg, Operand(zero_reg), bd);
CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd);
}
......
......@@ -1141,6 +1141,7 @@ class MacroAssembler: public Assembler {
// Call a code stub.
void CallStub(CodeStub* stub,
TypeFeedbackId ast_id = TypeFeedbackId::None(),
Condition cond = cc_always,
Register r1 = zero_reg,
const Operand& r2 = Operand(zero_reg),
......
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