| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/interpreter/bytecode-array-builder.h" | 7 #include "src/interpreter/bytecode-array-builder.h" |
| 8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
| 9 #include "src/interpreter/bytecode-register-allocator.h" | 9 #include "src/interpreter/bytecode-register-allocator.h" |
| 10 #include "test/unittests/test-utils.h" | 10 #include "test/unittests/test-utils.h" |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 .CompareOperation(Token::Value::EQ, reg) | 201 .CompareOperation(Token::Value::EQ, reg) |
| 202 .JumpIfFalse(&start); | 202 .JumpIfFalse(&start); |
| 203 // Perform an operation that returns a non-boolean operation to | 203 // Perform an operation that returns a non-boolean operation to |
| 204 // generate JumpIfToBooleanTrue/False. | 204 // generate JumpIfToBooleanTrue/False. |
| 205 builder.BinaryOperation(Token::Value::ADD, reg) | 205 builder.BinaryOperation(Token::Value::ADD, reg) |
| 206 .JumpIfTrue(&start) | 206 .JumpIfTrue(&start) |
| 207 .BinaryOperation(Token::Value::ADD, reg) | 207 .BinaryOperation(Token::Value::ADD, reg) |
| 208 .JumpIfFalse(&start); | 208 .JumpIfFalse(&start); |
| 209 | 209 |
| 210 // Emit stack check bytecode. | 210 // Emit stack check bytecode. |
| 211 builder.StackCheck(); | 211 builder.StackCheck(0); |
| 212 | 212 |
| 213 // Emit throw and re-throw in it's own basic block so that the rest of the | 213 // Emit throw and re-throw in it's own basic block so that the rest of the |
| 214 // code isn't omitted due to being dead. | 214 // code isn't omitted due to being dead. |
| 215 BytecodeLabel after_throw; | 215 BytecodeLabel after_throw; |
| 216 builder.Jump(&after_throw).Throw().Bind(&after_throw); | 216 builder.Jump(&after_throw).Throw().Bind(&after_throw); |
| 217 BytecodeLabel after_rethrow; | 217 BytecodeLabel after_rethrow; |
| 218 builder.Jump(&after_rethrow).ReThrow().Bind(&after_rethrow); | 218 builder.Jump(&after_rethrow).ReThrow().Bind(&after_rethrow); |
| 219 | 219 |
| 220 builder.ForInPrepare(reg) | 220 builder.ForInPrepare(reg) |
| 221 .ForInDone(reg, reg) | 221 .ForInDone(reg, reg) |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 static_cast<size_t>(kMaxUInt16)) == OperandSize::kShort); | 782 static_cast<size_t>(kMaxUInt16)) == OperandSize::kShort); |
| 783 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand( | 783 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand( |
| 784 static_cast<size_t>(kMaxUInt16 + 1)) == OperandSize::kQuad); | 784 static_cast<size_t>(kMaxUInt16 + 1)) == OperandSize::kQuad); |
| 785 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand( | 785 CHECK(BytecodeArrayBuilder::SizeForUnsignedOperand( |
| 786 static_cast<size_t>(kMaxUInt32)) == OperandSize::kQuad); | 786 static_cast<size_t>(kMaxUInt32)) == OperandSize::kQuad); |
| 787 } | 787 } |
| 788 | 788 |
| 789 } // namespace interpreter | 789 } // namespace interpreter |
| 790 } // namespace internal | 790 } // namespace internal |
| 791 } // namespace v8 | 791 } // namespace v8 |
| OLD | NEW |