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

Side by Side Diff: test/unittests/compiler/raw-machine-assembler.h

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: Fix argument slots. Created 5 years, 6 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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
7 7
8 #include "src/compiler/common-operator.h" 8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/graph-builder.h" 9 #include "src/compiler/graph-builder.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 Label** case_labels, size_t case_count); 464 Label** case_labels, size_t case_count);
465 // Call through CallFunctionStub with lazy deopt and frame-state. 465 // Call through CallFunctionStub with lazy deopt and frame-state.
466 Node* CallFunctionStub0(Node* function, Node* receiver, Node* context, 466 Node* CallFunctionStub0(Node* function, Node* receiver, Node* context,
467 Node* frame_state, CallFunctionFlags flags); 467 Node* frame_state, CallFunctionFlags flags);
468 // Call to a JS function with zero parameters. 468 // Call to a JS function with zero parameters.
469 Node* CallJS0(Node* function, Node* receiver, Node* context, 469 Node* CallJS0(Node* function, Node* receiver, Node* context,
470 Node* frame_state); 470 Node* frame_state);
471 // Call to a runtime function with zero parameters. 471 // Call to a runtime function with zero parameters.
472 Node* CallRuntime1(Runtime::FunctionId function, Node* arg0, Node* context, 472 Node* CallRuntime1(Runtime::FunctionId function, Node* arg0, Node* context,
473 Node* frame_state); 473 Node* frame_state);
474 // Call to a C function with zero parameters.
475 Node* CallCFunction0(MachineType return_type, Node* function);
476 // Call to a C function with one parameter.
477 Node* CallCFunction1(MachineType return_type, MachineType arg0_type,
478 Node* function, Node* arg0);
479 // Call to a C function with two parameters.
480 Node* CallCFunction2(MachineType return_type, MachineType arg0_type,
481 MachineType arg1_type, Node* function, Node* arg0,
482 Node* arg1);
483 // Call to a C function with eight parameters.
484 Node* CallCFunction8(MachineType return_type, MachineType arg0_type,
485 MachineType arg1_type, MachineType arg2_type,
486 MachineType arg3_type, MachineType arg4_type,
487 MachineType arg5_type, MachineType arg6_type,
488 MachineType arg7_type, Node* function, Node* arg0,
489 Node* arg1, Node* arg2, Node* arg3, Node* arg4,
490 Node* arg5, Node* arg6, Node* arg7);
474 void Return(Node* value); 491 void Return(Node* value);
475 void Bind(Label* label); 492 void Bind(Label* label);
476 void Deoptimize(Node* state); 493 void Deoptimize(Node* state);
477 494
478 // Variables. 495 // Variables.
479 Node* Phi(MachineType type, Node* n1, Node* n2) { 496 Node* Phi(MachineType type, Node* n1, Node* n2) {
480 return NewNode(common()->Phi(type, 2), n1, n2); 497 return NewNode(common()->Phi(type, 2), n1, n2);
481 } 498 }
482 Node* Phi(MachineType type, Node* n1, Node* n2, Node* n3) { 499 Node* Phi(MachineType type, Node* n1, Node* n2, Node* n3) {
483 return NewNode(common()->Phi(type, 3), n1, n2, n3); 500 return NewNode(common()->Phi(type, 3), n1, n2, n3);
(...skipping 30 matching lines...) Expand all
514 BasicBlock* current_block_; 531 BasicBlock* current_block_;
515 532
516 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); 533 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler);
517 }; 534 };
518 535
519 } // namespace compiler 536 } // namespace compiler
520 } // namespace internal 537 } // namespace internal
521 } // namespace v8 538 } // namespace v8
522 539
523 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 540 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698