OLD | NEW |
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_JS_GENERIC_LOWERING_H_ | 5 #ifndef V8_COMPILER_JS_GENERIC_LOWERING_H_ |
6 #define V8_COMPILER_JS_GENERIC_LOWERING_H_ | 6 #define V8_COMPILER_JS_GENERIC_LOWERING_H_ |
7 | 7 |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 protected: | 32 protected: |
33 #define DECLARE_LOWER(x) void Lower##x(Node* node); | 33 #define DECLARE_LOWER(x) void Lower##x(Node* node); |
34 // Dispatched depending on opcode. | 34 // Dispatched depending on opcode. |
35 JS_OP_LIST(DECLARE_LOWER) | 35 JS_OP_LIST(DECLARE_LOWER) |
36 #undef DECLARE_LOWER | 36 #undef DECLARE_LOWER |
37 | 37 |
38 // Helpers to replace existing nodes with a generic call. | 38 // Helpers to replace existing nodes with a generic call. |
39 void ReplaceWithCompareIC(Node* node, Token::Value token, Strength strength); | 39 void ReplaceWithCompareIC(Node* node, Token::Value token, Strength strength); |
40 void ReplaceWithStubCall(Node* node, Callable c, CallDescriptor::Flags flags); | 40 void ReplaceWithStubCall(Node* node, Callable c, CallDescriptor::Flags flags); |
41 void ReplaceWithBuiltinCall(Node* node, int context_index, int args); | |
42 void ReplaceWithRuntimeCall(Node* node, Runtime::FunctionId f, int args = -1); | 41 void ReplaceWithRuntimeCall(Node* node, Runtime::FunctionId f, int args = -1); |
43 | 42 |
44 Zone* zone() const; | 43 Zone* zone() const; |
45 Isolate* isolate() const; | 44 Isolate* isolate() const; |
46 JSGraph* jsgraph() const { return jsgraph_; } | 45 JSGraph* jsgraph() const { return jsgraph_; } |
47 Graph* graph() const; | 46 Graph* graph() const; |
48 CommonOperatorBuilder* common() const; | 47 CommonOperatorBuilder* common() const; |
49 MachineOperatorBuilder* machine() const; | 48 MachineOperatorBuilder* machine() const; |
50 | 49 |
51 private: | 50 private: |
52 bool const is_typing_enabled_; | 51 bool const is_typing_enabled_; |
53 JSGraph* const jsgraph_; | 52 JSGraph* const jsgraph_; |
54 }; | 53 }; |
55 | 54 |
56 } // namespace compiler | 55 } // namespace compiler |
57 } // namespace internal | 56 } // namespace internal |
58 } // namespace v8 | 57 } // namespace v8 |
59 | 58 |
60 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ | 59 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ |
OLD | NEW |