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" |
11 #include "src/compiler/opcodes.h" | 11 #include "src/compiler/opcodes.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 namespace compiler { | 15 namespace compiler { |
16 | 16 |
17 // Forward declarations. | 17 // Forward declarations. |
18 class CommonOperatorBuilder; | 18 class CommonOperatorBuilder; |
19 class JSGraph; | 19 class JSGraph; |
20 class MachineOperatorBuilder; | 20 class MachineOperatorBuilder; |
21 class Linkage; | 21 class Linkage; |
22 | 22 |
23 | 23 |
24 // Lowers JS-level operators to runtime and IC calls in the "generic" case. | 24 // Lowers JS-level operators to runtime and IC calls in the "generic" case. |
25 class JSGenericLowering FINAL : public Reducer { | 25 class JSGenericLowering final : public Reducer { |
26 public: | 26 public: |
27 JSGenericLowering(bool is_typing_enabled, JSGraph* jsgraph); | 27 JSGenericLowering(bool is_typing_enabled, JSGraph* jsgraph); |
28 ~JSGenericLowering() FINAL; | 28 ~JSGenericLowering() final; |
29 | 29 |
30 Reduction Reduce(Node* node) FINAL; | 30 Reduction Reduce(Node* node) final; |
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); | 39 void ReplaceWithCompareIC(Node* node, Token::Value token); |
40 void ReplaceWithStubCall(Node* node, Callable c, CallDescriptor::Flags flags); | 40 void ReplaceWithStubCall(Node* node, Callable c, CallDescriptor::Flags flags); |
(...skipping 13 matching lines...) Expand all Loading... |
54 private: | 54 private: |
55 bool const is_typing_enabled_; | 55 bool const is_typing_enabled_; |
56 JSGraph* const jsgraph_; | 56 JSGraph* const jsgraph_; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace compiler | 59 } // namespace compiler |
60 } // namespace internal | 60 } // namespace internal |
61 } // namespace v8 | 61 } // namespace v8 |
62 | 62 |
63 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ | 63 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ |
OLD | NEW |