| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } | 146 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } |
| 147 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } | 147 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } |
| 148 Isolate* isolate() const { return isolate_; } | 148 Isolate* isolate() const { return isolate_; } |
| 149 | 149 |
| 150 static Bytecode BytecodeForBinaryOperation(Token::Value op); | 150 static Bytecode BytecodeForBinaryOperation(Token::Value op); |
| 151 static Bytecode BytecodeForCompareOperation(Token::Value op); | 151 static Bytecode BytecodeForCompareOperation(Token::Value op); |
| 152 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); | 152 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); |
| 153 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); | 153 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); |
| 154 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); | 154 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); |
| 155 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); | 155 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); |
| 156 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); |
| 156 | 157 |
| 157 static bool FitsInIdx8Operand(int value); | 158 static bool FitsInIdx8Operand(int value); |
| 158 static bool FitsInIdx8Operand(size_t value); | 159 static bool FitsInIdx8Operand(size_t value); |
| 159 static bool FitsInImm8Operand(int value); | 160 static bool FitsInImm8Operand(int value); |
| 160 static bool FitsInIdx16Operand(int value); | 161 static bool FitsInIdx16Operand(int value); |
| 161 | 162 |
| 162 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); | 163 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); |
| 163 | 164 |
| 164 template <size_t N> | 165 template <size_t N> |
| 165 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N])); | 166 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N])); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 265 |
| 265 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 266 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
| 266 }; | 267 }; |
| 267 | 268 |
| 268 | 269 |
| 269 } // namespace interpreter | 270 } // namespace interpreter |
| 270 } // namespace internal | 271 } // namespace internal |
| 271 } // namespace v8 | 272 } // namespace v8 |
| 272 | 273 |
| 273 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 274 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |