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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2556 __ bind(&convert_to_object); | 2556 __ bind(&convert_to_object); |
2557 { | 2557 { |
2558 // Convert receiver using ToObject. | 2558 // Convert receiver using ToObject. |
2559 // TODO(bmeurer): Inline the allocation here to avoid building the frame | 2559 // TODO(bmeurer): Inline the allocation here to avoid building the frame |
2560 // in the fast case? (fall back to AllocateInNewSpace?) | 2560 // in the fast case? (fall back to AllocateInNewSpace?) |
2561 FrameScope scope(masm, StackFrame::INTERNAL); | 2561 FrameScope scope(masm, StackFrame::INTERNAL); |
2562 __ Integer32ToSmi(rax, rax); | 2562 __ Integer32ToSmi(rax, rax); |
2563 __ Push(rax); | 2563 __ Push(rax); |
2564 __ Push(rdi); | 2564 __ Push(rdi); |
2565 __ movp(rax, rcx); | 2565 __ movp(rax, rcx); |
| 2566 __ Push(rsi); |
2566 ToObjectStub stub(masm->isolate()); | 2567 ToObjectStub stub(masm->isolate()); |
2567 __ CallStub(&stub); | 2568 __ CallStub(&stub); |
| 2569 __ Pop(rsi); |
2568 __ movp(rcx, rax); | 2570 __ movp(rcx, rax); |
2569 __ Pop(rdi); | 2571 __ Pop(rdi); |
2570 __ Pop(rax); | 2572 __ Pop(rax); |
2571 __ SmiToInteger32(rax, rax); | 2573 __ SmiToInteger32(rax, rax); |
2572 } | 2574 } |
2573 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 2575 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
2574 __ bind(&convert_receiver); | 2576 __ bind(&convert_receiver); |
2575 } | 2577 } |
2576 __ movp(args.GetReceiverOperand(), rcx); | 2578 __ movp(args.GetReceiverOperand(), rcx); |
2577 } | 2579 } |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3068 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3070 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
3069 Generate_OnStackReplacementHelper(masm, true); | 3071 Generate_OnStackReplacementHelper(masm, true); |
3070 } | 3072 } |
3071 | 3073 |
3072 #undef __ | 3074 #undef __ |
3073 | 3075 |
3074 } // namespace internal | 3076 } // namespace internal |
3075 } // namespace v8 | 3077 } // namespace v8 |
3076 | 3078 |
3077 #endif // V8_TARGET_ARCH_X64 | 3079 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |