| 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/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" | 
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" | 
| 9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" | 
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" | 
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 181       __ Push(info->scope()->scope_info()); | 181       __ Push(info->scope()->scope_info()); | 
| 182       __ CallRuntime(Runtime::kNewScriptContext); | 182       __ CallRuntime(Runtime::kNewScriptContext); | 
| 183       PrepareForBailoutForId(BailoutId::ScriptContext(), | 183       PrepareForBailoutForId(BailoutId::ScriptContext(), | 
| 184                              BailoutState::TOS_REGISTER); | 184                              BailoutState::TOS_REGISTER); | 
| 185       // The new target value is not used, clobbering is safe. | 185       // The new target value is not used, clobbering is safe. | 
| 186       DCHECK_NULL(info->scope()->new_target_var()); | 186       DCHECK_NULL(info->scope()->new_target_var()); | 
| 187     } else { | 187     } else { | 
| 188       if (info->scope()->new_target_var() != nullptr) { | 188       if (info->scope()->new_target_var() != nullptr) { | 
| 189         __ push(edx);  // Preserve new target. | 189         __ push(edx);  // Preserve new target. | 
| 190       } | 190       } | 
| 191       if (slots <= | 191       if (slots <= ConstructorBuiltins::MaximumFunctionContextSlots()) { | 
| 192           ConstructorBuiltinsAssembler::MaximumFunctionContextSlots()) { |  | 
| 193         Callable callable = CodeFactory::FastNewFunctionContext( | 192         Callable callable = CodeFactory::FastNewFunctionContext( | 
| 194             isolate(), info->scope()->scope_type()); | 193             isolate(), info->scope()->scope_type()); | 
| 195         __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 194         __ mov(FastNewFunctionContextDescriptor::SlotsRegister(), | 
| 196                Immediate(slots)); | 195                Immediate(slots)); | 
| 197         __ Call(callable.code(), RelocInfo::CODE_TARGET); | 196         __ Call(callable.code(), RelocInfo::CODE_TARGET); | 
| 198         // Result of the FastNewFunctionContext builtin is always in new space. | 197         // Result of the FastNewFunctionContext builtin is always in new space. | 
| 199         need_write_barrier = false; | 198         need_write_barrier = false; | 
| 200       } else { | 199       } else { | 
| 201         __ push(edi); | 200         __ push(edi); | 
| 202         __ Push(Smi::FromInt(info->scope()->scope_type())); | 201         __ Push(Smi::FromInt(info->scope()->scope_type())); | 
| (...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2711       isolate->builtins()->OnStackReplacement()->entry(), | 2710       isolate->builtins()->OnStackReplacement()->entry(), | 
| 2712       Assembler::target_address_at(call_target_address, unoptimized_code)); | 2711       Assembler::target_address_at(call_target_address, unoptimized_code)); | 
| 2713   return ON_STACK_REPLACEMENT; | 2712   return ON_STACK_REPLACEMENT; | 
| 2714 } | 2713 } | 
| 2715 | 2714 | 
| 2716 | 2715 | 
| 2717 }  // namespace internal | 2716 }  // namespace internal | 
| 2718 }  // namespace v8 | 2717 }  // namespace v8 | 
| 2719 | 2718 | 
| 2720 #endif  // V8_TARGET_ARCH_IA32 | 2719 #endif  // V8_TARGET_ARCH_IA32 | 
| OLD | NEW | 
|---|