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

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

Issue 2302343002: PPC/s390: [Interpreter] Collect type feedback for 'new' in the bytecode handler (Closed)
Patch Set: Created 4 years, 3 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/ppc/interface-descriptors-ppc.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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 RelocInfo::CODE_TARGET); 1229 RelocInfo::CODE_TARGET);
1230 } else { 1230 } else {
1231 DCHECK_EQ(function_type, CallableType::kAny); 1231 DCHECK_EQ(function_type, CallableType::kAny);
1232 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, 1232 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny,
1233 tail_call_mode), 1233 tail_call_mode),
1234 RelocInfo::CODE_TARGET); 1234 RelocInfo::CODE_TARGET);
1235 } 1235 }
1236 } 1236 }
1237 1237
1238 // static 1238 // static
1239 void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) { 1239 void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
1240 MacroAssembler* masm, CallableType construct_type) {
1240 // ----------- S t a t e ------------- 1241 // ----------- S t a t e -------------
1241 // -- r2 : argument count (not including receiver) 1242 // -- r2 : argument count (not including receiver)
1242 // -- r5 : new target 1243 // -- r5 : new target
1243 // -- r3 : constructor to call 1244 // -- r3 : constructor to call
1244 // -- r4 : address of the first argument 1245 // -- r4 : allocation site feedback if available, undefined otherwise.
1246 // -- r6 : address of the first argument
1245 // ----------------------------------- 1247 // -----------------------------------
1246 1248
1247 // Push a slot for the receiver to be constructed. 1249 // Push a slot for the receiver to be constructed.
1248 __ LoadImmP(r0, Operand::Zero()); 1250 __ LoadImmP(r0, Operand::Zero());
1249 __ push(r0); 1251 __ push(r0);
1250 1252
1251 // Push the arguments (skip if none). 1253 // Push the arguments (skip if none).
1252 Label skip; 1254 Label skip;
1253 __ CmpP(r2, Operand::Zero()); 1255 __ CmpP(r2, Operand::Zero());
1254 __ beq(&skip); 1256 __ beq(&skip);
1255 Generate_InterpreterPushArgs(masm, r4, r2, r6); 1257 Generate_InterpreterPushArgs(masm, r6, r2, r7);
1256 __ bind(&skip); 1258 __ bind(&skip);
1257 1259
1258 // Call the constructor with r2, r3, and r5 unmodified. 1260 __ AssertUndefinedOrAllocationSite(r4, r7);
1259 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); 1261 if (construct_type == CallableType::kJSFunction) {
1262 __ AssertFunction(r3);
1263
1264 // Tail call to the function-specific construct stub (still in the caller
1265 // context at this point).
1266 __ LoadP(r6, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
1267 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kConstructStubOffset));
1268 // Jump to the construct function.
1269 __ AddP(ip, r6, Operand(Code::kHeaderSize - kHeapObjectTag));
1270 __ Jump(ip);
1271
1272 } else {
1273 DCHECK_EQ(construct_type, CallableType::kAny);
1274 // Call the constructor with r2, r3, and r5 unmodified.
1275 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
1276 }
1260 } 1277 }
1261 1278
1262 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { 1279 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
1263 // Set the return address to the correct point in the interpreter entry 1280 // Set the return address to the correct point in the interpreter entry
1264 // trampoline. 1281 // trampoline.
1265 Smi* interpreter_entry_return_pc_offset( 1282 Smi* interpreter_entry_return_pc_offset(
1266 masm->isolate()->heap()->interpreter_entry_return_pc_offset()); 1283 masm->isolate()->heap()->interpreter_entry_return_pc_offset());
1267 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::FromInt(0)); 1284 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::FromInt(0));
1268 __ Move(r4, masm->isolate()->builtins()->InterpreterEntryTrampoline()); 1285 __ Move(r4, masm->isolate()->builtins()->InterpreterEntryTrampoline());
1269 __ AddP(r14, r4, Operand(interpreter_entry_return_pc_offset->value() + 1286 __ AddP(r14, r4, Operand(interpreter_entry_return_pc_offset->value() +
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
3031 __ bkpt(0); 3048 __ bkpt(0);
3032 } 3049 }
3033 } 3050 }
3034 3051
3035 #undef __ 3052 #undef __
3036 3053
3037 } // namespace internal 3054 } // namespace internal
3038 } // namespace v8 3055 } // namespace v8
3039 3056
3040 #endif // V8_TARGET_ARCH_S390 3057 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | src/ppc/interface-descriptors-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698