| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_ | 5 #ifndef RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_ |
| 6 #define RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_ | 6 #define RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_ |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 // Generate a dispatch block implementing backtracking. Must be done after | 126 // Generate a dispatch block implementing backtracking. Must be done after |
| 127 // graph construction. | 127 // graph construction. |
| 128 void GenerateBacktrackBlock(); | 128 void GenerateBacktrackBlock(); |
| 129 | 129 |
| 130 // Allocate the actual registers array once its size is known. Must be done | 130 // Allocate the actual registers array once its size is known. Must be done |
| 131 // after graph construction. | 131 // after graph construction. |
| 132 void FinalizeRegistersArray(); | 132 void FinalizeRegistersArray(); |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 intptr_t GetNextDeoptId() const { return thread_->GetNextDeoptId(); } | |
| 136 | |
| 137 // Generate the contents of preset blocks. The entry block is the entry point | 135 // Generate the contents of preset blocks. The entry block is the entry point |
| 138 // of the generated code. | 136 // of the generated code. |
| 139 void GenerateEntryBlock(); | 137 void GenerateEntryBlock(); |
| 140 // Copies capture indices into the result area and returns true. | 138 // Copies capture indices into the result area and returns true. |
| 141 void GenerateSuccessBlock(); | 139 void GenerateSuccessBlock(); |
| 142 // Returns false. | 140 // Returns false. |
| 143 void GenerateExitBlock(); | 141 void GenerateExitBlock(); |
| 144 | 142 |
| 145 enum ComparisonKind { | 143 enum ComparisonKind { |
| 146 kEQ, | 144 kEQ, |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 } | 352 } |
| 355 void Dealloc(intptr_t count = 1) { | 353 void Dealloc(intptr_t count = 1) { |
| 356 ASSERT(count <= next_id); | 354 ASSERT(count <= next_id); |
| 357 next_id -= count; | 355 next_id -= count; |
| 358 } | 356 } |
| 359 | 357 |
| 360 private: | 358 private: |
| 361 intptr_t next_id; | 359 intptr_t next_id; |
| 362 }; | 360 }; |
| 363 | 361 |
| 364 Thread* thread_; | |
| 365 | |
| 366 // Which mode to generate code for (ASCII or UC16). | 362 // Which mode to generate code for (ASCII or UC16). |
| 367 Mode mode_; | 363 Mode mode_; |
| 368 | 364 |
| 369 // Which specific string class to generate code for. | 365 // Which specific string class to generate code for. |
| 370 intptr_t specialization_cid_; | 366 intptr_t specialization_cid_; |
| 371 | 367 |
| 372 // Block entries used internally. | 368 // Block entries used internally. |
| 373 GraphEntryInstr* entry_block_; | 369 GraphEntryInstr* entry_block_; |
| 374 JoinEntryInstr* start_block_; | 370 JoinEntryInstr* start_block_; |
| 375 JoinEntryInstr* success_block_; | 371 JoinEntryInstr* success_block_; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 IdAllocator temp_id_; | 431 IdAllocator temp_id_; |
| 436 IdAllocator arg_id_; | 432 IdAllocator arg_id_; |
| 437 IdAllocator local_id_; | 433 IdAllocator local_id_; |
| 438 IdAllocator indirect_id_; | 434 IdAllocator indirect_id_; |
| 439 }; | 435 }; |
| 440 | 436 |
| 441 | 437 |
| 442 } // namespace dart | 438 } // namespace dart |
| 443 | 439 |
| 444 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_ | 440 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_ |
| OLD | NEW |