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

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

Issue 1524803003: [Interpreter] Add support for Load / Store to Lookup slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@init_eval_impl
Patch Set: Created 5 years 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 <vector> 8 #include <vector>
9 9
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 LanguageMode language_mode); 110 LanguageMode language_mode);
111 111
112 // Store properties. The value to be stored should be in the accumulator. 112 // Store properties. The value to be stored should be in the accumulator.
113 BytecodeArrayBuilder& StoreNamedProperty(Register object, size_t name_index, 113 BytecodeArrayBuilder& StoreNamedProperty(Register object, size_t name_index,
114 int feedback_slot, 114 int feedback_slot,
115 LanguageMode language_mode); 115 LanguageMode language_mode);
116 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key, 116 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key,
117 int feedback_slot, 117 int feedback_slot,
118 LanguageMode language_mode); 118 LanguageMode language_mode);
119 119
120 // Lookup the variable with |name|.
121 BytecodeArrayBuilder& LoadLookupSlot(const Handle<String> name,
122 Register context,
123 TypeofMode typeof_mode);
124
125 // Store value in the accumulator into the variable with |name|.
126 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name,
127 Register context,
128 LanguageMode language_mode);
129
120 // Create a new closure for the SharedFunctionInfo. 130 // Create a new closure for the SharedFunctionInfo.
121 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, 131 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info,
122 PretenureFlag tenured); 132 PretenureFlag tenured);
123 133
124 // Create a new arguments object in the accumulator. 134 // Create a new arguments object in the accumulator.
125 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); 135 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type);
126 136
127 // Literals creation. Constant elements should be in the accumulator. 137 // Literals creation. Constant elements should be in the accumulator.
128 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, 138 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern,
129 int literal_index, int flags); 139 int literal_index, int flags);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 static Bytecode BytecodeForCountOperation(Token::Value op); 229 static Bytecode BytecodeForCountOperation(Token::Value op);
220 static Bytecode BytecodeForCompareOperation(Token::Value op); 230 static Bytecode BytecodeForCompareOperation(Token::Value op);
221 static Bytecode BytecodeForWideOperands(Bytecode bytecode); 231 static Bytecode BytecodeForWideOperands(Bytecode bytecode);
222 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); 232 static Bytecode BytecodeForLoadIC(LanguageMode language_mode);
223 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); 233 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode);
224 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); 234 static Bytecode BytecodeForStoreIC(LanguageMode language_mode);
225 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); 235 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode);
226 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode, 236 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode,
227 TypeofMode typeof_mode); 237 TypeofMode typeof_mode);
228 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); 238 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode);
239 static Bytecode BytecodeForStoreLookupSlot(LanguageMode language_mode);
229 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); 240 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type);
230 static Bytecode BytecodeForDelete(LanguageMode language_mode); 241 static Bytecode BytecodeForDelete(LanguageMode language_mode);
231 242
232 static bool FitsInIdx8Operand(int value); 243 static bool FitsInIdx8Operand(int value);
233 static bool FitsInIdx8Operand(size_t value); 244 static bool FitsInIdx8Operand(size_t value);
234 static bool FitsInImm8Operand(int value); 245 static bool FitsInImm8Operand(int value);
235 static bool FitsInIdx16Operand(int value); 246 static bool FitsInIdx16Operand(int value);
236 static bool FitsInIdx16Operand(size_t value); 247 static bool FitsInIdx16Operand(size_t value);
237 248
238 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); 249 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 373
363 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 374 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
364 }; 375 };
365 376
366 377
367 } // namespace interpreter 378 } // namespace interpreter
368 } // namespace internal 379 } // namespace internal
369 } // namespace v8 380 } // namespace v8
370 381
371 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 382 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698