| 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-label.h" | 9 #include "src/interpreter/bytecode-label.h" |
| 10 #include "src/interpreter/bytecode-register-allocator.h" | 10 #include "src/interpreter/bytecode-register-allocator.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // generate JumpIfToBooleanTrue/False. | 250 // generate JumpIfToBooleanTrue/False. |
| 251 builder.BinaryOperation(Token::Value::ADD, reg) | 251 builder.BinaryOperation(Token::Value::ADD, reg) |
| 252 .JumpIfTrue(&start) | 252 .JumpIfTrue(&start) |
| 253 .BinaryOperation(Token::Value::ADD, reg) | 253 .BinaryOperation(Token::Value::ADD, reg) |
| 254 .JumpIfFalse(&start); | 254 .JumpIfFalse(&start); |
| 255 } | 255 } |
| 256 | 256 |
| 257 // Emit stack check bytecode. | 257 // Emit stack check bytecode. |
| 258 builder.StackCheck(0); | 258 builder.StackCheck(0); |
| 259 | 259 |
| 260 // Emit an OSR poll bytecode. | |
| 261 builder.OsrPoll(1); | |
| 262 | |
| 263 // Emit throw and re-throw in it's own basic block so that the rest of the | 260 // Emit throw and re-throw in it's own basic block so that the rest of the |
| 264 // code isn't omitted due to being dead. | 261 // code isn't omitted due to being dead. |
| 265 BytecodeLabel after_throw; | 262 BytecodeLabel after_throw; |
| 266 builder.Throw().Bind(&after_throw); | 263 builder.Throw().Bind(&after_throw); |
| 267 BytecodeLabel after_rethrow; | 264 BytecodeLabel after_rethrow; |
| 268 builder.ReThrow().Bind(&after_rethrow); | 265 builder.ReThrow().Bind(&after_rethrow); |
| 269 | 266 |
| 270 builder.ForInPrepare(reg) | 267 builder.ForInPrepare(reg) |
| 271 .ForInDone(reg, reg) | 268 .ForInDone(reg, reg) |
| 272 .ForInNext(reg, reg, reg, 1) | 269 .ForInNext(reg, reg, reg, 1) |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 iterator.Advance(); | 839 iterator.Advance(); |
| 843 } | 840 } |
| 844 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 841 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 845 iterator.Advance(); | 842 iterator.Advance(); |
| 846 CHECK(iterator.done()); | 843 CHECK(iterator.done()); |
| 847 } | 844 } |
| 848 | 845 |
| 849 } // namespace interpreter | 846 } // namespace interpreter |
| 850 } // namespace internal | 847 } // namespace internal |
| 851 } // namespace v8 | 848 } // namespace v8 |
| OLD | NEW |