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

Side by Side Diff: runtime/vm/regexp.cc

Issue 722243002: Indirectly dispatch all backtracking jumps through the same block. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: return on unreachable Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/regexp.h ('k') | runtime/vm/regexp_assembler.h » ('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 #include "vm/regexp.h" 5 #include "vm/regexp.h"
6 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/regexp_assembler.h" 8 #include "vm/regexp_assembler.h"
9 #include "vm/regexp_ast.h" 9 #include "vm/regexp_ast.h"
10 #include "vm/unibrow-inl.h" 10 #include "vm/unibrow-inl.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 macro_assembler_->PushBacktrack(&fail); 401 macro_assembler_->PushBacktrack(&fail);
402 Trace new_trace; 402 Trace new_trace;
403 start->Emit(this, &new_trace); 403 start->Emit(this, &new_trace);
404 macro_assembler_->BindBlock(&fail); 404 macro_assembler_->BindBlock(&fail);
405 macro_assembler_->Fail(); 405 macro_assembler_->Fail();
406 while (!work_list.is_empty()) { 406 while (!work_list.is_empty()) {
407 work_list.RemoveLast()->Emit(this, &new_trace); 407 work_list.RemoveLast()->Emit(this, &new_trace);
408 } 408 }
409 if (reg_exp_too_big_) return IrregexpRegExpTooBig(); 409 if (reg_exp_too_big_) return IrregexpRegExpTooBig();
410 410
411 macro_assembler->FinalizeIndirectGotos(); 411 macro_assembler->GenerateBacktrackBlock();
412 412
413 return RegExpEngine::CompilationResult(macro_assembler, 413 return RegExpEngine::CompilationResult(macro_assembler->backtrack_goto(),
414 macro_assembler->graph_entry(), 414 macro_assembler->graph_entry(),
415 macro_assembler->num_blocks(), 415 macro_assembler->num_blocks(),
416 macro_assembler->num_stack_locals()); 416 macro_assembler->num_stack_locals());
417 } 417 }
418 418
419 419
420 bool Trace::DeferredAction::Mentions(intptr_t that) { 420 bool Trace::DeferredAction::Mentions(intptr_t that) {
421 if (action_type() == ActionNode::CLEAR_CAPTURES) { 421 if (action_type() == ActionNode::CLEAR_CAPTURES) {
422 Interval range = static_cast<DeferredClearCaptures*>(this)->range(); 422 Interval range = static_cast<DeferredClearCaptures*>(this)->range();
423 return range.Contains(that); 423 return range.Contains(that);
(...skipping 4739 matching lines...) Expand 10 before | Expand all | Expand 10 after
5163 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner); 5163 CreateSpecializedFunction(isolate, regexp, kOneByteStringCid, owner);
5164 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner); 5164 CreateSpecializedFunction(isolate, regexp, kTwoByteStringCid, owner);
5165 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner); 5165 CreateSpecializedFunction(isolate, regexp, kExternalOneByteStringCid, owner);
5166 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner); 5166 CreateSpecializedFunction(isolate, regexp, kExternalTwoByteStringCid, owner);
5167 5167
5168 return regexp.raw(); 5168 return regexp.raw();
5169 } 5169 }
5170 5170
5171 5171
5172 } // namespace dart 5172 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/regexp.h ('k') | runtime/vm/regexp_assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698