Commit bb89869a authored by bjaideep's avatar bjaideep Committed by Commit bot

PPC/s390: [builtins] CompileLazy bailed out to the runtime entirely too often.

Port 743fdb25

Original Commit Message:

    This is just a bug. CompileLazy knows how to look in the
    SharedFunctionInfo for code (or bytecode, essentially) if it
    finds nothing in the OptimizedCodeMap. Ensure that behavior.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=681543
LOG=N

Review-Url: https://codereview.chromium.org/2641473002
Cr-Commit-Position: refs/heads/master@{#42422}
parent 6555a3c1
......@@ -1372,7 +1372,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset));
__ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset));
__ CmpSmiLiteral(index, Smi::FromInt(2), r0);
__ blt(&gotta_call_runtime);
__ blt(&try_shared);
// r10 : native context
// r5 : length / index
......@@ -1437,9 +1437,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
__ CmpSmiLiteral(index, Smi::FromInt(1), r0);
__ bgt(&loop_top);
// We found no code.
__ b(&gotta_call_runtime);
// We found no code. Try the SharedFunctionInfo.
__ bind(&try_shared);
__ LoadP(entry,
FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
......
......@@ -1377,7 +1377,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset));
__ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset));
__ CmpSmiLiteral(index, Smi::FromInt(2), r0);
__ blt(&gotta_call_runtime);
__ blt(&try_shared);
// Find literals.
// r9 : native context
......@@ -1443,9 +1443,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
__ CmpSmiLiteral(index, Smi::FromInt(1), r0);
__ bgt(&loop_top);
// We found no code.
__ b(&gotta_call_runtime);
// We found no code. Try the SharedFunctionInfo.
__ bind(&try_shared);
__ LoadP(entry,
FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset));
......
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