Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 is known to be at |feedback_slot| in | |
|
mythria
2016/09/19 09:26:53
nit: update the comment. I think feedback is store
Leszek Swirski
2016/09/19 10:34:51
Done.
| |
| 142 // the global context if not shadowed by a context extension somewhere up to | |
| 143 // |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 Loading... | |
| 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_ |
| OLD | NEW |