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

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

Issue 2184553003: Revert of [interpreter] Add explicit OSR polling bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-osr-1
Patch Set: 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
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
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
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