Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: src/builtins/x64/builtins-x64.cc

Issue 2227763003: [turbofan] Rewrite ToObject as TurboFan stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Revert "Delete hydrogen toObject" Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698