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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Helpers to replace existing nodes with a generic call. | 44 // Helpers to replace existing nodes with a generic call. |
45 void ReplaceWithCompareIC(Node* node, Token::Value token); | 45 void ReplaceWithCompareIC(Node* node, Token::Value token); |
46 void ReplaceWithStubCall(Node* node, Callable c, CallDescriptor::Flags flags); | 46 void ReplaceWithStubCall(Node* node, Callable c, CallDescriptor::Flags flags); |
47 void ReplaceWithBuiltinCall(Node* node, Builtins::JavaScript id, int args); | 47 void ReplaceWithBuiltinCall(Node* node, Builtins::JavaScript id, int args); |
48 void ReplaceWithRuntimeCall(Node* node, Runtime::FunctionId f, int args = -1); | 48 void ReplaceWithRuntimeCall(Node* node, Runtime::FunctionId f, int args = -1); |
49 | 49 |
50 // Helper for optimization of JSCallFunction. | 50 // Helper for optimization of JSCallFunction. |
51 bool TryLowerDirectJSCall(Node* node); | 51 bool TryLowerDirectJSCall(Node* node); |
52 | 52 |
53 Zone* zone() const { return graph()->zone(); } | 53 Zone* zone() const { return graph()->zone(); } |
54 Isolate* isolate() const { return zone()->isolate(); } | 54 Isolate* isolate() const { return info_->isolate(); } |
55 JSGraph* jsgraph() const { return jsgraph_; } | 55 JSGraph* jsgraph() const { return jsgraph_; } |
56 Graph* graph() const { return jsgraph()->graph(); } | 56 Graph* graph() const { return jsgraph()->graph(); } |
57 Linkage* linkage() const { return linkage_; } | 57 Linkage* linkage() const { return linkage_; } |
58 CompilationInfo* info() const { return info_; } | 58 CompilationInfo* info() const { return info_; } |
59 CommonOperatorBuilder* common() const { return jsgraph()->common(); } | 59 CommonOperatorBuilder* common() const { return jsgraph()->common(); } |
60 MachineOperatorBuilder* machine() const { return jsgraph()->machine(); } | 60 MachineOperatorBuilder* machine() const { return jsgraph()->machine(); } |
61 | 61 |
62 private: | 62 private: |
63 CompilationInfo* info_; | 63 CompilationInfo* info_; |
64 JSGraph* jsgraph_; | 64 JSGraph* jsgraph_; |
65 Linkage* linkage_; | 65 Linkage* linkage_; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace compiler | 68 } // namespace compiler |
69 } // namespace internal | 69 } // namespace internal |
70 } // namespace v8 | 70 } // namespace v8 |
71 | 71 |
72 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ | 72 #endif // V8_COMPILER_JS_GENERIC_LOWERING_H_ |
OLD | NEW |