Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 2501503005: [Interpreter] Add SetPendingMessage bytecode. (Closed)
Patch Set: cl format Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/TryFinally.golden ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/TryFinally.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698