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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 Node* NewNode(const Operator* op, Node* n1, Node* n2) { | 70 Node* NewNode(const Operator* op, Node* n1, Node* n2) { |
71 Node* buffer[] = {n1, n2}; | 71 Node* buffer[] = {n1, n2}; |
72 return MakeNode(op, arraysize(buffer), buffer, false); | 72 return MakeNode(op, arraysize(buffer), buffer, false); |
73 } | 73 } |
74 | 74 |
75 Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3) { | 75 Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3) { |
76 Node* buffer[] = {n1, n2, n3}; | 76 Node* buffer[] = {n1, n2, n3}; |
77 return MakeNode(op, arraysize(buffer), buffer, false); | 77 return MakeNode(op, arraysize(buffer), buffer, false); |
78 } | 78 } |
79 | 79 |
| 80 Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4) { |
| 81 Node* buffer[] = {n1, n2, n3, n4}; |
| 82 return MakeNode(op, arraysize(buffer), buffer, false); |
| 83 } |
| 84 |
80 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, | 85 Node* MakeNode(const Operator* op, int value_input_count, Node** value_inputs, |
81 bool incomplete); | 86 bool incomplete); |
82 | 87 |
83 Node* MergeControl(Node* control, Node* other); | 88 Node* MergeControl(Node* control, Node* other); |
84 | 89 |
85 Node** EnsureInputBufferSize(int size); | 90 Node** EnsureInputBufferSize(int size); |
86 | 91 |
87 void UpdateControlDependencyToLeaveFunction(Node* exit); | 92 void UpdateControlDependencyToLeaveFunction(Node* exit); |
88 | 93 |
89 Node* ProcessCallArguments(const Operator* call_op, | 94 Node* ProcessCallArguments(const Operator* call_op, |
90 interpreter::Register callee, | 95 interpreter::Register callee, |
91 interpreter::Register receiver, size_t arity); | 96 interpreter::Register receiver, size_t arity); |
92 | 97 |
93 void BuildLoadGlobal(const interpreter::BytecodeArrayIterator& iterator, | 98 void BuildLoadGlobal(const interpreter::BytecodeArrayIterator& iterator, |
94 TypeofMode typeof_mode); | 99 TypeofMode typeof_mode); |
95 void BuildStoreGlobal(const interpreter::BytecodeArrayIterator& iterator); | 100 void BuildStoreGlobal(const interpreter::BytecodeArrayIterator& iterator); |
96 void BuildNamedLoad(const interpreter::BytecodeArrayIterator& iterator); | 101 void BuildNamedLoad(const interpreter::BytecodeArrayIterator& iterator); |
| 102 void BuildKeyedLoad(const interpreter::BytecodeArrayIterator& iterator); |
| 103 void BuildNamedStore(const interpreter::BytecodeArrayIterator& iterator); |
| 104 void BuildKeyedStore(const interpreter::BytecodeArrayIterator& iterator); |
97 void BuildCall(const interpreter::BytecodeArrayIterator& iterator); | 105 void BuildCall(const interpreter::BytecodeArrayIterator& iterator); |
98 void BuildBinaryOp(const Operator* op, | 106 void BuildBinaryOp(const Operator* op, |
99 const interpreter::BytecodeArrayIterator& iterator); | 107 const interpreter::BytecodeArrayIterator& iterator); |
100 void BuildDelete(const interpreter::BytecodeArrayIterator& iterator); | 108 void BuildDelete(const interpreter::BytecodeArrayIterator& iterator); |
101 | 109 |
102 // Growth increment for the temporary buffer used to construct input lists to | 110 // Growth increment for the temporary buffer used to construct input lists to |
103 // new nodes. | 111 // new nodes. |
104 static const int kInputBufferSizeIncrement = 64; | 112 static const int kInputBufferSizeIncrement = 64; |
105 | 113 |
106 // Field accessors | 114 // Field accessors |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 NodeVector values_; | 209 NodeVector values_; |
202 int register_base_; | 210 int register_base_; |
203 }; | 211 }; |
204 | 212 |
205 | 213 |
206 } // namespace compiler | 214 } // namespace compiler |
207 } // namespace internal | 215 } // namespace internal |
208 } // namespace v8 | 216 } // namespace v8 |
209 | 217 |
210 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ | 218 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ |
OLD | NEW |