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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 the context chain starting |
98 BytecodeArrayBuilder& LoadContextSlot(Register context, int slot_index); | 98 // with |context| into the 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| in the |
101 BytecodeArrayBuilder& StoreContextSlot(Register context, int slot_index); | 103 // context chain starting with |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 Loading... |
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_ |
OLD | NEW |