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

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

Issue 2153433002: [Interpreter] Collect type feedback for 'new' in the bytecode handler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase. Created 4 years, 5 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/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 RelocInfo::CODE_TARGET); 1206 RelocInfo::CODE_TARGET);
1207 } else { 1207 } else {
1208 DCHECK_EQ(function_type, CallableType::kAny); 1208 DCHECK_EQ(function_type, CallableType::kAny);
1209 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, 1209 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny,
1210 tail_call_mode), 1210 tail_call_mode),
1211 RelocInfo::CODE_TARGET); 1211 RelocInfo::CODE_TARGET);
1212 } 1212 }
1213 } 1213 }
1214 1214
1215 // static 1215 // static
1216 void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) { 1216 void Builtins::Generate_InterpreterPushArgsAndConstructImpl(
1217 MacroAssembler* masm, CallableType construct_type) {
1217 // ----------- S t a t e ------------- 1218 // ----------- S t a t e -------------
1218 // -- x0 : argument count (not including receiver) 1219 // -- x0 : argument count (not including receiver)
1219 // -- x3 : new target 1220 // -- x3 : new target
1220 // -- x1 : constructor to call 1221 // -- x1 : constructor to call
1221 // -- x2 : address of the first argument 1222 // -- x2 : address of the first argument
1222 // ----------------------------------- 1223 // -----------------------------------
1223 1224
1224 // Find the address of the last argument. 1225 // Find the address of the last argument.
1225 __ add(x5, x0, Operand(1)); // Add one for receiver (to be constructed). 1226 __ add(x5, x0, Operand(1)); // Add one for receiver (to be constructed).
1226 __ lsl(x5, x5, kPointerSizeLog2); 1227 __ lsl(x5, x5, kPointerSizeLog2);
(...skipping 10 matching lines...) Expand all
1237 // Push the arguments. 1238 // Push the arguments.
1238 __ B(&loop_check); 1239 __ B(&loop_check);
1239 __ Bind(&loop_header); 1240 __ Bind(&loop_header);
1240 // TODO(rmcilroy): Push two at a time once we ensure we keep stack aligned. 1241 // TODO(rmcilroy): Push two at a time once we ensure we keep stack aligned.
1241 __ Ldr(x5, MemOperand(x2, -kPointerSize, PostIndex)); 1242 __ Ldr(x5, MemOperand(x2, -kPointerSize, PostIndex));
1242 __ Str(x5, MemOperand(x6, -kPointerSize, PreIndex)); 1243 __ Str(x5, MemOperand(x6, -kPointerSize, PreIndex));
1243 __ Bind(&loop_check); 1244 __ Bind(&loop_check);
1244 __ Cmp(x6, x4); 1245 __ Cmp(x6, x4);
1245 __ B(gt, &loop_header); 1246 __ B(gt, &loop_header);
1246 1247
1247 // Call the constructor with x0, x1, and x3 unmodified. 1248 if (construct_type == CallableType::kJSFunction) {
1248 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); 1249 // TODO(mythria): Change this when allocation site feedback is available.
1250 // ConstructFunction initializes allocation site to undefined.
1251 __ Jump(masm->isolate()->builtins()->ConstructFunction(),
1252 RelocInfo::CODE_TARGET);
1253 } else {
1254 DCHECK_EQ(construct_type, CallableType::kAny);
1255 // Call the constructor with x0, x1, and x3 unmodified.
1256 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET);
1257 }
1249 } 1258 }
1250 1259
1251 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) { 1260 void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
1252 // Set the return address to the correct point in the interpreter entry 1261 // Set the return address to the correct point in the interpreter entry
1253 // trampoline. 1262 // trampoline.
1254 Smi* interpreter_entry_return_pc_offset( 1263 Smi* interpreter_entry_return_pc_offset(
1255 masm->isolate()->heap()->interpreter_entry_return_pc_offset()); 1264 masm->isolate()->heap()->interpreter_entry_return_pc_offset());
1256 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::FromInt(0)); 1265 DCHECK_NE(interpreter_entry_return_pc_offset, Smi::FromInt(0));
1257 __ LoadObject(x1, masm->isolate()->builtins()->InterpreterEntryTrampoline()); 1266 __ LoadObject(x1, masm->isolate()->builtins()->InterpreterEntryTrampoline());
1258 __ Add(lr, x1, Operand(interpreter_entry_return_pc_offset->value() + 1267 __ Add(lr, x1, Operand(interpreter_entry_return_pc_offset->value() +
(...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after
3011 __ Unreachable(); 3020 __ Unreachable();
3012 } 3021 }
3013 } 3022 }
3014 3023
3015 #undef __ 3024 #undef __
3016 3025
3017 } // namespace internal 3026 } // namespace internal
3018 } // namespace v8 3027 } // namespace v8
3019 3028
3020 #endif // V8_TARGET_ARCH_ARM 3029 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698