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

Unified Diff: src/interpreter/bytecodes.h

Issue 1904933002: Introduce bytecodes for assisting generator suspend and resume. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index 44f93cd76ab764da98b81e70b68063a121bbada5..4c602f5a6416134d4b026e5995692710275bd2ae 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -241,6 +241,10 @@ namespace interpreter {
V(ReThrow, AccumulatorUse::kRead) \
V(Return, AccumulatorUse::kNone) \
\
+ /* Generators */ \
+ V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \
+ V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \
+ \
/* Debugger */ \
V(Debugger, AccumulatorUse::kNone) \
DEBUG_BREAK_BYTECODE_LIST(V) \
@@ -396,11 +400,12 @@ class Register {
return index() >= other.index();
}
- private:
- static const int kInvalidIndex = kMaxInt;
static const int kRegisterFileStartOffset =
InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize;
+ private:
+ static const int kInvalidIndex = kMaxInt;
+
void* operator new(size_t size);
void operator delete(void* p);

Powered by Google App Engine
This is Rietveld 408576698