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

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

Issue 2172233002: [interpreter] Add explicit OSR polling bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-osr-1
Patch Set: Rebased. Created 4 years, 4 months 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/mjsunit/ignition/osr-from-bytecode.js ('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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
260 // Emit throw and re-throw in it's own basic block so that the rest of the 263 // Emit throw and re-throw in it's own basic block so that the rest of the
261 // code isn't omitted due to being dead. 264 // code isn't omitted due to being dead.
262 BytecodeLabel after_throw; 265 BytecodeLabel after_throw;
263 builder.Throw().Bind(&after_throw); 266 builder.Throw().Bind(&after_throw);
264 BytecodeLabel after_rethrow; 267 BytecodeLabel after_rethrow;
265 builder.ReThrow().Bind(&after_rethrow); 268 builder.ReThrow().Bind(&after_rethrow);
266 269
267 builder.ForInPrepare(reg) 270 builder.ForInPrepare(reg)
268 .ForInDone(reg, reg) 271 .ForInDone(reg, reg)
269 .ForInNext(reg, reg, reg, 1) 272 .ForInNext(reg, reg, reg, 1)
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 iterator.Advance(); 842 iterator.Advance();
840 } 843 }
841 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 844 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
842 iterator.Advance(); 845 iterator.Advance();
843 CHECK(iterator.done()); 846 CHECK(iterator.done());
844 } 847 }
845 848
846 } // namespace interpreter 849 } // namespace interpreter
847 } // namespace internal 850 } // namespace internal
848 } // namespace v8 851 } // namespace v8
OLDNEW
« no previous file with comments | « test/mjsunit/ignition/osr-from-bytecode.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698