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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // Call the runtime function with |function_id|. The first argument should be | 78 // Call the runtime function with |function_id|. The first argument should be |
79 // in |first_arg| and all subsequent arguments should be in registers | 79 // in |first_arg| and all subsequent arguments should be in registers |
80 // <first_arg + 1> to <first_arg + 1 + arg_count>. | 80 // <first_arg + 1> to <first_arg + 1 + arg_count>. |
81 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, | 81 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, |
82 Register first_arg, size_t arg_count); | 82 Register first_arg, size_t arg_count); |
83 | 83 |
84 // Operators (register == lhs, accumulator = rhs). | 84 // Operators (register == lhs, accumulator = rhs). |
85 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg); | 85 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg); |
86 | 86 |
| 87 // Unary Operators. |
| 88 BytecodeArrayBuilder& LogicalNot(); |
| 89 BytecodeArrayBuilder& TypeOf(); |
| 90 |
87 // Tests. | 91 // Tests. |
88 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, | 92 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, |
89 LanguageMode language_mode); | 93 LanguageMode language_mode); |
90 | 94 |
91 // Casts | 95 // Casts |
92 BytecodeArrayBuilder& CastAccumulatorToBoolean(); | 96 BytecodeArrayBuilder& CastAccumulatorToBoolean(); |
93 | 97 |
94 // Flow Control. | 98 // Flow Control. |
95 BytecodeArrayBuilder& Bind(BytecodeLabel* label); | 99 BytecodeArrayBuilder& Bind(BytecodeLabel* label); |
96 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); | 100 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 227 |
224 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 228 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
225 }; | 229 }; |
226 | 230 |
227 | 231 |
228 } // namespace interpreter | 232 } // namespace interpreter |
229 } // namespace internal | 233 } // namespace internal |
230 } // namespace v8 | 234 } // namespace v8 |
231 | 235 |
232 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 236 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |