| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 LanguageMode language_mode); | 124 LanguageMode language_mode); |
| 125 | 125 |
| 126 // Lookup the variable with |name|. | 126 // Lookup the variable with |name|. |
| 127 BytecodeArrayBuilder& LoadLookupSlot(const Handle<String> name, | 127 BytecodeArrayBuilder& LoadLookupSlot(const Handle<String> name, |
| 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 a SharedFunctionInfo which will be inserted at |
| 135 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, | 135 // constant pool index |entry|. |
| 136 int flags); | 136 BytecodeArrayBuilder& CreateClosure(size_t entry, int flags); |
| 137 | 137 |
| 138 // Create a new arguments object in the accumulator. | 138 // Create a new arguments object in the accumulator. |
| 139 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); | 139 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); |
| 140 | 140 |
| 141 // Literals creation. Constant elements should be in the accumulator. | 141 // Literals creation. Constant elements should be in the accumulator. |
| 142 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, | 142 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, |
| 143 int literal_index, int flags); | 143 int literal_index, int flags); |
| 144 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, | 144 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, |
| 145 int literal_index, int flags); | 145 int literal_index, int flags); |
| 146 BytecodeArrayBuilder& CreateObjectLiteral( | 146 BytecodeArrayBuilder& CreateObjectLiteral( |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 BytecodeSourceInfo latest_source_info_; | 380 BytecodeSourceInfo latest_source_info_; |
| 381 | 381 |
| 382 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 382 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 383 }; | 383 }; |
| 384 | 384 |
| 385 } // namespace interpreter | 385 } // namespace interpreter |
| 386 } // namespace internal | 386 } // namespace internal |
| 387 } // namespace v8 | 387 } // namespace v8 |
| 388 | 388 |
| 389 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 389 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |