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

Side by Side Diff: src/ast.h

Issue 1174713002: Reland of 'Optimize trivial regexp disjunctions' CL 1176453002 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix for the out-of-bounds sort that caused the revert Created 5 years, 6 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 | « no previous file | src/jsregexp.h » ('j') | src/jsregexp.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_AST_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 2854 matching lines...) Expand 10 before | Expand all | Expand 10 after
2865 RegExpNode* on_success) override; 2865 RegExpNode* on_success) override;
2866 RegExpDisjunction* AsDisjunction() override; 2866 RegExpDisjunction* AsDisjunction() override;
2867 Interval CaptureRegisters() override; 2867 Interval CaptureRegisters() override;
2868 bool IsDisjunction() override; 2868 bool IsDisjunction() override;
2869 bool IsAnchoredAtStart() override; 2869 bool IsAnchoredAtStart() override;
2870 bool IsAnchoredAtEnd() override; 2870 bool IsAnchoredAtEnd() override;
2871 int min_match() override { return min_match_; } 2871 int min_match() override { return min_match_; }
2872 int max_match() override { return max_match_; } 2872 int max_match() override { return max_match_; }
2873 ZoneList<RegExpTree*>* alternatives() { return alternatives_; } 2873 ZoneList<RegExpTree*>* alternatives() { return alternatives_; }
2874 private: 2874 private:
2875 bool SortConsecutiveAtoms(RegExpCompiler* compiler);
2876 void RationalizeConsecutiveAtoms(RegExpCompiler* compiler);
2877 void FixSingleCharacterDisjunctions(RegExpCompiler* compiler);
2875 ZoneList<RegExpTree*>* alternatives_; 2878 ZoneList<RegExpTree*>* alternatives_;
2876 int min_match_; 2879 int min_match_;
2877 int max_match_; 2880 int max_match_;
2878 }; 2881 };
2879 2882
2880 2883
2881 class RegExpAlternative final : public RegExpTree { 2884 class RegExpAlternative final : public RegExpTree {
2882 public: 2885 public:
2883 explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes); 2886 explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
2884 void* Accept(RegExpVisitor* visitor, void* data) override; 2887 void* Accept(RegExpVisitor* visitor, void* data) override;
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
3594 3597
3595 private: 3598 private:
3596 Zone* zone_; 3599 Zone* zone_;
3597 AstValueFactory* ast_value_factory_; 3600 AstValueFactory* ast_value_factory_;
3598 }; 3601 };
3599 3602
3600 3603
3601 } } // namespace v8::internal 3604 } } // namespace v8::internal
3602 3605
3603 #endif // V8_AST_H_ 3606 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/jsregexp.h » ('j') | src/jsregexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698