OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_OPERATOR_H_ | 5 #ifndef V8_COMPILER_JS_OPERATOR_H_ |
6 #define V8_COMPILER_JS_OPERATOR_H_ | 6 #define V8_COMPILER_JS_OPERATOR_H_ |
7 | 7 |
8 #include "src/compiler/linkage.h" | 8 #include "src/compiler/linkage.h" |
9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
10 #include "src/compiler/operator.h" | 10 #include "src/compiler/operator.h" |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 Operator* HasProperty() { NOPROPS(JSHasProperty, 2, 1); } | 138 Operator* HasProperty() { NOPROPS(JSHasProperty, 2, 1); } |
139 | 139 |
140 Operator* LoadContext(uint16_t depth, uint32_t index, bool immutable) { | 140 Operator* LoadContext(uint16_t depth, uint32_t index, bool immutable) { |
141 ContextAccess access(depth, index, immutable); | 141 ContextAccess access(depth, index, immutable); |
142 OP1(JSLoadContext, ContextAccess, access, | 142 OP1(JSLoadContext, ContextAccess, access, |
143 Operator::kEliminatable | Operator::kNoWrite, 1, 1); | 143 Operator::kEliminatable | Operator::kNoWrite, 1, 1); |
144 } | 144 } |
145 Operator* StoreContext(uint16_t depth, uint32_t index) { | 145 Operator* StoreContext(uint16_t depth, uint32_t index) { |
146 ContextAccess access(depth, index, false); | 146 ContextAccess access(depth, index, false); |
147 OP1(JSStoreContext, ContextAccess, access, Operator::kNoProperties, 2, 1); | 147 OP1(JSStoreContext, ContextAccess, access, Operator::kNoProperties, 2, 0); |
148 } | 148 } |
149 | 149 |
150 Operator* TypeOf() { SIMPLE(JSTypeOf, Operator::kPure, 1, 1); } | 150 Operator* TypeOf() { SIMPLE(JSTypeOf, Operator::kPure, 1, 1); } |
151 Operator* InstanceOf() { NOPROPS(JSInstanceOf, 2, 1); } | 151 Operator* InstanceOf() { NOPROPS(JSInstanceOf, 2, 1); } |
152 Operator* Debugger() { NOPROPS(JSDebugger, 0, 0); } | 152 Operator* Debugger() { NOPROPS(JSDebugger, 0, 0); } |
153 | 153 |
154 // TODO(titzer): nail down the static parts of each of these context flavors. | 154 // TODO(titzer): nail down the static parts of each of these context flavors. |
155 Operator* CreateFunctionContext() { NOPROPS(JSCreateFunctionContext, 1, 1); } | 155 Operator* CreateFunctionContext() { NOPROPS(JSCreateFunctionContext, 1, 1); } |
156 Operator* CreateCatchContext(PrintableUnique<String> name) { | 156 Operator* CreateCatchContext(PrintableUnique<String> name) { |
157 OP1(JSCreateCatchContext, PrintableUnique<String>, name, | 157 OP1(JSCreateCatchContext, PrintableUnique<String>, name, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 static int HashCode(Runtime::FunctionId val) { return static_cast<int>(val); } | 205 static int HashCode(Runtime::FunctionId val) { return static_cast<int>(val); } |
206 static bool Equals(Runtime::FunctionId a, Runtime::FunctionId b) { | 206 static bool Equals(Runtime::FunctionId a, Runtime::FunctionId b) { |
207 return a == b; | 207 return a == b; |
208 } | 208 } |
209 }; | 209 }; |
210 } | 210 } |
211 } | 211 } |
212 } // namespace v8::internal::compiler | 212 } // namespace v8::internal::compiler |
213 | 213 |
214 #endif // V8_COMPILER_JS_OPERATOR_H_ | 214 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |