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

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1901713003: [generators] Perform state dispatch in loop header. (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
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 4ad9ff995a1ce74bb3ed34928fba90180048d3fe..f3440e2a3f86dfbfa1a34ae7479a7b8836429dae 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -224,6 +224,10 @@ class BytecodeArrayBuilder final : public ZoneObject {
BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label);
+ // Jump to targets[value], where min <= value < min + size.
+ BytecodeArrayBuilder& IndexedJump(Register value, int min, size_t size,
+ ZoneVector<BytecodeLabel>& targets);
+
BytecodeArrayBuilder& StackCheck();
BytecodeArrayBuilder& Throw();
@@ -285,6 +289,10 @@ class BytecodeArrayBuilder final : public ZoneObject {
static uint32_t UnsignedOperand(int value);
static uint32_t UnsignedOperand(size_t value);
+ ZoneVector<BytecodeLabel> generator_resume_points;
+ int generator_yields_seen() const { return generator_yields_seen_; }
+ int incr_generator_yields_seen() { return generator_yields_seen_++; }
+
private:
class PreviousBytecodeHelper;
friend class BytecodeRegisterAllocator;
@@ -377,6 +385,7 @@ class BytecodeArrayBuilder final : public ZoneObject {
int context_register_count_;
int return_position_;
TemporaryRegisterAllocator temporary_allocator_;
+ int generator_yields_seen_;
DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
};
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.cc » ('j') | src/interpreter/bytecode-array-builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698