| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_CODE_STUB_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
| 6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
| 7 | 7 |
| 8 // Clients of this interface shouldn't depend on lots of compiler internals. | 8 // Clients of this interface shouldn't depend on lots of compiler internals. |
| 9 // Do not include anything from src/compiler here! | 9 // Do not include anything from src/compiler here! |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| 11 #include "src/builtins.h" | 11 #include "src/builtins.h" |
| 12 #include "src/runtime/runtime.h" | 12 #include "src/runtime/runtime.h" |
| 13 #include "src/zone-containers.h" | |
| 14 | 13 |
| 15 namespace v8 { | 14 namespace v8 { |
| 16 namespace internal { | 15 namespace internal { |
| 17 | 16 |
| 18 class CallInterfaceDescriptor; | 17 class CallInterfaceDescriptor; |
| 19 class Isolate; | 18 class Isolate; |
| 20 class Zone; | 19 class Zone; |
| 21 | 20 |
| 22 namespace compiler { | 21 namespace compiler { |
| 23 | 22 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 Node* CallRuntime(Runtime::FunctionId function_id, Node* context, Node* arg1, | 63 Node* CallRuntime(Runtime::FunctionId function_id, Node* context, Node* arg1, |
| 65 Node* arg2); | 64 Node* arg2); |
| 66 | 65 |
| 67 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, | 66 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, |
| 68 Node* arg1); | 67 Node* arg1); |
| 69 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, | 68 Node* TailCallRuntime(Runtime::FunctionId function_id, Node* context, |
| 70 Node* arg1, Node* arg2); | 69 Node* arg1, Node* arg2); |
| 71 | 70 |
| 72 private: | 71 private: |
| 73 friend class CodeStubAssemblerTester; | 72 friend class CodeStubAssemblerTester; |
| 74 // Close the graph. | |
| 75 void End(); | |
| 76 | 73 |
| 77 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); | 74 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
| 78 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); | 75 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
| 79 | 76 |
| 80 Node* SmiShiftBitsConstant(); | 77 Node* SmiShiftBitsConstant(); |
| 81 | 78 |
| 82 // Adds an end node of the graph. | |
| 83 void AddEndInput(Node* input); | |
| 84 | |
| 85 // Private helpers which delegate to RawMachineAssembler. | 79 // Private helpers which delegate to RawMachineAssembler. |
| 86 Graph* graph(); | 80 Graph* graph(); |
| 87 Isolate* isolate(); | 81 Isolate* isolate(); |
| 88 Zone* zone(); | 82 Zone* zone(); |
| 89 | 83 |
| 90 base::SmartPointer<RawMachineAssembler> raw_assembler_; | 84 base::SmartPointer<RawMachineAssembler> raw_assembler_; |
| 91 ZoneVector<Node*> end_nodes_; | |
| 92 Code::Kind kind_; | 85 Code::Kind kind_; |
| 93 const char* name_; | 86 const char* name_; |
| 94 bool code_generated_; | 87 bool code_generated_; |
| 95 | 88 |
| 96 DISALLOW_COPY_AND_ASSIGN(CodeStubAssembler); | 89 DISALLOW_COPY_AND_ASSIGN(CodeStubAssembler); |
| 97 }; | 90 }; |
| 98 | 91 |
| 99 } // namespace compiler | 92 } // namespace compiler |
| 100 } // namespace internal | 93 } // namespace internal |
| 101 } // namespace v8 | 94 } // namespace v8 |
| 102 | 95 |
| 103 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 96 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |