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

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

Issue 2602903005: [builtins] Merge two adjacent if-statements in JSConstructStub (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 __ Pop(rdi); 144 __ Pop(rdi);
145 145
146 // ----------- S t a t e ------------- 146 // ----------- S t a t e -------------
147 // -- rdi: constructor function 147 // -- rdi: constructor function
148 // -- rbx: newly allocated object 148 // -- rbx: newly allocated object
149 // -- rdx: new target 149 // -- rdx: new target
150 // ----------------------------------- 150 // -----------------------------------
151 151
152 // Retrieve smi-tagged arguments count from the stack. 152 // Retrieve smi-tagged arguments count from the stack.
153 __ SmiToInteger32(rax, Operand(rsp, 0 * kPointerSize)); 153 __ SmiToInteger32(rax, Operand(rsp, 0 * kPointerSize));
154 }
155 154
156 if (create_implicit_receiver) {
157 // Push the allocated receiver to the stack. We need two copies 155 // Push the allocated receiver to the stack. We need two copies
158 // because we may have to return the original one and the calling 156 // because we may have to return the original one and the calling
159 // conventions dictate that the called function pops the receiver. 157 // conventions dictate that the called function pops the receiver.
160 __ Push(rbx); 158 __ Push(rbx);
161 __ Push(rbx); 159 __ Push(rbx);
162 } else { 160 } else {
163 __ PushRoot(Heap::kTheHoleValueRootIndex); 161 __ PushRoot(Heap::kTheHoleValueRootIndex);
164 } 162 }
165 163
166 // Set up pointer to last argument. 164 // Set up pointer to last argument.
(...skipping 2881 matching lines...) Expand 10 before | Expand all | Expand 10 after
3048 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3046 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3049 Generate_OnStackReplacementHelper(masm, true); 3047 Generate_OnStackReplacementHelper(masm, true);
3050 } 3048 }
3051 3049
3052 #undef __ 3050 #undef __
3053 3051
3054 } // namespace internal 3052 } // namespace internal
3055 } // namespace v8 3053 } // namespace v8
3056 3054
3057 #endif // V8_TARGET_ARCH_X64 3055 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698