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

Side by Side Diff: src/interpreter/bytecode-array-builder.h

Issue 1689573004: [interpreter] Support for ES6 super keyword. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Register-accumulator transfers. 108 // Register-accumulator transfers.
109 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg); 109 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg);
110 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg); 110 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg);
111 111
112 // Register-register transfer. 112 // Register-register transfer.
113 BytecodeArrayBuilder& MoveRegister(Register from, Register to); 113 BytecodeArrayBuilder& MoveRegister(Register from, Register to);
114 114
115 // Named load property. 115 // Named load property.
116 BytecodeArrayBuilder& LoadNamedProperty(Register object, 116 BytecodeArrayBuilder& LoadNamedProperty(Register object,
117 const Handle<String> name, 117 const Handle<Name> name,
118 int feedback_slot, 118 int feedback_slot,
119 LanguageMode language_mode); 119 LanguageMode language_mode);
120 // Keyed load property. The key should be in the accumulator. 120 // Keyed load property. The key should be in the accumulator.
121 BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot, 121 BytecodeArrayBuilder& LoadKeyedProperty(Register object, int feedback_slot,
122 LanguageMode language_mode); 122 LanguageMode language_mode);
123 123
124 // Store properties. The value to be stored should be in the accumulator. 124 // Store properties. The value to be stored should be in the accumulator.
125 BytecodeArrayBuilder& StoreNamedProperty(Register object, 125 BytecodeArrayBuilder& StoreNamedProperty(Register object,
126 const Handle<String> name, 126 const Handle<Name> name,
127 int feedback_slot, 127 int feedback_slot,
128 LanguageMode language_mode); 128 LanguageMode language_mode);
129 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key, 129 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key,
130 int feedback_slot, 130 int feedback_slot,
131 LanguageMode language_mode); 131 LanguageMode language_mode);
132 132
133 // Lookup the variable with |name|. 133 // Lookup the variable with |name|.
134 BytecodeArrayBuilder& LoadLookupSlot(const Handle<String> name, 134 BytecodeArrayBuilder& LoadLookupSlot(const Handle<String> name,
135 TypeofMode typeof_mode); 135 TypeofMode typeof_mode);
136 136
(...skipping 23 matching lines...) Expand all
160 // Pop the current context and replace with |context|. 160 // Pop the current context and replace with |context|.
161 BytecodeArrayBuilder& PopContext(Register context); 161 BytecodeArrayBuilder& PopContext(Register context);
162 162
163 // Call a JS function. The JSFunction or Callable to be called should be in 163 // Call a JS function. The JSFunction or Callable to be called should be in
164 // |callable|, the receiver should be in |receiver_args| and all subsequent 164 // |callable|, the receiver should be in |receiver_args| and all subsequent
165 // arguments should be in registers <receiver_args + 1> to 165 // arguments should be in registers <receiver_args + 1> to
166 // <receiver_args + receiver_arg_count - 1>. 166 // <receiver_args + receiver_arg_count - 1>.
167 BytecodeArrayBuilder& Call(Register callable, Register receiver_args, 167 BytecodeArrayBuilder& Call(Register callable, Register receiver_args,
168 size_t receiver_arg_count, int feedback_slot); 168 size_t receiver_arg_count, int feedback_slot);
169 169
170 // Call the new operator. The |constructor| register is followed by 170 // Call the new operator. The accumulator holds the |new_target|.
171 // |arg_count| consecutive registers containing arguments to be 171 // The |constructor| is in a register followed by |arg_count|
172 // applied to the constructor. 172 // consecutive arguments starting at |first_arg| for the constuctor
173 // invocation.
173 BytecodeArrayBuilder& New(Register constructor, Register first_arg, 174 BytecodeArrayBuilder& New(Register constructor, Register first_arg,
174 size_t arg_count); 175 size_t arg_count);
175 176
176 // Call the runtime function with |function_id|. The first argument should be 177 // Call the runtime function with |function_id|. The first argument should be
177 // in |first_arg| and all subsequent arguments should be in registers 178 // in |first_arg| and all subsequent arguments should be in registers
178 // <first_arg + 1> to <first_arg + arg_count - 1>. 179 // <first_arg + 1> to <first_arg + arg_count - 1>.
179 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, 180 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id,
180 Register first_arg, size_t arg_count); 181 Register first_arg, size_t arg_count);
181 182
182 // Call the runtime function with |function_id| that returns a pair of values. 183 // Call the runtime function with |function_id| that returns a pair of values.
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 size_t offset_; 414 size_t offset_;
414 415
415 friend class BytecodeArrayBuilder; 416 friend class BytecodeArrayBuilder;
416 }; 417 };
417 418
418 } // namespace interpreter 419 } // namespace interpreter
419 } // namespace internal 420 } // namespace internal
420 } // namespace v8 421 } // namespace v8
421 422
422 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 423 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698