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

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

Issue 1205023002: [turbofan] Add basic support for calling to (a subset of) C functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 switch (buffer->descriptor->kind()) { 329 switch (buffer->descriptor->kind()) {
330 case CallDescriptor::kCallCodeObject: 330 case CallDescriptor::kCallCodeObject:
331 buffer->instruction_args.push_back( 331 buffer->instruction_args.push_back(
332 (call_code_immediate && callee->opcode() == IrOpcode::kHeapConstant) 332 (call_code_immediate && callee->opcode() == IrOpcode::kHeapConstant)
333 ? g.UseImmediate(callee) 333 ? g.UseImmediate(callee)
334 : g.UseRegister(callee)); 334 : g.UseRegister(callee));
335 break; 335 break;
336 case CallDescriptor::kCallAddress: 336 case CallDescriptor::kCallAddress:
337 buffer->instruction_args.push_back( 337 buffer->instruction_args.push_back(
338 (call_address_immediate && 338 (call_address_immediate &&
339 (callee->opcode() == IrOpcode::kInt32Constant || 339 callee->opcode() == IrOpcode::kExternalConstant)
340 callee->opcode() == IrOpcode::kInt64Constant))
341 ? g.UseImmediate(callee) 340 ? g.UseImmediate(callee)
342 : g.UseRegister(callee)); 341 : g.UseRegister(callee));
343 break; 342 break;
344 case CallDescriptor::kCallJSFunction: 343 case CallDescriptor::kCallJSFunction:
345 buffer->instruction_args.push_back( 344 buffer->instruction_args.push_back(
346 g.UseLocation(callee, buffer->descriptor->GetInputLocation(0), 345 g.UseLocation(callee, buffer->descriptor->GetInputLocation(0),
347 buffer->descriptor->GetInputType(0))); 346 buffer->descriptor->GetInputType(0)));
348 break; 347 break;
349 } 348 }
350 DCHECK_EQ(1u, buffer->instruction_args.size()); 349 DCHECK_EQ(1u, buffer->instruction_args.size());
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 MachineOperatorBuilder::Flags 1154 MachineOperatorBuilder::Flags
1156 InstructionSelector::SupportedMachineOperatorFlags() { 1155 InstructionSelector::SupportedMachineOperatorFlags() {
1157 return MachineOperatorBuilder::Flag::kNoFlags; 1156 return MachineOperatorBuilder::Flag::kNoFlags;
1158 } 1157 }
1159 1158
1160 #endif // !V8_TURBOFAN_BACKEND 1159 #endif // !V8_TURBOFAN_BACKEND
1161 1160
1162 } // namespace compiler 1161 } // namespace compiler
1163 } // namespace internal 1162 } // namespace internal
1164 } // namespace v8 1163 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698