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 #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 Loading... |
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 Loading... |
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 |
OLD | NEW |