| 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/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class JSGenericLowering : public Reducer { | 26 class JSGenericLowering : public Reducer { |
| 27 public: | 27 public: |
| 28 JSGenericLowering(CompilationInfo* info, JSGraph* graph); | 28 JSGenericLowering(CompilationInfo* info, JSGraph* graph); |
| 29 virtual ~JSGenericLowering() {} | 29 virtual ~JSGenericLowering() {} |
| 30 | 30 |
| 31 virtual Reduction Reduce(Node* node); | 31 virtual Reduction Reduce(Node* node); |
| 32 | 32 |
| 33 protected: | 33 protected: |
| 34 #define DECLARE_LOWER(x) void Lower##x(Node* node); | 34 #define DECLARE_LOWER(x) void Lower##x(Node* node); |
| 35 // Dispatched depending on opcode. | 35 // Dispatched depending on opcode. |
| 36 ALL_OP_LIST(DECLARE_LOWER) | 36 JS_OP_LIST(DECLARE_LOWER) |
| 37 #undef DECLARE_LOWER | 37 #undef DECLARE_LOWER |
| 38 | 38 |
| 39 // Helpers to create new constant nodes. | 39 // Helpers to create new constant nodes. |
| 40 Node* SmiConstant(int immediate); | 40 Node* SmiConstant(int immediate); |
| 41 Node* Int32Constant(int immediate); | 41 Node* Int32Constant(int immediate); |
| 42 Node* CodeConstant(Handle<Code> code); | 42 Node* CodeConstant(Handle<Code> code); |
| 43 Node* FunctionConstant(Handle<JSFunction> function); | 43 Node* FunctionConstant(Handle<JSFunction> function); |
| 44 Node* ExternalConstant(ExternalReference ref); | 44 Node* ExternalConstant(ExternalReference ref); |
| 45 | 45 |
| 46 // Helpers to patch existing nodes in the graph. | 46 // Helpers to patch existing nodes in the graph. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 68 Linkage* linkage_; | 68 Linkage* linkage_; |
| 69 | 69 |
| 70 bool TryLowerDirectJSCall(Node* node); | 70 bool TryLowerDirectJSCall(Node* node); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace compiler | 73 } // namespace compiler |
| 74 } // namespace internal | 74 } // namespace internal |
| 75 } // namespace v8 | 75 } // namespace v8 |
| 76 | 76 |
| 77 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ | 77 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ |
| OLD | NEW |