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

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

Issue 2654423004: [async-functions] support await expressions in finally statements (Closed)
Patch Set: I'd like to build with -Wunused-variables locally, but how!? Created 3 years, 11 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 | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »
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 7bb601b752c0c2a16da56876295baf894d60a46b..2ee4a441e87a04cb21a70f5383b74b8e21e74a98 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -73,6 +73,9 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final
Register Parameter(int parameter_index) const;
+ // Same as Parameter(0), but indicates intent
+ inline Register Receiver() const { return Parameter(0); }
+
// Constant loads to accumulator.
BytecodeArrayBuilder& LoadConstantPoolEntry(size_t entry);
BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value);
@@ -342,17 +345,25 @@ class V8_EXPORT_PRIVATE BytecodeArrayBuilder final
void InitializeReturnPosition(FunctionLiteral* literal);
- void SetStatementPosition(Statement* stmt) {
- if (stmt->position() == kNoSourcePosition) return;
- latest_source_info_.MakeStatementPosition(stmt->position());
+ inline void SetStatementPosition(Statement* stmt) {
+ SetStatementPosition(stmt->position());
}
- void SetExpressionPosition(Expression* expr) {
- if (expr->position() == kNoSourcePosition) return;
+ void SetStatementPosition(int position) {
+ if (position == kNoSourcePosition) return;
+ latest_source_info_.MakeStatementPosition(position);
+ }
+
+ inline void SetExpressionPosition(Expression* expr) {
+ SetExpressionPosition(expr->position());
+ }
+
+ void SetExpressionPosition(int position) {
+ if (position == kNoSourcePosition) return;
if (!latest_source_info_.is_statement()) {
// Ensure the current expression position is overwritten with the
// latest value.
- latest_source_info_.MakeExpressionPosition(expr->position());
+ latest_source_info_.MakeExpressionPosition(position);
}
}
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698