| 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 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3679 // If there is no frame, the context must be in cp. | 3679 // If there is no frame, the context must be in cp. |
| 3680 DCHECK(result.is(cp)); | 3680 DCHECK(result.is(cp)); |
| 3681 } | 3681 } |
| 3682 } | 3682 } |
| 3683 | 3683 |
| 3684 | 3684 |
| 3685 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3685 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
| 3686 DCHECK(ToRegister(instr->context()).is(cp)); | 3686 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3687 __ li(scratch0(), instr->hydrogen()->pairs()); | 3687 __ li(scratch0(), instr->hydrogen()->pairs()); |
| 3688 __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); | 3688 __ li(scratch1(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); |
| 3689 // The context is the first argument. | 3689 __ Push(scratch0(), scratch1()); |
| 3690 __ Push(cp, scratch0(), scratch1()); | 3690 CallRuntime(Runtime::kDeclareGlobals, 2, instr); |
| 3691 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | |
| 3692 } | 3691 } |
| 3693 | 3692 |
| 3694 | 3693 |
| 3695 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3694 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
| 3696 int formal_parameter_count, int arity, | 3695 int formal_parameter_count, int arity, |
| 3697 LInstruction* instr) { | 3696 LInstruction* instr) { |
| 3698 bool dont_adapt_arguments = | 3697 bool dont_adapt_arguments = |
| 3699 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3698 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
| 3700 bool can_invoke_directly = | 3699 bool can_invoke_directly = |
| 3701 dont_adapt_arguments || formal_parameter_count == arity; | 3700 dont_adapt_arguments || formal_parameter_count == arity; |
| (...skipping 2540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6242 __ Push(at, ToRegister(instr->function())); | 6241 __ Push(at, ToRegister(instr->function())); |
| 6243 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6242 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6244 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6243 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6245 } | 6244 } |
| 6246 | 6245 |
| 6247 | 6246 |
| 6248 #undef __ | 6247 #undef __ |
| 6249 | 6248 |
| 6250 } // namespace internal | 6249 } // namespace internal |
| 6251 } // namespace v8 | 6250 } // namespace v8 |
| OLD | NEW |