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

Side by Side Diff: src/regexp/regexp-parser.cc

Issue 2452403003: Changed statement ZoneList to a ZoneChunkList
Patch Set: Created 4 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
« no previous file with comments | « src/regexp/regexp-ast.h ('k') | src/type-info.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/regexp/regexp-parser.h" 5 #include "src/regexp/regexp-parser.h"
6 6
7 #include "src/char-predicates-inl.h" 7 #include "src/char-predicates-inl.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 } else { 714 } else {
715 v->push_back(unibrow::Utf16::LeadSurrogate(code_unit)); 715 v->push_back(unibrow::Utf16::LeadSurrogate(code_unit));
716 v->push_back(unibrow::Utf16::TrailSurrogate(code_unit)); 716 v->push_back(unibrow::Utf16::TrailSurrogate(code_unit));
717 } 717 }
718 } 718 }
719 719
720 const ZoneVector<uc16>* RegExpParser::ParseCaptureGroupName() { 720 const ZoneVector<uc16>* RegExpParser::ParseCaptureGroupName() {
721 DCHECK(FLAG_harmony_regexp_named_captures); 721 DCHECK(FLAG_harmony_regexp_named_captures);
722 DCHECK(unicode()); 722 DCHECK(unicode());
723 723
724 ZoneVector<uc16>* name = 724 ZoneVector<uc16>* name = new (zone()) ZoneVector<uc16>(zone());
725 new (zone()->New(sizeof(ZoneVector<uc16>))) ZoneVector<uc16>(zone());
726 725
727 bool at_start = true; 726 bool at_start = true;
728 while (true) { 727 while (true) {
729 uc32 c = current(); 728 uc32 c = current();
730 Advance(); 729 Advance();
731 730
732 // Convert unicode escapes. 731 // Convert unicode escapes.
733 if (c == '\\' && current() == 'u') { 732 if (c == '\\' && current() == 'u') {
734 Advance(); 733 Advance();
735 if (!ParseUnicodeEscape(&c)) { 734 if (!ParseUnicodeEscape(&c)) {
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 return false; 1786 return false;
1788 } 1787 }
1789 terms_.Add(new (zone()) RegExpQuantifier(min, max, quantifier_type, atom), 1788 terms_.Add(new (zone()) RegExpQuantifier(min, max, quantifier_type, atom),
1790 zone()); 1789 zone());
1791 LAST(ADD_TERM); 1790 LAST(ADD_TERM);
1792 return true; 1791 return true;
1793 } 1792 }
1794 1793
1795 } // namespace internal 1794 } // namespace internal
1796 } // namespace v8 1795 } // namespace v8
OLDNEW
« no previous file with comments | « src/regexp/regexp-ast.h ('k') | src/type-info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698