| 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);
|
| }
|
| }
|
|
|
|
|