| 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 #include "src/interpreter/bytecode-array-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/interpreter/bytecode-array-writer.h" | 8 #include "src/interpreter/bytecode-array-writer.h" |
| 9 #include "src/interpreter/bytecode-peephole-optimizer.h" | 9 #include "src/interpreter/bytecode-peephole-optimizer.h" |
| 10 #include "src/interpreter/interpreter-intrinsics.h" | 10 #include "src/interpreter/interpreter-intrinsics.h" |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 } | 759 } |
| 760 | 760 |
| 761 | 761 |
| 762 BytecodeArrayBuilder& BytecodeArrayBuilder::Return() { | 762 BytecodeArrayBuilder& BytecodeArrayBuilder::Return() { |
| 763 SetReturnPosition(); | 763 SetReturnPosition(); |
| 764 Output(Bytecode::kReturn); | 764 Output(Bytecode::kReturn); |
| 765 exit_seen_in_block_ = true; | 765 exit_seen_in_block_ = true; |
| 766 return *this; | 766 return *this; |
| 767 } | 767 } |
| 768 | 768 |
| 769 BytecodeArrayBuilder& BytecodeArrayBuilder::Illegal() { | |
| 770 Output(Bytecode::kIllegal); | |
| 771 return *this; | |
| 772 } | |
| 773 | |
| 774 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() { | 769 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() { |
| 775 Output(Bytecode::kDebugger); | 770 Output(Bytecode::kDebugger); |
| 776 return *this; | 771 return *this; |
| 777 } | 772 } |
| 778 | 773 |
| 779 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare( | 774 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare( |
| 780 Register cache_info_triple) { | 775 Register cache_info_triple) { |
| 781 OperandScale operand_scale = | 776 OperandScale operand_scale = |
| 782 Bytecodes::OperandSizesToScale(cache_info_triple.SizeOfOperand()); | 777 Bytecodes::OperandSizesToScale(cache_info_triple.SizeOfOperand()); |
| 783 OutputScaled(Bytecode::kForInPrepare, operand_scale, | 778 OutputScaled(Bytecode::kForInPrepare, operand_scale, |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 } | 1284 } |
| 1290 | 1285 |
| 1291 uint32_t BytecodeArrayBuilder::UnsignedOperand(size_t value) { | 1286 uint32_t BytecodeArrayBuilder::UnsignedOperand(size_t value) { |
| 1292 DCHECK_LE(value, kMaxUInt32); | 1287 DCHECK_LE(value, kMaxUInt32); |
| 1293 return static_cast<uint32_t>(value); | 1288 return static_cast<uint32_t>(value); |
| 1294 } | 1289 } |
| 1295 | 1290 |
| 1296 } // namespace interpreter | 1291 } // namespace interpreter |
| 1297 } // namespace internal | 1292 } // namespace internal |
| 1298 } // namespace v8 | 1293 } // namespace v8 |
| OLD | NEW |