| 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.h" | 10 #include "src/ast.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key, | 78 BytecodeArrayBuilder& StoreKeyedProperty(Register object, Register key, |
| 79 int feedback_slot, | 79 int feedback_slot, |
| 80 LanguageMode language_mode); | 80 LanguageMode language_mode); |
| 81 | 81 |
| 82 // Push the context in accumulator as the new context, and store in register | 82 // Push the context in accumulator as the new context, and store in register |
| 83 // |context|. | 83 // |context|. |
| 84 BytecodeArrayBuilder& PushContext(Register context); | 84 BytecodeArrayBuilder& PushContext(Register context); |
| 85 // Pop the current context and replace with |context| | 85 // Pop the current context and replace with |context| |
| 86 BytecodeArrayBuilder& PopContext(Register context); | 86 BytecodeArrayBuilder& PopContext(Register context); |
| 87 | 87 |
| 88 // Create a new closure for the SharedFunctionInfo in the accumulator. |
| 89 BytecodeArrayBuilder& CreateClosure(PretenureFlag tenured); |
| 88 | 90 |
| 89 // Call a JS function. The JSFunction or Callable to be called should be in | 91 // Call a JS function. The JSFunction or Callable to be called should be in |
| 90 // |callable|, the receiver should be in |receiver| and all subsequent | 92 // |callable|, the receiver should be in |receiver| and all subsequent |
| 91 // arguments should be in registers <receiver + 1> to | 93 // arguments should be in registers <receiver + 1> to |
| 92 // <receiver + 1 + arg_count>. | 94 // <receiver + 1 + arg_count>. |
| 93 BytecodeArrayBuilder& Call(Register callable, Register receiver, | 95 BytecodeArrayBuilder& Call(Register callable, Register receiver, |
| 94 size_t arg_count); | 96 size_t arg_count); |
| 95 | 97 |
| 96 // Call the runtime function with |function_id|. The first argument should be | 98 // Call the runtime function with |function_id|. The first argument should be |
| 97 // in |first_arg| and all subsequent arguments should be in registers | 99 // in |first_arg| and all subsequent arguments should be in registers |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 253 |
| 252 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 254 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
| 253 }; | 255 }; |
| 254 | 256 |
| 255 | 257 |
| 256 } // namespace interpreter | 258 } // namespace interpreter |
| 257 } // namespace internal | 259 } // namespace internal |
| 258 } // namespace v8 | 260 } // namespace v8 |
| 259 | 261 |
| 260 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 262 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |