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

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

Issue 2347143002: [interpreter] Add fast path for dynamic global lookups (Closed)
Patch Set: Fix bytecode operand documentation 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/compiler/bytecode-graph-builder.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 "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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 BytecodeArrayBuilder& LoadLookupSlot(const Handle<String> name, 131 BytecodeArrayBuilder& LoadLookupSlot(const Handle<String> name,
132 TypeofMode typeof_mode); 132 TypeofMode typeof_mode);
133 133
134 // Lookup the variable with |name|, which is known to be at |slot_index| at 134 // Lookup the variable with |name|, which is known to be at |slot_index| at
135 // |depth| in the context chain if not shadowed by a context extension 135 // |depth| in the context chain if not shadowed by a context extension
136 // somewhere in that context chain. 136 // somewhere in that context chain.
137 BytecodeArrayBuilder& LoadLookupContextSlot(const Handle<String> name, 137 BytecodeArrayBuilder& LoadLookupContextSlot(const Handle<String> name,
138 TypeofMode typeof_mode, 138 TypeofMode typeof_mode,
139 int slot_index, int depth); 139 int slot_index, int depth);
140 140
141 // Lookup the variable with |name|, which has its feedback in |feedback_slot|
142 // and is known to be global if not shadowed by a context extension somewhere
143 // up to |depth| in that context chain.
144 BytecodeArrayBuilder& LoadLookupGlobalSlot(const Handle<String> name,
145 TypeofMode typeof_mode,
146 int feedback_slot, int depth);
147
141 // Store value in the accumulator into the variable with |name|. 148 // Store value in the accumulator into the variable with |name|.
142 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name, 149 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name,
143 LanguageMode language_mode); 150 LanguageMode language_mode);
144 151
145 // Create a new closure for a SharedFunctionInfo which will be inserted at 152 // Create a new closure for a SharedFunctionInfo which will be inserted at
146 // constant pool index |entry|. 153 // constant pool index |entry|.
147 BytecodeArrayBuilder& CreateClosure(size_t entry, int flags); 154 BytecodeArrayBuilder& CreateClosure(size_t entry, int flags);
148 155
149 // Create a new local context for a |scope_info| and a closure which should be 156 // Create a new local context for a |scope_info| and a closure which should be
150 // in the accumulator. 157 // in the accumulator.
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 static int const kNoFeedbackSlot = 0; 419 static int const kNoFeedbackSlot = 0;
413 420
414 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); 421 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder);
415 }; 422 };
416 423
417 } // namespace interpreter 424 } // namespace interpreter
418 } // namespace internal 425 } // namespace internal
419 } // namespace v8 426 } // namespace v8
420 427
421 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 428 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698