Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: runtime/vm/regexp_assembler_ir.h

Issue 2896903002: Shuffle around deopt id allocation to give the flow graph builder a chance to record other data as … (Closed)
Patch Set: . Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/regexp_assembler.cc ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
135 // Generate the contents of preset blocks. The entry block is the entry point 137 // Generate the contents of preset blocks. The entry block is the entry point
136 // of the generated code. 138 // of the generated code.
137 void GenerateEntryBlock(); 139 void GenerateEntryBlock();
138 // Copies capture indices into the result area and returns true. 140 // Copies capture indices into the result area and returns true.
139 void GenerateSuccessBlock(); 141 void GenerateSuccessBlock();
140 // Returns false. 142 // Returns false.
141 void GenerateExitBlock(); 143 void GenerateExitBlock();
142 144
143 enum ComparisonKind { 145 enum ComparisonKind {
144 kEQ, 146 kEQ,
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 } 354 }
353 void Dealloc(intptr_t count = 1) { 355 void Dealloc(intptr_t count = 1) {
354 ASSERT(count <= next_id); 356 ASSERT(count <= next_id);
355 next_id -= count; 357 next_id -= count;
356 } 358 }
357 359
358 private: 360 private:
359 intptr_t next_id; 361 intptr_t next_id;
360 }; 362 };
361 363
364 Thread* thread_;
365
362 // Which mode to generate code for (ASCII or UC16). 366 // Which mode to generate code for (ASCII or UC16).
363 Mode mode_; 367 Mode mode_;
364 368
365 // Which specific string class to generate code for. 369 // Which specific string class to generate code for.
366 intptr_t specialization_cid_; 370 intptr_t specialization_cid_;
367 371
368 // Block entries used internally. 372 // Block entries used internally.
369 GraphEntryInstr* entry_block_; 373 GraphEntryInstr* entry_block_;
370 JoinEntryInstr* start_block_; 374 JoinEntryInstr* start_block_;
371 JoinEntryInstr* success_block_; 375 JoinEntryInstr* success_block_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 IdAllocator temp_id_; 435 IdAllocator temp_id_;
432 IdAllocator arg_id_; 436 IdAllocator arg_id_;
433 IdAllocator local_id_; 437 IdAllocator local_id_;
434 IdAllocator indirect_id_; 438 IdAllocator indirect_id_;
435 }; 439 };
436 440
437 441
438 } // namespace dart 442 } // namespace dart
439 443
440 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_ 444 #endif // RUNTIME_VM_REGEXP_ASSEMBLER_IR_H_
OLDNEW
« no previous file with comments | « runtime/vm/regexp_assembler.cc ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698