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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 TypeofMode typeof_mode); | 128 TypeofMode typeof_mode); |
129 | 129 |
130 // Store value in the accumulator into the variable with |name|. | 130 // Store value in the accumulator into the variable with |name|. |
131 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name, | 131 BytecodeArrayBuilder& StoreLookupSlot(const Handle<String> name, |
132 LanguageMode language_mode); | 132 LanguageMode language_mode); |
133 | 133 |
134 // Create a new closure for the SharedFunctionInfo. | 134 // Create a new closure for the SharedFunctionInfo. |
135 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, | 135 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, |
136 int flags); | 136 int flags); |
137 | 137 |
| 138 // Create a new context with size |slots| in the accumulator. |
| 139 BytecodeArrayBuilder& CreateFunctionContext(int slots); |
| 140 |
138 // Create a new arguments object in the accumulator. | 141 // Create a new arguments object in the accumulator. |
139 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); | 142 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); |
140 | 143 |
141 // Literals creation. Constant elements should be in the accumulator. | 144 // Literals creation. Constant elements should be in the accumulator. |
142 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, | 145 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, |
143 int literal_index, int flags); | 146 int literal_index, int flags); |
144 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, | 147 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, |
145 int literal_index, int flags); | 148 int literal_index, int flags); |
146 BytecodeArrayBuilder& CreateObjectLiteral( | 149 BytecodeArrayBuilder& CreateObjectLiteral( |
147 Handle<FixedArray> constant_properties, int literal_index, int flags); | 150 Handle<FixedArray> constant_properties, int literal_index, int flags); |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 BytecodeSourceInfo latest_source_info_; | 386 BytecodeSourceInfo latest_source_info_; |
384 | 387 |
385 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 388 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
386 }; | 389 }; |
387 | 390 |
388 } // namespace interpreter | 391 } // namespace interpreter |
389 } // namespace internal | 392 } // namespace internal |
390 } // namespace v8 | 393 } // namespace v8 |
391 | 394 |
392 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 395 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |