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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 __ Push(info->scope()->scope_info()); | 182 __ Push(info->scope()->scope_info()); |
183 __ CallRuntime(Runtime::kNewScriptContext); | 183 __ CallRuntime(Runtime::kNewScriptContext); |
184 PrepareForBailoutForId(BailoutId::ScriptContext(), | 184 PrepareForBailoutForId(BailoutId::ScriptContext(), |
185 BailoutState::TOS_REGISTER); | 185 BailoutState::TOS_REGISTER); |
186 // The new target value is not used, clobbering is safe. | 186 // The new target value is not used, clobbering is safe. |
187 DCHECK_NULL(info->scope()->new_target_var()); | 187 DCHECK_NULL(info->scope()->new_target_var()); |
188 } else { | 188 } else { |
189 if (info->scope()->new_target_var() != nullptr) { | 189 if (info->scope()->new_target_var() != nullptr) { |
190 __ push(edx); // Preserve new target. | 190 __ push(edx); // Preserve new target. |
191 } | 191 } |
192 FastNewFunctionContextStub stub(isolate()); | 192 FastNewFunctionContextStub stub(isolate(), |
| 193 info->scope()->is_eval_scope()); |
193 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 194 __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), |
194 Immediate(slots)); | 195 Immediate(slots)); |
195 __ CallStub(&stub); | 196 __ CallStub(&stub); |
196 // Result of FastNewFunctionContextStub is always in new space. | 197 // Result of FastNewFunctionContextStub is always in new space. |
197 need_write_barrier = false; | 198 need_write_barrier = false; |
198 if (info->scope()->new_target_var() != nullptr) { | 199 if (info->scope()->new_target_var() != nullptr) { |
199 __ pop(edx); // Restore new target. | 200 __ pop(edx); // Restore new target. |
200 } | 201 } |
201 } | 202 } |
202 function_in_register = false; | 203 function_in_register = false; |
(...skipping 3312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3515 isolate->builtins()->OnStackReplacement()->entry(), | 3516 isolate->builtins()->OnStackReplacement()->entry(), |
3516 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3517 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3517 return ON_STACK_REPLACEMENT; | 3518 return ON_STACK_REPLACEMENT; |
3518 } | 3519 } |
3519 | 3520 |
3520 | 3521 |
3521 } // namespace internal | 3522 } // namespace internal |
3522 } // namespace v8 | 3523 } // namespace v8 |
3523 | 3524 |
3524 #endif // V8_TARGET_ARCH_X87 | 3525 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |