| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 // Create a new arguments object in the accumulator. | 141 // Create a new arguments object in the accumulator. |
| 142 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); | 142 BytecodeArrayBuilder& CreateArguments(CreateArgumentsType type); |
| 143 | 143 |
| 144 // Literals creation. Constant elements should be in the accumulator. | 144 // Literals creation. Constant elements should be in the accumulator. |
| 145 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, | 145 BytecodeArrayBuilder& CreateRegExpLiteral(Handle<String> pattern, |
| 146 int literal_index, int flags); | 146 int literal_index, int flags); |
| 147 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, | 147 BytecodeArrayBuilder& CreateArrayLiteral(Handle<FixedArray> constant_elements, |
| 148 int literal_index, int flags); | 148 int literal_index, int flags); |
| 149 BytecodeArrayBuilder& CreateObjectLiteral( | 149 BytecodeArrayBuilder& CreateObjectLiteral( |
| 150 Handle<FixedArray> constant_properties, int literal_index, int flags); | 150 Handle<FixedArray> constant_properties, int literal_index, int flags, |
| 151 Register output); |
| 151 | 152 |
| 152 // Push the context in accumulator as the new context, and store in register | 153 // Push the context in accumulator as the new context, and store in register |
| 153 // |context|. | 154 // |context|. |
| 154 BytecodeArrayBuilder& PushContext(Register context); | 155 BytecodeArrayBuilder& PushContext(Register context); |
| 155 | 156 |
| 156 // Pop the current context and replace with |context|. | 157 // Pop the current context and replace with |context|. |
| 157 BytecodeArrayBuilder& PopContext(Register context); | 158 BytecodeArrayBuilder& PopContext(Register context); |
| 158 | 159 |
| 159 // Call a JS function. The JSFunction or Callable to be called should be in | 160 // Call a JS function. The JSFunction or Callable to be called should be in |
| 160 // |callable|, the receiver should be in |receiver_args| and all subsequent | 161 // |callable|, the receiver should be in |receiver_args| and all subsequent |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 BytecodeSourceInfo latest_source_info_; | 387 BytecodeSourceInfo latest_source_info_; |
| 387 | 388 |
| 388 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 389 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 389 }; | 390 }; |
| 390 | 391 |
| 391 } // namespace interpreter | 392 } // namespace interpreter |
| 392 } // namespace internal | 393 } // namespace internal |
| 393 } // namespace v8 | 394 } // namespace v8 |
| 394 | 395 |
| 395 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 396 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |