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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 1412443003: [turbofan] Introduce lazy bailout, masked as a call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable test Created 5 years, 2 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/compiler/instruction-codes.h ('k') | src/compiler/linkage.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 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 #include "src/compiler/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 (call_address_immediate && 338 (call_address_immediate &&
339 callee->opcode() == IrOpcode::kExternalConstant) 339 callee->opcode() == IrOpcode::kExternalConstant)
340 ? g.UseImmediate(callee) 340 ? g.UseImmediate(callee)
341 : g.UseRegister(callee)); 341 : g.UseRegister(callee));
342 break; 342 break;
343 case CallDescriptor::kCallJSFunction: 343 case CallDescriptor::kCallJSFunction:
344 buffer->instruction_args.push_back( 344 buffer->instruction_args.push_back(
345 g.UseLocation(callee, buffer->descriptor->GetInputLocation(0), 345 g.UseLocation(callee, buffer->descriptor->GetInputLocation(0),
346 buffer->descriptor->GetInputType(0))); 346 buffer->descriptor->GetInputType(0)));
347 break; 347 break;
348 case CallDescriptor::kLazyBailout:
349 // The target is ignored, but we still need to pass a value here.
350 buffer->instruction_args.push_back(g.UseImmediate(callee));
351 break;
348 } 352 }
349 DCHECK_EQ(1u, buffer->instruction_args.size()); 353 DCHECK_EQ(1u, buffer->instruction_args.size());
350 354
351 // If the call needs a frame state, we insert the state information as 355 // If the call needs a frame state, we insert the state information as
352 // follows (n is the number of value inputs to the frame state): 356 // follows (n is the number of value inputs to the frame state):
353 // arg 1 : deoptimization id. 357 // arg 1 : deoptimization id.
354 // arg 2 - arg (n + 1) : value inputs to the frame state. 358 // arg 2 - arg (n + 1) : value inputs to the frame state.
355 if (buffer->frame_state_descriptor != NULL) { 359 if (buffer->frame_state_descriptor != NULL) {
356 InstructionSequence::StateId state_id = 360 InstructionSequence::StateId state_id =
357 sequence()->AddFrameStateDescriptor(buffer->frame_state_descriptor); 361 sequence()->AddFrameStateDescriptor(buffer->frame_state_descriptor);
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 for (StateValuesAccess::TypedNode input_node : StateValuesAccess(stack)) { 1157 for (StateValuesAccess::TypedNode input_node : StateValuesAccess(stack)) {
1154 inputs->push_back(OperandForDeopt(&g, input_node.node, kind)); 1158 inputs->push_back(OperandForDeopt(&g, input_node.node, kind));
1155 descriptor->SetType(value_index++, input_node.type); 1159 descriptor->SetType(value_index++, input_node.type);
1156 } 1160 }
1157 DCHECK(value_index == descriptor->GetSize()); 1161 DCHECK(value_index == descriptor->GetSize());
1158 } 1162 }
1159 1163
1160 } // namespace compiler 1164 } // namespace compiler
1161 } // namespace internal 1165 } // namespace internal
1162 } // namespace v8 1166 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-codes.h ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698