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

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

Issue 2571563004: [Turbofan] Implement super calls with spread bytecode in assembly code. (Closed)
Patch Set: MIPS64 port 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 | « src/builtins/ppc/builtins-ppc.cc ('k') | src/builtins/x64/builtins-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_S390 5 #if V8_TARGET_ARCH_S390
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 __ bind(&stack_overflow); 1201 __ bind(&stack_overflow);
1202 { 1202 {
1203 __ TailCallRuntime(Runtime::kThrowStackOverflow); 1203 __ TailCallRuntime(Runtime::kThrowStackOverflow);
1204 // Unreachable Code. 1204 // Unreachable Code.
1205 __ bkpt(0); 1205 __ bkpt(0);
1206 } 1206 }
1207 } 1207 }
1208 1208
1209 // static 1209 // static
1210 void Builtins::Generate_InterpreterPushArgsAndConstructImpl( 1210 void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
1211 MacroAssembler* masm, CallableType construct_type) { 1211 MacroAssembler* masm, PushArgsConstructMode mode) {
1212 // ----------- S t a t e ------------- 1212 // ----------- S t a t e -------------
1213 // -- r2 : argument count (not including receiver) 1213 // -- r2 : argument count (not including receiver)
1214 // -- r5 : new target 1214 // -- r5 : new target
1215 // -- r3 : constructor to call 1215 // -- r3 : constructor to call
1216 // -- r4 : allocation site feedback if available, undefined otherwise. 1216 // -- r4 : allocation site feedback if available, undefined otherwise.
1217 // -- r6 : address of the first argument 1217 // -- r6 : address of the first argument
1218 // ----------------------------------- 1218 // -----------------------------------
1219 Label stack_overflow; 1219 Label stack_overflow;
1220 1220
1221 // Push a slot for the receiver to be constructed. 1221 // Push a slot for the receiver to be constructed.
1222 __ LoadImmP(r0, Operand::Zero()); 1222 __ LoadImmP(r0, Operand::Zero());
1223 __ push(r0); 1223 __ push(r0);
1224 1224
1225 // Push the arguments (skip if none). 1225 // Push the arguments (skip if none).
1226 Label skip; 1226 Label skip;
1227 __ CmpP(r2, Operand::Zero()); 1227 __ CmpP(r2, Operand::Zero());
1228 __ beq(&skip); 1228 __ beq(&skip);
1229 Generate_InterpreterPushArgs(masm, r2, r6, r2, r7, &stack_overflow); 1229 Generate_InterpreterPushArgs(masm, r2, r6, r2, r7, &stack_overflow);
1230 __ bind(&skip); 1230 __ bind(&skip);
1231 1231
1232 __ AssertUndefinedOrAllocationSite(r4, r7); 1232 __ AssertUndefinedOrAllocationSite(r4, r7);
1233 if (construct_type == CallableType::kJSFunction) { 1233 if (mode == PushArgsConstructMode::kJSFunction) {
1234 __ AssertFunction(r3); 1234 __ AssertFunction(r3);
1235 1235
1236 // Tail call to the function-specific construct stub (still in the caller 1236 // Tail call to the function-specific construct stub (still in the caller
1237 // context at this point). 1237 // context at this point).
1238 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); 1238 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
1239 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kConstructStubOffset)); 1239 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kConstructStubOffset));
1240 // Jump to the construct function. 1240 // Jump to the construct function.
1241 __ AddP(ip, r6, Operand(Code::kHeaderSize - kHeapObjectTag)); 1241 __ AddP(ip, r6, Operand(Code::kHeaderSize - kHeapObjectTag));
1242 __ Jump(ip); 1242 __ Jump(ip);
1243 1243 } else if (mode == PushArgsConstructMode::kWithFinalSpread) {
1244 // Call the constructor with r2, r3, and r5 unmodified.
1245 __ Jump(masm->isolate()->builtins()->ConstructWithSpread(),
1246 RelocInfo::CODE_TARGET);
1244 } else { 1247 } else {
1245 DCHECK_EQ(construct_type, CallableType::kAny); 1248 DCHECK_EQ(PushArgsConstructMode::kOther, mode);
1246 // Call the constructor with r2, r3, and r5 unmodified. 1249 // Call the constructor with r2, r3, and r5 unmodified.
1247 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); 1250 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
1248 } 1251 }
1249 1252
1250 __ bind(&stack_overflow); 1253 __ bind(&stack_overflow);
1251 { 1254 {
1252 __ TailCallRuntime(Runtime::kThrowStackOverflow); 1255 __ TailCallRuntime(Runtime::kThrowStackOverflow);
1253 // Unreachable Code. 1256 // Unreachable Code.
1254 __ bkpt(0); 1257 __ bkpt(0);
1255 } 1258 }
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 __ bkpt(0); 2979 __ bkpt(0);
2977 } 2980 }
2978 } 2981 }
2979 2982
2980 #undef __ 2983 #undef __
2981 2984
2982 } // namespace internal 2985 } // namespace internal
2983 } // namespace v8 2986 } // namespace v8
2984 2987
2985 #endif // V8_TARGET_ARCH_S390 2988 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698