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

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

Issue 2336643002: [Interpreter] Move context chain search loop to handler (Closed)
Patch Set: Fix documentation nits Created 4 years, 3 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
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.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 #include "src/interpreter/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 #include "src/globals.h" 7 #include "src/globals.h"
8 #include "src/interpreter/bytecode-array-writer.h" 8 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" 9 #include "src/interpreter/bytecode-dead-code-optimizer.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 263
264 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal( 264 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal(
265 const Handle<String> name, int feedback_slot, LanguageMode language_mode) { 265 const Handle<String> name, int feedback_slot, LanguageMode language_mode) {
266 Bytecode bytecode = BytecodeForStoreGlobal(language_mode); 266 Bytecode bytecode = BytecodeForStoreGlobal(language_mode);
267 size_t name_index = GetConstantPoolEntry(name); 267 size_t name_index = GetConstantPoolEntry(name);
268 Output(bytecode, UnsignedOperand(name_index), UnsignedOperand(feedback_slot)); 268 Output(bytecode, UnsignedOperand(name_index), UnsignedOperand(feedback_slot));
269 return *this; 269 return *this;
270 } 270 }
271 271
272 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot(Register context, 272 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot(Register context,
273 int slot_index) { 273 int slot_index,
274 int depth) {
274 Output(Bytecode::kLdaContextSlot, RegisterOperand(context), 275 Output(Bytecode::kLdaContextSlot, RegisterOperand(context),
275 UnsignedOperand(slot_index)); 276 UnsignedOperand(slot_index), UnsignedOperand(depth));
276 return *this; 277 return *this;
277 } 278 }
278 279
279 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreContextSlot(Register context, 280 BytecodeArrayBuilder& BytecodeArrayBuilder::StoreContextSlot(Register context,
280 int slot_index) { 281 int slot_index,
282 int depth) {
281 Output(Bytecode::kStaContextSlot, RegisterOperand(context), 283 Output(Bytecode::kStaContextSlot, RegisterOperand(context),
282 UnsignedOperand(slot_index)); 284 UnsignedOperand(slot_index), UnsignedOperand(depth));
283 return *this; 285 return *this;
284 } 286 }
285 287
286 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLookupSlot( 288 BytecodeArrayBuilder& BytecodeArrayBuilder::LoadLookupSlot(
287 const Handle<String> name, TypeofMode typeof_mode) { 289 const Handle<String> name, TypeofMode typeof_mode) {
288 Bytecode bytecode = (typeof_mode == INSIDE_TYPEOF) 290 Bytecode bytecode = (typeof_mode == INSIDE_TYPEOF)
289 ? Bytecode::kLdaLookupSlotInsideTypeof 291 ? Bytecode::kLdaLookupSlotInsideTypeof
290 : Bytecode::kLdaLookupSlot; 292 : Bytecode::kLdaLookupSlot;
291 size_t name_index = GetConstantPoolEntry(name); 293 size_t name_index = GetConstantPoolEntry(name);
292 Output(bytecode, UnsignedOperand(name_index)); 294 Output(bytecode, UnsignedOperand(name_index));
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 return Bytecode::kTailCall; 996 return Bytecode::kTailCall;
995 default: 997 default:
996 UNREACHABLE(); 998 UNREACHABLE();
997 } 999 }
998 return Bytecode::kIllegal; 1000 return Bytecode::kIllegal;
999 } 1001 }
1000 1002
1001 } // namespace interpreter 1003 } // namespace interpreter
1002 } // namespace internal 1004 } // namespace internal
1003 } // namespace v8 1005 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698