OLD | NEW |
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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 bool function_in_register = true; | 159 bool function_in_register = true; |
160 | 160 |
161 // Possibly allocate a local context. | 161 // Possibly allocate a local context. |
162 if (info->scope()->NeedsContext()) { | 162 if (info->scope()->NeedsContext()) { |
163 Comment cmnt(masm_, "[ Allocate context"); | 163 Comment cmnt(masm_, "[ Allocate context"); |
164 bool need_write_barrier = true; | 164 bool need_write_barrier = true; |
165 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 165 int slots = info->scope()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
166 // Argument to NewContext is the function, which is still in edi. | 166 // Argument to NewContext is the function, which is still in edi. |
167 if (info->scope()->is_script_scope()) { | 167 if (info->scope()->is_script_scope()) { |
168 __ push(edi); | 168 __ push(edi); |
169 __ Push(info->scope()->GetScopeInfo(info->isolate())); | 169 __ Push(info->scope()->scope_info()); |
170 __ CallRuntime(Runtime::kNewScriptContext); | 170 __ CallRuntime(Runtime::kNewScriptContext); |
171 PrepareForBailoutForId(BailoutId::ScriptContext(), | 171 PrepareForBailoutForId(BailoutId::ScriptContext(), |
172 BailoutState::TOS_REGISTER); | 172 BailoutState::TOS_REGISTER); |
173 // The new target value is not used, clobbering is safe. | 173 // The new target value is not used, clobbering is safe. |
174 DCHECK_NULL(info->scope()->new_target_var()); | 174 DCHECK_NULL(info->scope()->new_target_var()); |
175 } else { | 175 } else { |
176 if (info->scope()->new_target_var() != nullptr) { | 176 if (info->scope()->new_target_var() != nullptr) { |
177 __ push(edx); // Preserve new target. | 177 __ push(edx); // Preserve new target. |
178 } | 178 } |
179 FastNewFunctionContextStub stub(isolate()); | 179 FastNewFunctionContextStub stub(isolate()); |
(...skipping 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3646 isolate->builtins()->OnStackReplacement()->entry(), | 3646 isolate->builtins()->OnStackReplacement()->entry(), |
3647 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3647 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3648 return ON_STACK_REPLACEMENT; | 3648 return ON_STACK_REPLACEMENT; |
3649 } | 3649 } |
3650 | 3650 |
3651 | 3651 |
3652 } // namespace internal | 3652 } // namespace internal |
3653 } // namespace v8 | 3653 } // namespace v8 |
3654 | 3654 |
3655 #endif // V8_TARGET_ARCH_IA32 | 3655 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |