| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/ast/ast.h" | 10 #include "src/ast/ast.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 LanguageMode language_mode); | 118 LanguageMode language_mode); |
| 119 | 119 |
| 120 // Create a new closure for the SharedFunctionInfo. | 120 // Create a new closure for the SharedFunctionInfo. |
| 121 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, | 121 BytecodeArrayBuilder& CreateClosure(Handle<SharedFunctionInfo> shared_info, |
| 122 PretenureFlag tenured); | 122 PretenureFlag tenured); |
| 123 | 123 |
| 124 // Create a new arguments object in the accumulator. | 124 // Create a new arguments object in the accumulator. |
| 125 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); | 125 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); |
| 126 | 126 |
| 127 // Literals creation. Constant elements should be in the accumulator. | 127 // Literals creation. Constant elements should be in the accumulator. |
| 128 BytecodeArrayBuilder& CreateRegExpLiteral(int literal_index, int flags); | 128 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, |
| 129 BytecodeArrayBuilder& CreateArrayLiteral(int literal_index, int flags); | 129 int literal_index, int flags); |
| 130 BytecodeArrayBuilder& CreateObjectLiteral(int literal_index, int flags); | 130 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, |
| 131 int literal_index, int flags); |
| 132 BytecodeArrayBuilder& CreateObjectLiteral( |
| 133 Handle<FixedArray> constant_properties, int literal_index, int flags); |
| 131 | 134 |
| 132 // Push the context in accumulator as the new context, and store in register | 135 // Push the context in accumulator as the new context, and store in register |
| 133 // |context|. | 136 // |context|. |
| 134 BytecodeArrayBuilder& PushContext(Register context); | 137 BytecodeArrayBuilder& PushContext(Register context); |
| 135 | 138 |
| 136 // Pop the current context and replace with |context|. | 139 // Pop the current context and replace with |context|. |
| 137 BytecodeArrayBuilder& PopContext(Register context); | 140 BytecodeArrayBuilder& PopContext(Register context); |
| 138 | 141 |
| 139 // Call a JS function. The JSFunction or Callable to be called should be in | 142 // Call a JS function. The JSFunction or Callable to be called should be in |
| 140 // |callable|, the receiver should be in |receiver| and all subsequent | 143 // |callable|, the receiver should be in |receiver| and all subsequent |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 362 |
| 360 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 363 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
| 361 }; | 364 }; |
| 362 | 365 |
| 363 | 366 |
| 364 } // namespace interpreter | 367 } // namespace interpreter |
| 365 } // namespace internal | 368 } // namespace internal |
| 366 } // namespace v8 | 369 } // namespace v8 |
| 367 | 370 |
| 368 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 371 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |