Chromium Code Reviews| Index: src/interpreter/bytecode-generator.h |
| diff --git a/src/interpreter/bytecode-generator.h b/src/interpreter/bytecode-generator.h |
| index 9fd4da63da00502cfe2901fa60618593db51d342..54c12119a5de8c8e12f6098411e8da46edd69021 100644 |
| --- a/src/interpreter/bytecode-generator.h |
| +++ b/src/interpreter/bytecode-generator.h |
| @@ -65,9 +65,20 @@ class BytecodeGenerator final : public AstVisitor { |
| // Helper visitors which perform common operations. |
| Register VisitArguments(ZoneList<Expression*>* arguments); |
| + // Visit a keyed super property load. The optional |
| + // |opt_receiver_out| register will have the receiver stored to |
| + // it. The loaded value is placed in the accumulator. |
|
rmcilroy
2016/02/12 14:56:42
s/it./it if it's a valid register./
oth
2016/02/12 16:50:33
Done.
|
| + void VisitKeyedSuperPropertyLoad(Property* property, |
| + Register opt_receiver_out); |
| + |
| + // Visit a named super property load. The optional |
| + // |opt_receiver_out| register will have the receiver stored to |
| + // it. The loaded value is placed in the accumulator. |
|
rmcilroy
2016/02/12 14:56:42
ditto
oth
2016/02/12 16:50:33
Done.
|
| + void VisitNamedSuperPropertyLoad(Property* property, |
| + Register opt_receiver_out); |
| + |
| void VisitPropertyLoad(Register obj, Property* expr); |
| void VisitPropertyLoadForAccumulator(Register obj, Property* expr); |
| - |
|
rmcilroy
2016/02/12 14:56:42
nit - add back whitespace
oth
2016/02/12 16:50:33
Done.
|
| void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot, |
| TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
| void VisitVariableLoadForAccumulatorValue( |
| @@ -78,6 +89,16 @@ class BytecodeGenerator final : public AstVisitor { |
| TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
| void VisitVariableAssignment(Variable* variable, Token::Value op, |
| FeedbackVectorSlot slot); |
| + |
| + MUST_USE_RESULT Register PrepareNamedSuperPropertyArguments( |
| + SuperPropertyReference* super_property, Handle<Name> name); |
| + MUST_USE_RESULT Register PrepareKeyedSuperPropertyArguments( |
| + SuperPropertyReference* super_property, Expression* key); |
| + void BuildNamedSuperPropertyLoad(Register receiver); |
| + void BuildKeyedSuperPropertyLoad(Register receiver); |
| + void BuildNamedSuperPropertyStore(Register receiver); |
| + void BuildKeyedSuperPropertyStore(Register receiver); |
| + |
| void BuildThrowIfHole(Handle<String> name); |
| void BuildThrowIfNotHole(Handle<String> name); |
| void BuildThrowReassignConstant(Handle<String> name); |
| @@ -86,6 +107,7 @@ class BytecodeGenerator final : public AstVisitor { |
| void VisitArgumentsObject(Variable* variable); |
| void VisitRestArgumentsArray(Variable* rest); |
| + void VisitCallSuper(Call* call); |
| void VisitClassLiteralContents(ClassLiteral* expr); |
| void VisitClassLiteralForRuntimeDefinition(ClassLiteral* expr); |
| void VisitClassLiteralProperties(ClassLiteral* expr, Register literal, |
| @@ -128,6 +150,10 @@ class BytecodeGenerator final : public AstVisitor { |
| bool IsInsideTryCatch() const { return try_catch_nesting_level_ > 0; } |
| bool IsInsideTryFinally() const { return try_finally_nesting_level_ > 0; } |
| + // Initialize an array of temporary registers with consecutive registers. |
| + template <size_t N> |
| + void InitializeWithConsecutiveRegisters(Register (®isters)[N]); |
|
rmcilroy
2016/02/12 14:56:42
This should probably live in the register allocato
oth
2016/02/12 16:50:33
Done.
|
| + |
| inline void set_builder(BytecodeArrayBuilder* builder) { builder_ = builder; } |
| inline BytecodeArrayBuilder* builder() const { return builder_; } |