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_BYTECODE_GRAPH_BUILDER_H_ | 5 #ifndef V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
7 | 7 |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/interpreter/bytecode-array-iterator.h" | 10 #include "src/interpreter/bytecode-array-iterator.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 void VisitBytecodes(); | 33 void VisitBytecodes(); |
34 | 34 |
35 Node* LoadAccumulator(Node* value); | 35 Node* LoadAccumulator(Node* value); |
36 | 36 |
37 // Get or create the node that represents the outer function closure. | 37 // Get or create the node that represents the outer function closure. |
38 Node* GetFunctionClosure(); | 38 Node* GetFunctionClosure(); |
39 | 39 |
40 // Get or create the node that represents the outer function context. | 40 // Get or create the node that represents the outer function context. |
41 Node* GetFunctionContext(); | 41 Node* GetFunctionContext(); |
42 | 42 |
43 // Builders for accessing an immutable object field. | 43 // Builder for accessing a (potentially immutable) object field. |
| 44 Node* BuildLoadObjectField(Node* object, int offset); |
44 Node* BuildLoadImmutableObjectField(Node* object, int offset); | 45 Node* BuildLoadImmutableObjectField(Node* object, int offset); |
45 | 46 |
46 // Builder for accessing type feedback vector. | 47 // Builder for accessing type feedback vector. |
47 Node* BuildLoadFeedbackVector(); | 48 Node* BuildLoadFeedbackVector(); |
48 | 49 |
| 50 // Builder for loading the global object. |
| 51 Node* BuildLoadGlobalObject(); |
| 52 |
| 53 // Builder for loading the a native context field. |
| 54 Node* BuildLoadNativeContextField(int index); |
| 55 |
49 // Helper function for creating a pair containing type feedback vector and | 56 // Helper function for creating a pair containing type feedback vector and |
50 // a feedback slot. | 57 // a feedback slot. |
51 VectorSlotPair CreateVectorSlotPair(int slot_id); | 58 VectorSlotPair CreateVectorSlotPair(int slot_id); |
52 | 59 |
53 // Replaces the frame state inputs with empty frame states. | 60 // Replaces the frame state inputs with empty frame states. |
54 void AddEmptyFrameStateInputs(Node* node); | 61 void AddEmptyFrameStateInputs(Node* node); |
55 | 62 |
56 void set_environment(Environment* env) { environment_ = env; } | 63 void set_environment(Environment* env) { environment_ = env; } |
57 const Environment* environment() const { return environment_; } | 64 const Environment* environment() const { return environment_; } |
58 Environment* environment() { return environment_; } | 65 Environment* environment() { return environment_; } |
(...skipping 25 matching lines...) Expand all Loading... |
84 | 91 |
85 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, | 92 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, |
86 bool incomplete); | 93 bool incomplete); |
87 | 94 |
88 Node* MergeControl(Node* control, Node* other); | 95 Node* MergeControl(Node* control, Node* other); |
89 | 96 |
90 Node** EnsureInputBufferSize(int size); | 97 Node** EnsureInputBufferSize(int size); |
91 | 98 |
92 void UpdateControlDependencyToLeaveFunction(Node* exit); | 99 void UpdateControlDependencyToLeaveFunction(Node* exit); |
93 | 100 |
94 Node* ProcessCallArguments(const Operator* call_op, | 101 Node* ProcessCallArguments(const Operator* call_op, Node* callee, |
95 interpreter::Register callee, | |
96 interpreter::Register receiver, size_t arity); | 102 interpreter::Register receiver, size_t arity); |
| 103 Node* ProcessCallNewArguments(const Operator* call_new_op, |
| 104 interpreter::Register callee, |
| 105 interpreter::Register first_arg, size_t arity); |
| 106 Node* ProcessCallRuntimeArguments(const Operator* call_runtime_op, |
| 107 interpreter::Register first_arg, |
| 108 size_t arity); |
97 | 109 |
98 void BuildLoadGlobal(const interpreter::BytecodeArrayIterator& iterator, | 110 void BuildLoadGlobal(const interpreter::BytecodeArrayIterator& iterator, |
99 TypeofMode typeof_mode); | 111 TypeofMode typeof_mode); |
100 void BuildStoreGlobal(const interpreter::BytecodeArrayIterator& iterator); | 112 void BuildStoreGlobal(const interpreter::BytecodeArrayIterator& iterator); |
101 void BuildNamedLoad(const interpreter::BytecodeArrayIterator& iterator); | 113 void BuildNamedLoad(const interpreter::BytecodeArrayIterator& iterator); |
102 void BuildKeyedLoad(const interpreter::BytecodeArrayIterator& iterator); | 114 void BuildKeyedLoad(const interpreter::BytecodeArrayIterator& iterator); |
103 void BuildNamedStore(const interpreter::BytecodeArrayIterator& iterator); | 115 void BuildNamedStore(const interpreter::BytecodeArrayIterator& iterator); |
104 void BuildKeyedStore(const interpreter::BytecodeArrayIterator& iterator); | 116 void BuildKeyedStore(const interpreter::BytecodeArrayIterator& iterator); |
105 void BuildCall(const interpreter::BytecodeArrayIterator& iterator); | 117 void BuildCall(const interpreter::BytecodeArrayIterator& iterator); |
106 void BuildBinaryOp(const Operator* op, | 118 void BuildBinaryOp(const Operator* op, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 NodeVector values_; | 221 NodeVector values_; |
210 int register_base_; | 222 int register_base_; |
211 }; | 223 }; |
212 | 224 |
213 | 225 |
214 } // namespace compiler | 226 } // namespace compiler |
215 } // namespace internal | 227 } // namespace internal |
216 } // namespace v8 | 228 } // namespace v8 |
217 | 229 |
218 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 230 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |