Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: src/builtins/ia32/builtins-ia32.cc

Issue 2636143002: [builtins] CompileLazy bailed out to the runtime entirely too often. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/arm64/builtins-arm64.cc ('k') | src/builtins/mips/builtins-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 __ push(argument_count); 1033 __ push(argument_count);
1034 __ push(new_target); 1034 __ push(new_target);
1035 __ push(closure); 1035 __ push(closure);
1036 1036
1037 Register map = argument_count; 1037 Register map = argument_count;
1038 Register index = ebx; 1038 Register index = ebx;
1039 __ mov(map, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1039 __ mov(map, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1040 __ mov(map, FieldOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); 1040 __ mov(map, FieldOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset));
1041 __ mov(index, FieldOperand(map, FixedArray::kLengthOffset)); 1041 __ mov(index, FieldOperand(map, FixedArray::kLengthOffset));
1042 __ cmp(index, Immediate(Smi::FromInt(2))); 1042 __ cmp(index, Immediate(Smi::FromInt(2)));
1043 __ j(less, &gotta_call_runtime); 1043 __ j(less, &try_shared);
1044 1044
1045 // edx : native context 1045 // edx : native context
1046 // ebx : length / index 1046 // ebx : length / index
1047 // eax : optimized code map 1047 // eax : optimized code map
1048 // stack[0] : new target 1048 // stack[0] : new target
1049 // stack[4] : closure 1049 // stack[4] : closure
1050 Register native_context = edx; 1050 Register native_context = edx;
1051 __ mov(native_context, NativeContextOperand()); 1051 __ mov(native_context, NativeContextOperand());
1052 1052
1053 __ bind(&loop_top); 1053 __ bind(&loop_top);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 __ mov(closure, ebx); 1093 __ mov(closure, ebx);
1094 __ pop(new_target); 1094 __ pop(new_target);
1095 __ pop(argument_count); 1095 __ pop(argument_count);
1096 __ jmp(entry); 1096 __ jmp(entry);
1097 1097
1098 __ bind(&loop_bottom); 1098 __ bind(&loop_bottom);
1099 __ sub(index, Immediate(Smi::FromInt(SharedFunctionInfo::kEntryLength))); 1099 __ sub(index, Immediate(Smi::FromInt(SharedFunctionInfo::kEntryLength)));
1100 __ cmp(index, Immediate(Smi::FromInt(1))); 1100 __ cmp(index, Immediate(Smi::FromInt(1)));
1101 __ j(greater, &loop_top); 1101 __ j(greater, &loop_top);
1102 1102
1103 // We found no code. 1103 // We found no code. Try the SharedFunctionInfo.
1104 __ jmp(&gotta_call_runtime);
1105
1106 __ bind(&try_shared); 1104 __ bind(&try_shared);
1107 __ pop(closure); 1105 __ pop(closure);
1108 __ pop(new_target); 1106 __ pop(new_target);
1109 __ pop(argument_count); 1107 __ pop(argument_count);
1110 __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset)); 1108 __ mov(entry, FieldOperand(closure, JSFunction::kSharedFunctionInfoOffset));
1111 // Is the shared function marked for tier up? 1109 // Is the shared function marked for tier up?
1112 __ test_b(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset), 1110 __ test_b(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset),
1113 Immediate(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); 1111 Immediate(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte));
1114 __ j(not_zero, &gotta_call_runtime_no_stack); 1112 __ j(not_zero, &gotta_call_runtime_no_stack);
1115 1113
(...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after
3099 3097
3100 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3098 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3101 Generate_OnStackReplacementHelper(masm, true); 3099 Generate_OnStackReplacementHelper(masm, true);
3102 } 3100 }
3103 3101
3104 #undef __ 3102 #undef __
3105 } // namespace internal 3103 } // namespace internal
3106 } // namespace v8 3104 } // namespace v8
3107 3105
3108 #endif // V8_TARGET_ARCH_IA32 3106 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/builtins/arm64/builtins-arm64.cc ('k') | src/builtins/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698