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

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

Issue 2549753002: Store OSR'd optimized code on the native context. (Closed)
Patch Set: Comment response. Created 4 years 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 1048
1049 __ bind(&loop_top); 1049 __ bind(&loop_top);
1050 Register temp = edi; 1050 Register temp = edi;
1051 1051
1052 // Does the native context match? 1052 // Does the native context match?
1053 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, 1053 __ mov(temp, FieldOperand(map, index, times_half_pointer_size,
1054 SharedFunctionInfo::kOffsetToPreviousContext)); 1054 SharedFunctionInfo::kOffsetToPreviousContext));
1055 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); 1055 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset));
1056 __ cmp(temp, native_context); 1056 __ cmp(temp, native_context);
1057 __ j(not_equal, &loop_bottom); 1057 __ j(not_equal, &loop_bottom);
1058 // OSR id set to none?
1059 __ mov(temp, FieldOperand(map, index, times_half_pointer_size,
1060 SharedFunctionInfo::kOffsetToPreviousOsrAstId));
1061 const int bailout_id = BailoutId::None().ToInt();
1062 __ cmp(temp, Immediate(Smi::FromInt(bailout_id)));
1063 __ j(not_equal, &loop_bottom);
1064 // Literals available? 1058 // Literals available?
1065 __ mov(temp, FieldOperand(map, index, times_half_pointer_size, 1059 __ mov(temp, FieldOperand(map, index, times_half_pointer_size,
1066 SharedFunctionInfo::kOffsetToPreviousLiterals)); 1060 SharedFunctionInfo::kOffsetToPreviousLiterals));
1067 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset)); 1061 __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset));
1068 __ JumpIfSmi(temp, &gotta_call_runtime); 1062 __ JumpIfSmi(temp, &gotta_call_runtime);
1069 1063
1070 // Save the literals in the closure. 1064 // Save the literals in the closure.
1071 __ mov(ecx, Operand(esp, 0)); 1065 __ mov(ecx, Operand(esp, 0));
1072 __ mov(FieldOperand(ecx, JSFunction::kLiteralsOffset), temp); 1066 __ mov(FieldOperand(ecx, JSFunction::kLiteralsOffset), temp);
1073 __ push(index); 1067 __ push(index);
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
3115 3109
3116 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3110 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3117 Generate_OnStackReplacementHelper(masm, true); 3111 Generate_OnStackReplacementHelper(masm, true);
3118 } 3112 }
3119 3113
3120 #undef __ 3114 #undef __
3121 } // namespace internal 3115 } // namespace internal
3122 } // namespace v8 3116 } // namespace v8
3123 3117
3124 #endif // V8_TARGET_ARCH_IA32 3118 #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