Index: runtime/vm/regexp_assembler.h |
diff --git a/runtime/vm/regexp_assembler.h b/runtime/vm/regexp_assembler.h |
index 92a7f28dd382f62a953e3edbf1d85458514f2692..58bcfd4fb3f0f6ac6e53a51d63ddbe61e12b0599 100644 |
--- a/runtime/vm/regexp_assembler.h |
+++ b/runtime/vm/regexp_assembler.h |
@@ -328,25 +328,20 @@ class IRRegExpMacroAssembler: public RegExpMacroAssembler { |
virtual void PrintBlocks(); |
+ IndirectGotoInstr* backtrack_goto() const { return backtrack_goto_; } |
GraphEntryInstr* graph_entry() const { return entry_block_; } |
intptr_t num_stack_locals() const { return local_id_.Count(); } |
intptr_t num_blocks() const { return block_id_.Count(); } |
- // A table mapping block ids to block offsets, used to look up offsets |
- // for indirect goto instructions. |
- void FinalizeBlockOffsetTable(); |
- |
- // Fill in indirect goto successors. |
- void FinalizeIndirectGotos(); |
+ // Generate a dispatch block implementing backtracking. Must be done after |
+ // graph construction. |
+ void GenerateBacktrackBlock(); |
private: |
// Generate the contents of preset blocks. The entry block is the entry point |
// of the generated code. |
void GenerateEntryBlock(); |
- // Performs backtracking, i.e. popping an offset from the stack and doing |
- // an indirect goto. |
- void GenerateBacktrackBlock(); |
// Copies capture indices into the result area and returns true. |
void GenerateSuccessBlock(); |
// Returns false. |
@@ -567,9 +562,13 @@ class IRRegExpMacroAssembler: public RegExpMacroAssembler { |
GraphEntryInstr* entry_block_; |
JoinEntryInstr* start_block_; |
JoinEntryInstr* success_block_; |
- JoinEntryInstr* backtrack_block_; |
JoinEntryInstr* exit_block_; |
+ // TODO(zerny): Implement IR support for "computed gotos" and replace all uses |
Vyacheslav Egorov (Google)
2014/11/13 18:30:04
igoto is a computed goto - so this comment seems a
zerny-google
2014/11/14 13:29:29
Yes. I'll drop it from here and add a TODO to the
|
+ // of the backtracking block by direct jumps. |
+ JoinEntryInstr* backtrack_block_; |
+ IndirectGotoInstr* backtrack_goto_; |
+ |
const ParsedFunction* parsed_function_; |
const ZoneGrowableArray<const ICData*>& ic_data_array_; |
@@ -617,8 +616,6 @@ class IRRegExpMacroAssembler: public RegExpMacroAssembler { |
// The actual array object used as the stack. |
GrowableObjectArray& stack_array_; |
- GrowableArray<IndirectGotoInstr*> igotos_; |
- |
IdAllocator block_id_; |
IdAllocator temp_id_; |
IdAllocator arg_id_; |