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_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "src/ast.h" | 10 #include "src/ast.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, | 153 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, |
154 Strength strength); | 154 Strength strength); |
155 | 155 |
156 // Count Operators (value stored in accumulator). | 156 // Count Operators (value stored in accumulator). |
157 BytecodeArrayBuilder& CountOperation(Token::Value op, Strength strength); | 157 BytecodeArrayBuilder& CountOperation(Token::Value op, Strength strength); |
158 | 158 |
159 // Unary Operators. | 159 // Unary Operators. |
160 BytecodeArrayBuilder& LogicalNot(); | 160 BytecodeArrayBuilder& LogicalNot(); |
161 BytecodeArrayBuilder& TypeOf(); | 161 BytecodeArrayBuilder& TypeOf(); |
162 | 162 |
| 163 // Deletes property from an object. This expects that accumulator contains |
| 164 // the key to be deleted and the register contains a reference to the object. |
| 165 BytecodeArrayBuilder& Delete(Register object, LanguageMode language_mode); |
| 166 |
163 // Tests. | 167 // Tests. |
164 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, | 168 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, |
165 Strength strength); | 169 Strength strength); |
166 | 170 |
167 // Casts. | 171 // Casts. |
168 BytecodeArrayBuilder& CastAccumulatorToBoolean(); | 172 BytecodeArrayBuilder& CastAccumulatorToBoolean(); |
169 BytecodeArrayBuilder& CastAccumulatorToName(); | 173 BytecodeArrayBuilder& CastAccumulatorToName(); |
170 BytecodeArrayBuilder& CastAccumulatorToNumber(); | 174 BytecodeArrayBuilder& CastAccumulatorToNumber(); |
171 | 175 |
172 // Flow Control. | 176 // Flow Control. |
(...skipping 26 matching lines...) Expand all Loading... |
199 static Bytecode BytecodeForBinaryOperation(Token::Value op); | 203 static Bytecode BytecodeForBinaryOperation(Token::Value op); |
200 static Bytecode BytecodeForCountOperation(Token::Value op); | 204 static Bytecode BytecodeForCountOperation(Token::Value op); |
201 static Bytecode BytecodeForCompareOperation(Token::Value op); | 205 static Bytecode BytecodeForCompareOperation(Token::Value op); |
202 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); | 206 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); |
203 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); | 207 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); |
204 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); | 208 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); |
205 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); | 209 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); |
206 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode); | 210 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode); |
207 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); | 211 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); |
208 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); | 212 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); |
| 213 static Bytecode BytecodeForDelete(LanguageMode language_mode); |
209 | 214 |
210 static bool FitsInIdx8Operand(int value); | 215 static bool FitsInIdx8Operand(int value); |
211 static bool FitsInIdx8Operand(size_t value); | 216 static bool FitsInIdx8Operand(size_t value); |
212 static bool FitsInImm8Operand(int value); | 217 static bool FitsInImm8Operand(int value); |
213 static bool FitsInIdx16Operand(int value); | 218 static bool FitsInIdx16Operand(int value); |
214 | 219 |
215 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); | 220 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); |
216 | 221 |
217 template <size_t N> | 222 template <size_t N> |
218 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N])); | 223 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N])); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 333 |
329 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 334 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
330 }; | 335 }; |
331 | 336 |
332 | 337 |
333 } // namespace interpreter | 338 } // namespace interpreter |
334 } // namespace internal | 339 } // namespace internal |
335 } // namespace v8 | 340 } // namespace v8 |
336 | 341 |
337 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 342 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |