OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3487 __ movp(result, Operand(rbp, StandardFrameConstants::kContextOffset)); | 3487 __ movp(result, Operand(rbp, StandardFrameConstants::kContextOffset)); |
3488 } else { | 3488 } else { |
3489 // If there is no frame, the context must be in rsi. | 3489 // If there is no frame, the context must be in rsi. |
3490 DCHECK(result.is(rsi)); | 3490 DCHECK(result.is(rsi)); |
3491 } | 3491 } |
3492 } | 3492 } |
3493 | 3493 |
3494 | 3494 |
3495 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { | 3495 void LCodeGen::DoDeclareGlobals(LDeclareGlobals* instr) { |
3496 DCHECK(ToRegister(instr->context()).is(rsi)); | 3496 DCHECK(ToRegister(instr->context()).is(rsi)); |
3497 __ Push(rsi); // The context is the first argument. | |
3498 __ Push(instr->hydrogen()->pairs()); | 3497 __ Push(instr->hydrogen()->pairs()); |
3499 __ Push(Smi::FromInt(instr->hydrogen()->flags())); | 3498 __ Push(Smi::FromInt(instr->hydrogen()->flags())); |
3500 CallRuntime(Runtime::kDeclareGlobals, 3, instr); | 3499 CallRuntime(Runtime::kDeclareGlobals, 2, instr); |
3501 } | 3500 } |
3502 | 3501 |
3503 | 3502 |
3504 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, | 3503 void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
3505 int formal_parameter_count, int arity, | 3504 int formal_parameter_count, int arity, |
3506 LInstruction* instr) { | 3505 LInstruction* instr) { |
3507 bool dont_adapt_arguments = | 3506 bool dont_adapt_arguments = |
3508 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; | 3507 formal_parameter_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel; |
3509 bool can_invoke_directly = | 3508 bool can_invoke_directly = |
3510 dont_adapt_arguments || formal_parameter_count == arity; | 3509 dont_adapt_arguments || formal_parameter_count == arity; |
(...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6047 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6046 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6048 } | 6047 } |
6049 | 6048 |
6050 | 6049 |
6051 #undef __ | 6050 #undef __ |
6052 | 6051 |
6053 } // namespace internal | 6052 } // namespace internal |
6054 } // namespace v8 | 6053 } // namespace v8 |
6055 | 6054 |
6056 #endif // V8_TARGET_ARCH_X64 | 6055 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |