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

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

Issue 2336643002: [Interpreter] Move context chain search loop to handler (Closed)
Patch Set: Address comments 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
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-array-writer.h" 9 #include "src/interpreter/bytecode-array-writer.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 BytecodeArrayBuilder& LoadTheHole(); 87 BytecodeArrayBuilder& LoadTheHole();
88 BytecodeArrayBuilder& LoadTrue(); 88 BytecodeArrayBuilder& LoadTrue();
89 BytecodeArrayBuilder& LoadFalse(); 89 BytecodeArrayBuilder& LoadFalse();
90 90
91 // Global loads to the accumulator and stores from the accumulator. 91 // Global loads to the accumulator and stores from the accumulator.
92 BytecodeArrayBuilder& LoadGlobal(int feedback_slot, TypeofMode typeof_mode); 92 BytecodeArrayBuilder& LoadGlobal(int feedback_slot, TypeofMode typeof_mode);
93 BytecodeArrayBuilder& StoreGlobal(const Handle<String> name, 93 BytecodeArrayBuilder& StoreGlobal(const Handle<String> name,
94 int feedback_slot, 94 int feedback_slot,
95 LanguageMode language_mode); 95 LanguageMode language_mode);
96 96
97 // Load the object at |slot_index| in |context| into the accumulator. 97 // Load the object at |slot_index| at |depth| in |context| into the
Michael Starzinger 2016/09/13 09:53:08 nit: "... at |depth| in the context chain starting
Leszek Swirski 2016/09/13 10:17:51 Done.
98 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index); 98 // accumulator.
99 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index,
100 int depth);
99 101
100 // Stores the object in the accumulator into |slot_index| of |context|. 102 // Stores the object in the accumulator into |slot_index| at |depth| of
Michael Starzinger 2016/09/13 09:53:08 nit: Likewise.
Leszek Swirski 2016/09/13 10:17:51 Done, and done wherever else I added a depth param
101 BytecodeArrayBuilder& StoreContextSlot(Register context, int slot_index); 103 // |context|.
104 BytecodeArrayBuilder& StoreContextSlot(Register context, int slot_index,
105 int depth);
102 106
103 // Register-accumulator transfers. 107 // Register-accumulator transfers.
104 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg); 108 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg);
105 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg); 109 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg);
106 110
107 // Register-register transfer. 111 // Register-register transfer.
108 BytecodeArrayBuilder& MoveRegister(Register from, Register to); 112 BytecodeArrayBuilder& MoveRegister(Register from, Register to);
109 113
110 // Named load property. 114 // Named load property.
111 BytecodeArrayBuilder& LoadNamedProperty(Register object, 115 BytecodeArrayBuilder& LoadNamedProperty(Register object,
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 static int const kNoFeedbackSlot = 0; 407 static int const kNoFeedbackSlot = 0;
404 408
405 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 409 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
406 }; 410 };
407 411
408 } // namespace interpreter 412 } // namespace interpreter
409 } // namespace internal 413 } // namespace internal
410 } // namespace v8 414 } // namespace v8
411 415
412 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 416 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698