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

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

Issue 1422033002: [Interpreter] Add support for for..in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment nits. Created 5 years, 2 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/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 4ec50bb623e209637c81029a8881bfb0d081293a..ac3692ba29d3bb80316dc4612ec1faa26292339c 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -170,6 +170,7 @@ class BytecodeArrayBuilder {
// Casts.
BytecodeArrayBuilder& CastAccumulatorToBoolean();
+ BytecodeArrayBuilder& CastAccumulatorToJSObject();
BytecodeArrayBuilder& CastAccumulatorToName();
BytecodeArrayBuilder& CastAccumulatorToNumber();
@@ -180,6 +181,8 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& Jump(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label);
BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label);
+ BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label);
+ BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label);
// TODO(mythria) The following two functions should be merged into
// JumpIfTrue/False. These bytecodes should be automatically chosen rather
// than explicitly using them.
@@ -189,6 +192,11 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& Throw();
BytecodeArrayBuilder& Return();
+ // Complex flow control.
+ BytecodeArrayBuilder& ForInPrepare(Register receiver);
+ BytecodeArrayBuilder& ForInNext(Register for_in_state, Register index);
+ BytecodeArrayBuilder& ForInDone(Register for_in_state);
+
BytecodeArrayBuilder& EnterBlock();
BytecodeArrayBuilder& LeaveBlock();
@@ -287,7 +295,7 @@ class BytecodeLabel final {
bound_ = true;
}
INLINE(void set_referrer(size_t offset)) {
- DCHECK(!bound_ && offset != kInvalidOffset);
+ DCHECK(!bound_ && offset != kInvalidOffset && offset_ == kInvalidOffset);
offset_ = offset;
}
INLINE(size_t offset() const) { return offset_; }

Powered by Google App Engine
This is Rietveld 408576698