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

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: Fixed nits. 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
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 TypeofMode typeof_mode);
123
124 // Store value in the accumulator into the variable with |name|.
125 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name,
126 LanguageMode language_mode);
127
120 // Create a new closure for the SharedFunctionInfo. 128 // Create a new closure for the SharedFunctionInfo.
121 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, 129 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info,
122 PretenureFlag tenured); 130 PretenureFlag tenured);
123 131
124 // Create a new arguments object in the accumulator. 132 // Create a new arguments object in the accumulator.
125 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); 133 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type);
126 134
127 // Literals creation. Constant elements should be in the accumulator. 135 // Literals creation. Constant elements should be in the accumulator.
128 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, 136 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern,
129 int literal_index, int flags); 137 int literal_index, int flags);
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 static Bytecode BytecodeForCountOperation(Token::Value op); 227 static Bytecode BytecodeForCountOperation(Token::Value op);
220 static Bytecode BytecodeForCompareOperation(Token::Value op); 228 static Bytecode BytecodeForCompareOperation(Token::Value op);
221 static Bytecode BytecodeForWideOperands(Bytecode bytecode); 229 static Bytecode BytecodeForWideOperands(Bytecode bytecode);
222 static Bytecode BytecodeForLoadIC(LanguageMode language_mode); 230 static Bytecode BytecodeForLoadIC(LanguageMode language_mode);
223 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode); 231 static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode);
224 static Bytecode BytecodeForStoreIC(LanguageMode language_mode); 232 static Bytecode BytecodeForStoreIC(LanguageMode language_mode);
225 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode); 233 static Bytecode BytecodeForKeyedStoreIC(LanguageMode language_mode);
226 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode, 234 static Bytecode BytecodeForLoadGlobal(LanguageMode language_mode,
227 TypeofMode typeof_mode); 235 TypeofMode typeof_mode);
228 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode); 236 static Bytecode BytecodeForStoreGlobal(LanguageMode language_mode);
237 static Bytecode BytecodeForStoreLookupSlot(LanguageMode language_mode);
229 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type); 238 static Bytecode BytecodeForCreateArguments(CreateArgumentsType type);
230 static Bytecode BytecodeForDelete(LanguageMode language_mode); 239 static Bytecode BytecodeForDelete(LanguageMode language_mode);
231 240
232 static bool FitsInIdx8Operand(int value); 241 static bool FitsInIdx8Operand(int value);
233 static bool FitsInIdx8Operand(size_t value); 242 static bool FitsInIdx8Operand(size_t value);
234 static bool FitsInImm8Operand(int value); 243 static bool FitsInImm8Operand(int value);
235 static bool FitsInIdx16Operand(int value); 244 static bool FitsInIdx16Operand(int value);
236 static bool FitsInIdx16Operand(size_t value); 245 static bool FitsInIdx16Operand(size_t value);
237 246
238 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); 247 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 371
363 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 372 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
364 }; 373 };
365 374
366 375
367 } // namespace interpreter 376 } // namespace interpreter
368 } // namespace internal 377 } // namespace internal
369 } // namespace v8 378 } // namespace v8
370 379
371 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 380 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698