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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 { | 251 { |
252 BytecodeLabel after_jump1, after_jump2; | 252 BytecodeLabel after_jump1, after_jump2; |
253 builder.BinaryOperation(Token::Value::ADD, reg, 1) | 253 builder.BinaryOperation(Token::Value::ADD, reg, 1) |
254 .JumpIfTrue(&after_jump1) | 254 .JumpIfTrue(&after_jump1) |
255 .Bind(&after_jump1) | 255 .Bind(&after_jump1) |
256 .BinaryOperation(Token::Value::ADD, reg, 2) | 256 .BinaryOperation(Token::Value::ADD, reg, 2) |
257 .JumpIfFalse(&after_jump2) | 257 .JumpIfFalse(&after_jump2) |
258 .Bind(&after_jump2); | 258 .Bind(&after_jump2); |
259 } | 259 } |
260 | 260 |
| 261 // Emit set pending message bytecode. |
| 262 builder.SetPendingMessage(); |
| 263 |
261 // Emit stack check bytecode. | 264 // Emit stack check bytecode. |
262 builder.StackCheck(0); | 265 builder.StackCheck(0); |
263 | 266 |
264 // Emit throw and re-throw in it's own basic block so that the rest of the | 267 // Emit throw and re-throw in it's own basic block so that the rest of the |
265 // code isn't omitted due to being dead. | 268 // code isn't omitted due to being dead. |
266 BytecodeLabel after_throw; | 269 BytecodeLabel after_throw; |
267 builder.Throw().Bind(&after_throw); | 270 builder.Throw().Bind(&after_throw); |
268 BytecodeLabel after_rethrow; | 271 BytecodeLabel after_rethrow; |
269 builder.ReThrow().Bind(&after_rethrow); | 272 builder.ReThrow().Bind(&after_rethrow); |
270 | 273 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 iterator.Advance(); | 728 iterator.Advance(); |
726 } | 729 } |
727 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 730 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
728 iterator.Advance(); | 731 iterator.Advance(); |
729 CHECK(iterator.done()); | 732 CHECK(iterator.done()); |
730 } | 733 } |
731 | 734 |
732 } // namespace interpreter | 735 } // namespace interpreter |
733 } // namespace internal | 736 } // namespace internal |
734 } // namespace v8 | 737 } // namespace v8 |
OLD | NEW |