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/ast.h" | 10 #include "src/ast/ast.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 BytecodeArrayBuilder& Jump(BytecodeLabel* label); | 204 BytecodeArrayBuilder& Jump(BytecodeLabel* label); |
205 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); | 205 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); |
206 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); | 206 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); |
207 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); | 207 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); |
208 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label); | 208 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label); |
209 | 209 |
210 BytecodeArrayBuilder& Throw(); | 210 BytecodeArrayBuilder& Throw(); |
211 BytecodeArrayBuilder& Return(); | 211 BytecodeArrayBuilder& Return(); |
212 | 212 |
213 // Complex flow control. | 213 // Complex flow control. |
214 BytecodeArrayBuilder& ForInPrepare(Register receiver); | 214 BytecodeArrayBuilder& ForInPrepare(Register receiver, Register cache_type, |
215 BytecodeArrayBuilder& ForInNext(Register for_in_state, Register index); | 215 Register cache_array, |
216 BytecodeArrayBuilder& ForInDone(Register for_in_state); | 216 Register cache_length); |
| 217 BytecodeArrayBuilder& ForInNext(Register receiver, Register cache_type, |
| 218 Register cache_array, Register index); |
| 219 BytecodeArrayBuilder& ForInDone(Register index, Register cache_length); |
| 220 BytecodeArrayBuilder& ForInStep(Register index); |
217 | 221 |
218 // Accessors | 222 // Accessors |
219 Zone* zone() const { return zone_; } | 223 Zone* zone() const { return zone_; } |
220 | 224 |
221 private: | 225 private: |
222 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } | 226 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } |
223 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } | 227 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } |
224 Isolate* isolate() const { return isolate_; } | 228 Isolate* isolate() const { return isolate_; } |
225 | 229 |
226 static Bytecode BytecodeForBinaryOperation(Token::Value op); | 230 static Bytecode BytecodeForBinaryOperation(Token::Value op); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 377 |
374 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 378 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
375 }; | 379 }; |
376 | 380 |
377 | 381 |
378 } // namespace interpreter | 382 } // namespace interpreter |
379 } // namespace internal | 383 } // namespace internal |
380 } // namespace v8 | 384 } // namespace v8 |
381 | 385 |
382 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 386 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |