Chromium Code Reviews| 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 "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
| 10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 308 uint32_t operand0); | 308 uint32_t operand0); |
| 309 | 309 |
| 310 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode, | 310 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode, |
| 311 BytecodeLabel* label); | 311 BytecodeLabel* label); |
| 312 | 312 |
| 313 | 313 |
| 314 bool OperandIsValid(Bytecode bytecode, OperandScale operand_scale, | 314 bool OperandIsValid(Bytecode bytecode, OperandScale operand_scale, |
| 315 int operand_index, uint32_t operand_value) const; | 315 int operand_index, uint32_t operand_value) const; |
| 316 bool RegisterIsValid(Register reg, OperandSize reg_size) const; | 316 bool RegisterIsValid(Register reg, OperandSize reg_size) const; |
| 317 | 317 |
| 318 // Test if bytecode needs an expression position to be attached. | |
| 319 static bool NeedExpressionPosition(Bytecode bytecode); | |
|
Yang
2016/06/08 13:04:54
I wonder whether that should belong in interpreter
oth
2016/06/08 15:04:21
Yes, it could do. The only quirk with this is that
| |
| 320 | |
| 318 // Attach latest source position to |node|. | 321 // Attach latest source position to |node|. |
| 319 void AttachSourceInfo(BytecodeNode* node); | 322 void AttachSourceInfo(BytecodeNode* node); |
| 320 | 323 |
| 321 // Gets a constant pool entry for the |object|. | 324 // Gets a constant pool entry for the |object|. |
| 322 size_t GetConstantPoolEntry(Handle<Object> object); | 325 size_t GetConstantPoolEntry(Handle<Object> object); |
| 323 | 326 |
| 324 // Not implemented as the illegal bytecode is used inside internally | 327 // Not implemented as the illegal bytecode is used inside internally |
| 325 // to indicate a bytecode field is not valid or an error has occured | 328 // to indicate a bytecode field is not valid or an error has occured |
| 326 // during bytecode generation. | 329 // during bytecode generation. |
| 327 BytecodeArrayBuilder& Illegal(); | 330 BytecodeArrayBuilder& Illegal(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 359 BytecodeSourceInfo latest_source_info_; | 362 BytecodeSourceInfo latest_source_info_; |
| 360 | 363 |
| 361 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 364 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 362 }; | 365 }; |
| 363 | 366 |
| 364 } // namespace interpreter | 367 } // namespace interpreter |
| 365 } // namespace internal | 368 } // namespace internal |
| 366 } // namespace v8 | 369 } // namespace v8 |
| 367 | 370 |
| 368 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 371 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |