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 VM_REGEXP_ASSEMBLER_H_ | 5 #ifndef VM_REGEXP_ASSEMBLER_H_ |
6 #define VM_REGEXP_ASSEMBLER_H_ | 6 #define VM_REGEXP_ASSEMBLER_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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 virtual void ClearRegisters(intptr_t reg_from, intptr_t reg_to); | 326 virtual void ClearRegisters(intptr_t reg_from, intptr_t reg_to); |
327 virtual void WriteStackPointerToRegister(intptr_t reg); | 327 virtual void WriteStackPointerToRegister(intptr_t reg); |
328 | 328 |
329 virtual void PrintBlocks(); | 329 virtual void PrintBlocks(); |
330 | 330 |
331 GraphEntryInstr* graph_entry() const { return entry_block_; } | 331 GraphEntryInstr* graph_entry() const { return entry_block_; } |
332 | 332 |
333 intptr_t num_stack_locals() const { return local_id_.Count(); } | 333 intptr_t num_stack_locals() const { return local_id_.Count(); } |
334 intptr_t num_blocks() const { return block_id_.Count(); } | 334 intptr_t num_blocks() const { return block_id_.Count(); } |
335 | 335 |
336 // A table mapping block ids to block offsets, used to look up offsets | 336 // Fill in the table mapping block ids to block offsets. Used to |
337 // for indirect goto instructions. | 337 // look up offsets for the computed indirect-goto instructions. |
338 void FinalizeBlockOffsetTable(); | 338 static void FinalizeBlockOffsetTable(Isolate* isolate, |
| 339 GraphEntryInstr* graph); |
339 | 340 |
340 // Fill in indirect goto successors. | 341 // Fill in indirect goto successors. |
341 void FinalizeIndirectGotos(); | 342 void FinalizeIndirectGotos(); |
342 | 343 |
343 private: | 344 private: |
344 // Generate the contents of preset blocks. The entry block is the entry point | 345 // Generate the contents of preset blocks. The entry block is the entry point |
345 // of the generated code. | 346 // of the generated code. |
346 void GenerateEntryBlock(); | 347 void GenerateEntryBlock(); |
347 // Performs backtracking, i.e. popping an offset from the stack and doing | 348 // Performs backtracking, i.e. popping an offset from the stack and doing |
348 // an indirect goto. | 349 // an indirect goto. |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 IdAllocator temp_id_; | 624 IdAllocator temp_id_; |
624 IdAllocator arg_id_; | 625 IdAllocator arg_id_; |
625 IdAllocator local_id_; | 626 IdAllocator local_id_; |
626 IdAllocator indirect_id_; | 627 IdAllocator indirect_id_; |
627 }; | 628 }; |
628 | 629 |
629 | 630 |
630 } // namespace dart | 631 } // namespace dart |
631 | 632 |
632 #endif // VM_REGEXP_ASSEMBLER_H_ | 633 #endif // VM_REGEXP_ASSEMBLER_H_ |
OLD | NEW |