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/base/compiler-specific.h" | 9 #include "src/base/compiler-specific.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // Load the object at |slot_index| at |depth| in the context chain starting | 92 // Load the object at |slot_index| at |depth| in the context chain starting |
93 // with |context| into the accumulator. | 93 // with |context| into the accumulator. |
94 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index, | 94 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index, |
95 int depth); | 95 int depth); |
96 | 96 |
97 // Stores the object in the accumulator into |slot_index| at |depth| in the | 97 // Stores the object in the accumulator into |slot_index| at |depth| in the |
98 // context chain starting with |context|. | 98 // context chain starting with |context|. |
99 BytecodeArrayBuilder& StoreContextSlot(Register context, int slot_index, | 99 BytecodeArrayBuilder& StoreContextSlot(Register context, int slot_index, |
100 int depth); | 100 int depth); |
101 | 101 |
| 102 // Load from a module variable into the accumulator. |depth| is the depth of |
| 103 // the current context relative to the module context. |
| 104 BytecodeArrayBuilder& LoadModuleVariable(int cell_index, int depth); |
| 105 |
| 106 // Store from the accumulator into a module variable. |depth| is the depth of |
| 107 // the current context relative to the module context. |
| 108 BytecodeArrayBuilder& StoreModuleVariable(int cell_index, int depth); |
| 109 |
102 // Register-accumulator transfers. | 110 // Register-accumulator transfers. |
103 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg); | 111 BytecodeArrayBuilder& LoadAccumulatorWithRegister(Register reg); |
104 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg); | 112 BytecodeArrayBuilder& StoreAccumulatorInRegister(Register reg); |
105 | 113 |
106 // Register-register transfer. | 114 // Register-register transfer. |
107 BytecodeArrayBuilder& MoveRegister(Register from, Register to); | 115 BytecodeArrayBuilder& MoveRegister(Register from, Register to); |
108 | 116 |
109 // Named load property. | 117 // Named load property. |
110 BytecodeArrayBuilder& LoadNamedProperty(Register object, | 118 BytecodeArrayBuilder& LoadNamedProperty(Register object, |
111 const Handle<Name> name, | 119 const Handle<Name> name, |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 static int const kNoFeedbackSlot = 0; | 411 static int const kNoFeedbackSlot = 0; |
404 | 412 |
405 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 413 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
406 }; | 414 }; |
407 | 415 |
408 } // namespace interpreter | 416 } // namespace interpreter |
409 } // namespace internal | 417 } // namespace internal |
410 } // namespace v8 | 418 } // namespace v8 |
411 | 419 |
412 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 420 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |