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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3674 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3674 __ mov(result, Operand(ebp, StandardFrameConstants::kContextOffset)); |
3675 } else { | 3675 } else { |
3676 // If there is no frame, the context must be in esi. | 3676 // If there is no frame, the context must be in esi. |
3677 DCHECK(result.is(esi)); | 3677 DCHECK(result.is(esi)); |
3678 } | 3678 } |
3679 } | 3679 } |
3680 | 3680 |
3681 | 3681 |
3682 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3682 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3683 DCHECK(ToRegister(instr->context()).is(esi)); | 3683 DCHECK(ToRegister(instr->context()).is(esi)); |
3684 __ push(esi); // The context is the first argument. | |
3685 __ push(Immediate(instr->hydrogen()->pairs())); | 3684 __ push(Immediate(instr->hydrogen()->pairs())); |
3686 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); | 3685 __ push(Immediate(Smi::FromInt(instr->hydrogen()->flags()))); |
3687 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | 3686 CallRuntime(Runtime::kDeclareGlobals, 2, instr); |
3688 } | 3687 } |
3689 | 3688 |
3690 | 3689 |
3691 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3690 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3692 int formal_parameter_count, int arity, | 3691 int formal_parameter_count, int arity, |
3693 LInstruction* instr) { | 3692 LInstruction* instr) { |
3694 bool dont_adapt_arguments = | 3693 bool dont_adapt_arguments = |
3695 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3694 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3696 bool can_invoke_directly = | 3695 bool can_invoke_directly = |
3697 dont_adapt_arguments || formal_parameter_count == arity; | 3696 dont_adapt_arguments || formal_parameter_count == arity; |
(...skipping 2759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6457 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6456 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6458 } | 6457 } |
6459 | 6458 |
6460 | 6459 |
6461 #undef __ | 6460 #undef __ |
6462 | 6461 |
6463 } // namespace internal | 6462 } // namespace internal |
6464 } // namespace v8 | 6463 } // namespace v8 |
6465 | 6464 |
6466 #endif // V8_TARGET_ARCH_X87 | 6465 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |