| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 // Flow Control. | 243 // Flow Control. |
| 244 BytecodeArrayBuilder& Bind(BytecodeLabel* label); | 244 BytecodeArrayBuilder& Bind(BytecodeLabel* label); |
| 245 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); | 245 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); |
| 246 | 246 |
| 247 BytecodeArrayBuilder& Jump(BytecodeLabel* label); | 247 BytecodeArrayBuilder& Jump(BytecodeLabel* label); |
| 248 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); | 248 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); |
| 249 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); | 249 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); |
| 250 BytecodeArrayBuilder& JumpIfNotHole(BytecodeLabel* label); | 250 BytecodeArrayBuilder& JumpIfNotHole(BytecodeLabel* label); |
| 251 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); | 251 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); |
| 252 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label); | 252 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label); |
| 253 BytecodeArrayBuilder& JumpLoop(BytecodeLabel* label, int loop_depth); |
| 253 | 254 |
| 254 BytecodeArrayBuilder& StackCheck(int position); | 255 BytecodeArrayBuilder& StackCheck(int position); |
| 255 | 256 |
| 256 BytecodeArrayBuilder& OsrPoll(int loop_depth); | |
| 257 | |
| 258 BytecodeArrayBuilder& Throw(); | 257 BytecodeArrayBuilder& Throw(); |
| 259 BytecodeArrayBuilder& ReThrow(); | 258 BytecodeArrayBuilder& ReThrow(); |
| 260 BytecodeArrayBuilder& Return(); | 259 BytecodeArrayBuilder& Return(); |
| 261 | 260 |
| 262 // Debugger. | 261 // Debugger. |
| 263 BytecodeArrayBuilder& Debugger(); | 262 BytecodeArrayBuilder& Debugger(); |
| 264 | 263 |
| 265 // Complex flow control. | 264 // Complex flow control. |
| 266 BytecodeArrayBuilder& ForInPrepare(Register receiver, | 265 BytecodeArrayBuilder& ForInPrepare(Register receiver, |
| 267 Register cache_info_triple); | 266 Register cache_info_triple); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 static Bytecode BytecodeForCall(TailCallMode tail_call_mode); | 340 static Bytecode BytecodeForCall(TailCallMode tail_call_mode); |
| 342 | 341 |
| 343 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, | 342 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
| 344 uint32_t operand2, uint32_t operand3); | 343 uint32_t operand2, uint32_t operand3); |
| 345 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, | 344 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, |
| 346 uint32_t operand2); | 345 uint32_t operand2); |
| 347 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1); | 346 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1); |
| 348 void Output(Bytecode bytecode, uint32_t operand0); | 347 void Output(Bytecode bytecode, uint32_t operand0); |
| 349 void Output(Bytecode bytecode); | 348 void Output(Bytecode bytecode); |
| 350 | 349 |
| 351 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode, | 350 BytecodeArrayBuilder& OutputJump(BytecodeNode* node, BytecodeLabel* label); |
| 352 BytecodeLabel* label); | |
| 353 | 351 |
| 354 bool RegisterIsValid(Register reg) const; | 352 bool RegisterIsValid(Register reg) const; |
| 355 bool OperandsAreValid(Bytecode bytecode, int operand_count, | 353 bool OperandsAreValid(Bytecode bytecode, int operand_count, |
| 356 uint32_t operand0 = 0, uint32_t operand1 = 0, | 354 uint32_t operand0 = 0, uint32_t operand1 = 0, |
| 357 uint32_t operand2 = 0, uint32_t operand3 = 0) const; | 355 uint32_t operand2 = 0, uint32_t operand3 = 0) const; |
| 358 | 356 |
| 359 // Attach latest source position to |node|. | 357 // Attach latest source position to |node|. |
| 360 void AttachSourceInfo(BytecodeNode* node); | 358 void AttachSourceInfo(BytecodeNode* node); |
| 361 | 359 |
| 362 // Set position for return. | 360 // Set position for return. |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 static int const kNoFeedbackSlot = 0; | 401 static int const kNoFeedbackSlot = 0; |
| 404 | 402 |
| 405 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); | 403 DISALLOW_COPY_AND_ASSIGN(BytecodeArrayBuilder); |
| 406 }; | 404 }; |
| 407 | 405 |
| 408 } // namespace interpreter | 406 } // namespace interpreter |
| 409 } // namespace internal | 407 } // namespace internal |
| 410 } // namespace v8 | 408 } // namespace v8 |
| 411 | 409 |
| 412 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 410 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
| OLD | NEW |