| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 Register first_arg, size_t arg_count, | 192 Register first_arg, size_t arg_count, |
| 193 Register first_return); | 193 Register first_return); |
| 194 | 194 |
| 195 // Call the JS runtime function with |context_index|. The the receiver should | 195 // Call the JS runtime function with |context_index|. The the receiver should |
| 196 // be in |receiver_args| and all subsequent arguments should be in registers | 196 // be in |receiver_args| and all subsequent arguments should be in registers |
| 197 // <receiver + 1> to <receiver + receiver_args_count - 1>. | 197 // <receiver + 1> to <receiver + receiver_args_count - 1>. |
| 198 BytecodeArrayBuilder& CallJSRuntime(int context_index, Register receiver_args, | 198 BytecodeArrayBuilder& CallJSRuntime(int context_index, Register receiver_args, |
| 199 size_t receiver_args_count); | 199 size_t receiver_args_count); |
| 200 | 200 |
| 201 // Operators (register holds the lhs value, accumulator holds the rhs value). | 201 // Operators (register holds the lhs value, accumulator holds the rhs value). |
| 202 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg); | 202 // Type feedback will be recorded in the |feedback_slot| |
| 203 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, |
| 204 int feedback_slot); |
| 203 | 205 |
| 204 // Count Operators (value stored in accumulator). | 206 // Count Operators (value stored in accumulator). |
| 205 BytecodeArrayBuilder& CountOperation(Token::Value op); | 207 // Type feedback will be recorded in the |feedback_slot| |
| 208 BytecodeArrayBuilder& CountOperation(Token::Value op, int feedback_slot); |
| 206 | 209 |
| 207 // Unary Operators. | 210 // Unary Operators. |
| 208 BytecodeArrayBuilder& LogicalNot(); | 211 BytecodeArrayBuilder& LogicalNot(); |
| 209 BytecodeArrayBuilder& TypeOf(); | 212 BytecodeArrayBuilder& TypeOf(); |
| 210 | 213 |
| 211 // Deletes property from an object. This expects that accumulator contains | 214 // Deletes property from an object. This expects that accumulator contains |
| 212 // the key to be deleted and the register contains a reference to the object. | 215 // the key to be deleted and the register contains a reference to the object. |
| 213 BytecodeArrayBuilder& Delete(Register object, LanguageMode language_mode); | 216 BytecodeArrayBuilder& Delete(Register object, LanguageMode language_mode); |
| 214 | 217 |
| 215 // Tests. | 218 // Tests. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 BytecodeSourceInfo latest_source_info_; | 389 BytecodeSourceInfo latest_source_info_; |
| 387 | 390 |
| 388 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 391 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 389 }; | 392 }; |
| 390 | 393 |
| 391 } // namespace interpreter | 394 } // namespace interpreter |
| 392 } // namespace internal | 395 } // namespace internal |
| 393 } // namespace v8 | 396 } // namespace v8 |
| 394 | 397 |
| 395 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 398 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |