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/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
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 3564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3575 __ ldr(result, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3575 __ ldr(result, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3576 } else { | 3576 } else { |
3577 // If there is no frame, the context must be in cp. | 3577 // If there is no frame, the context must be in cp. |
3578 DCHECK(result.is(cp)); | 3578 DCHECK(result.is(cp)); |
3579 } | 3579 } |
3580 } | 3580 } |
3581 | 3581 |
3582 | 3582 |
3583 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3583 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3584 DCHECK(ToRegister(instr->context()).is(cp)); | 3584 DCHECK(ToRegister(instr->context()).is(cp)); |
3585 __ push(cp); // The context is the first argument. | |
3586 __ Move(scratch0(), instr->hydrogen()->pairs()); | 3585 __ Move(scratch0(), instr->hydrogen()->pairs()); |
3587 __ push(scratch0()); | 3586 __ push(scratch0()); |
3588 __ mov(scratch0(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); | 3587 __ mov(scratch0(), Operand(Smi::FromInt(instr->hydrogen()->flags()))); |
3589 __ push(scratch0()); | 3588 __ push(scratch0()); |
3590 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | 3589 CallRuntime(Runtime::kDeclareGlobals, 2, instr); |
3591 } | 3590 } |
3592 | 3591 |
3593 | 3592 |
3594 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3593 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3595 int formal_parameter_count, int arity, | 3594 int formal_parameter_count, int arity, |
3596 LInstruction* instr) { | 3595 LInstruction* instr) { |
3597 bool dont_adapt_arguments = | 3596 bool dont_adapt_arguments = |
3598 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3597 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3599 bool can_invoke_directly = | 3598 bool can_invoke_directly = |
3600 dont_adapt_arguments || formal_parameter_count == arity; | 3599 dont_adapt_arguments || formal_parameter_count == arity; |
(...skipping 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6017 __ push(ToRegister(instr->function())); | 6016 __ push(ToRegister(instr->function())); |
6018 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6017 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6019 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6018 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6020 } | 6019 } |
6021 | 6020 |
6022 | 6021 |
6023 #undef __ | 6022 #undef __ |
6024 | 6023 |
6025 } // namespace internal | 6024 } // namespace internal |
6026 } // namespace v8 | 6025 } // namespace v8 |
OLD | NEW |