Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| 6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| 7 | 7 |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/interpreter/bytecode-array-builder.h" | 9 #include "src/interpreter/bytecode-array-builder.h" |
| 10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // Visit a named super property load. The optional | 87 // Visit a named super property load. The optional |
| 88 // |opt_receiver_out| register will have the receiver stored to it | 88 // |opt_receiver_out| register will have the receiver stored to it |
| 89 // if it's a valid register. The loaded value is placed in the | 89 // if it's a valid register. The loaded value is placed in the |
| 90 // accumulator. | 90 // accumulator. |
| 91 void VisitNamedSuperPropertyLoad(Property* property, | 91 void VisitNamedSuperPropertyLoad(Property* property, |
| 92 Register opt_receiver_out); | 92 Register opt_receiver_out); |
| 93 | 93 |
| 94 void VisitPropertyLoad(Register obj, Property* expr); | 94 void VisitPropertyLoad(Register obj, Property* expr); |
| 95 void VisitPropertyLoadForAccumulator(Register obj, Property* expr); | 95 void VisitPropertyLoadForAccumulator(Register obj, Property* expr); |
| 96 | 96 |
| 97 void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot, | 97 void BuildVariableLoad(VariableProxy* proxy, |
|
Michael Starzinger
2016/10/17 14:15:35
nit: Not a huge fan of having to pass in the varia
adamk
2016/10/19 11:09:43
Do you mean BuildVariableAssignment? I agree there
Michael Starzinger
2016/10/19 12:32:41
Yes, my comment was inspired by the "ugliness" in
adamk
2016/10/19 13:34:23
I can see the argument for consistency, but it doe
Michael Starzinger
2016/10/19 15:41:52
I would be fine with patch set #8.
| |
| 98 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | 98 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
| 99 void VisitVariableLoadForAccumulatorValue( | 99 void BuildVariableLoadForAccumulatorValue( |
| 100 Variable* variable, FeedbackVectorSlot slot, | 100 VariableProxy* proxy, TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); |
| 101 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | 101 void BuildVariableAssignment(Variable* variable, Token::Value op, |
| 102 MUST_USE_RESULT Register | 102 FeedbackVectorSlot slot, |
| 103 VisitVariableLoadForRegisterValue(Variable* variable, FeedbackVectorSlot slot, | 103 VariableProxy* proxy = nullptr); |
| 104 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); | |
| 105 void VisitVariableAssignment(Variable* variable, Token::Value op, | |
| 106 FeedbackVectorSlot slot); | |
| 107 | 104 |
| 108 void BuildReturn(); | 105 void BuildReturn(); |
| 109 void BuildReThrow(); | 106 void BuildReThrow(); |
| 110 void BuildAbort(BailoutReason bailout_reason); | 107 void BuildAbort(BailoutReason bailout_reason); |
| 111 void BuildThrowIfHole(Handle<String> name); | 108 void BuildThrowIfHole(Handle<String> name); |
| 112 void BuildThrowIfNotHole(Handle<String> name); | 109 void BuildThrowIfNotHole(Handle<String> name); |
| 113 void BuildThrowReferenceError(Handle<String> name); | 110 void BuildThrowReferenceError(Handle<String> name); |
| 114 void BuildHoleCheckForVariableLoad(Variable* variable); | 111 void BuildHoleCheckForVariableLoad(VariableProxy* proxy); |
| 115 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); | 112 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); |
| 116 | 113 |
| 117 // Build jump to targets[value], where | 114 // Build jump to targets[value], where |
| 118 // start_index <= value < start_index + size. | 115 // start_index <= value < start_index + size. |
| 119 void BuildIndexedJump(Register value, size_t start_index, size_t size, | 116 void BuildIndexedJump(Register value, size_t start_index, size_t size, |
| 120 ZoneVector<BytecodeLabel>& targets); | 117 ZoneVector<BytecodeLabel>& targets); |
| 121 | 118 |
| 122 void BuildNewLocalActivationContext(); | 119 void BuildNewLocalActivationContext(); |
| 123 void BuildLocalActivationContextInitialization(); | 120 void BuildLocalActivationContextInitialization(); |
| 124 void BuildNewLocalBlockContext(Scope* scope); | 121 void BuildNewLocalBlockContext(Scope* scope); |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 | 214 |
| 218 Handle<Name> home_object_symbol_; | 215 Handle<Name> home_object_symbol_; |
| 219 Handle<Name> prototype_string_; | 216 Handle<Name> prototype_string_; |
| 220 }; | 217 }; |
| 221 | 218 |
| 222 } // namespace interpreter | 219 } // namespace interpreter |
| 223 } // namespace internal | 220 } // namespace internal |
| 224 } // namespace v8 | 221 } // namespace v8 |
| 225 | 222 |
| 226 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ | 223 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ |
| OLD | NEW |