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