| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 Zone* zone() const { return zone_; } | 204 Zone* zone() const { return zone_; } |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } | 207 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } |
| 208 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } | 208 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } |
| 209 Isolate* isolate() const { return isolate_; } | 209 Isolate* isolate() const { return isolate_; } |
| 210 | 210 |
| 211 static Bytecode BytecodeForBinaryOperation(Token::Value op); | 211 static Bytecode BytecodeForBinaryOperation(Token::Value op); |
| 212 static Bytecode BytecodeForCountOperation(Token::Value op); | 212 static Bytecode BytecodeForCountOperation(Token::Value op); |
| 213 static Bytecode BytecodeForCompareOperation(Token::Value op); | 213 static Bytecode BytecodeForCompareOperation(Token::Value op); |
| 214 static Bytecode BytecodeForWideOperands(Bytecode bytecode); |
| 214 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); | 215 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); |
| 215 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); | 216 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); |
| 216 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); | 217 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); |
| 217 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); | 218 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); |
| 218 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode); | 219 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode); |
| 219 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); | 220 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); |
| 220 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); | 221 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); |
| 221 static Bytecode BytecodeForDelete(LanguageMode language_mode); | 222 static Bytecode BytecodeForDelete(LanguageMode language_mode); |
| 222 | 223 |
| 223 static bool FitsInIdx8Operand(int value); | 224 static bool FitsInIdx8Operand(int value); |
| 224 static bool FitsInIdx8Operand(size_t value); | 225 static bool FitsInIdx8Operand(size_t value); |
| 225 static bool FitsInImm8Operand(int value); | 226 static bool FitsInImm8Operand(int value); |
| 226 static bool FitsInIdx16Operand(int value); | 227 static bool FitsInIdx16Operand(int value); |
| 228 static bool FitsInIdx16Operand(size_t value); |
| 227 | 229 |
| 228 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); | 230 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); |
| 229 | 231 |
| 230 template <size_t N> | 232 template <size_t N> |
| 231 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N])); | 233 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N])); |
| 232 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, | 234 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
| 233 uint32_t operand2); | 235 uint32_t operand2); |
| 234 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1); | 236 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1); |
| 235 void Output(Bytecode bytecode, uint32_t operand0); | 237 void Output(Bytecode bytecode, uint32_t operand0); |
| 236 void Output(Bytecode bytecode); | 238 void Output(Bytecode bytecode); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 345 |
| 344 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 346 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
| 345 }; | 347 }; |
| 346 | 348 |
| 347 | 349 |
| 348 } // namespace interpreter | 350 } // namespace interpreter |
| 349 } // namespace internal | 351 } // namespace internal |
| 350 } // namespace v8 | 352 } // namespace v8 |
| 351 | 353 |
| 352 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 354 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |