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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 3393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3404 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3404 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); |
3405 } else { | 3405 } else { |
3406 // If there is no frame, the context must be in esi. | 3406 // If there is no frame, the context must be in esi. |
3407 DCHECK(result.is(esi)); | 3407 DCHECK(result.is(esi)); |
3408 } | 3408 } |
3409 } | 3409 } |
3410 | 3410 |
3411 | 3411 |
3412 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3412 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3413 DCHECK(ToRegister(instr->context()).is(esi)); | 3413 DCHECK(ToRegister(instr->context()).is(esi)); |
3414 __ push(esi); // The context is the first argument. | |
3415 __ push(Immediate(instr->hydrogen()->pairs())); | 3414 __ push(Immediate(instr->hydrogen()->pairs())); |
3416 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); | 3415 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); |
3417 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | 3416 CallRuntime(Runtime::kDeclareGlobals, 2, instr); |
3418 } | 3417 } |
3419 | 3418 |
3420 | 3419 |
3421 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3420 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3422 int formal_parameter_count, int arity, | 3421 int formal_parameter_count, int arity, |
3423 LInstruction* instr) { | 3422 LInstruction* instr) { |
3424 bool dont_adapt_arguments = | 3423 bool dont_adapt_arguments = |
3425 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3424 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3426 bool can_invoke_directly = | 3425 bool can_invoke_directly = |
3427 dont_adapt_arguments || formal_parameter_count == arity; | 3426 dont_adapt_arguments || formal_parameter_count == arity; |
(...skipping 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5843 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5842 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5844 } | 5843 } |
5845 | 5844 |
5846 | 5845 |
5847 #undef __ | 5846 #undef __ |
5848 | 5847 |
5849 } // namespace internal | 5848 } // namespace internal |
5850 } // namespace v8 | 5849 } // namespace v8 |
5851 | 5850 |
5852 #endif // V8_TARGET_ARCH_IA32 | 5851 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |