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

Side by Side Diff: src/interpreter/bytecode-array-builder.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: Minor cleanups. 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/interpreter/bytecode-array-writer.h" 9 #include "src/interpreter/bytecode-array-writer.h"
10 #include "src/interpreter/bytecode-dead-code-optimizer.h" 10 #include "src/interpreter/bytecode-dead-code-optimizer.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // A Nop could be inserted for empty statements, but since no code 456 // A Nop could be inserted for empty statements, but since no code
457 // is associated with these positions, instead we force the stack 457 // is associated with these positions, instead we force the stack
458 // check's expression position which eliminates the empty 458 // check's expression position which eliminates the empty
459 // statement's position. 459 // statement's position.
460 latest_source_info_.ForceExpressionPosition(position); 460 latest_source_info_.ForceExpressionPosition(position);
461 } 461 }
462 Output(Bytecode::kStackCheck); 462 Output(Bytecode::kStackCheck);
463 return *this; 463 return *this;
464 } 464 }
465 465
466 BytecodeArrayBuilder& BytecodeArrayBuilder::OsrPoll(int loop_depth) {
467 Output(Bytecode::kOsrPoll, UnsignedOperand(loop_depth));
468 return *this;
469 }
470
466 BytecodeArrayBuilder& BytecodeArrayBuilder::Throw() { 471 BytecodeArrayBuilder& BytecodeArrayBuilder::Throw() {
467 Output(Bytecode::kThrow); 472 Output(Bytecode::kThrow);
468 return *this; 473 return *this;
469 } 474 }
470 475
471 BytecodeArrayBuilder& BytecodeArrayBuilder::ReThrow() { 476 BytecodeArrayBuilder& BytecodeArrayBuilder::ReThrow() {
472 Output(Bytecode::kReThrow); 477 Output(Bytecode::kReThrow);
473 return *this; 478 return *this;
474 } 479 }
475 480
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 return Bytecode::kTailCall; 938 return Bytecode::kTailCall;
934 default: 939 default:
935 UNREACHABLE(); 940 UNREACHABLE();
936 } 941 }
937 return Bytecode::kIllegal; 942 return Bytecode::kIllegal;
938 } 943 }
939 944
940 } // namespace interpreter 945 } // namespace interpreter
941 } // namespace internal 946 } // namespace internal
942 } // namespace v8 947 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698