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

Side by Side Diff: src/builtins/builtins-regexp.h

Issue 2671673003: Revert of [string] Migrate String.prototype.{split,replace} to TF (Closed)
Patch Set: Created 3 years, 10 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 | « src/builtins/builtins.h ('k') | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_BUILTINS_BUILTINS_REGEXP_H_
6 #define V8_BUILTINS_BUILTINS_REGEXP_H_
7
8 #include "src/code-stub-assembler.h"
9
10 namespace v8 {
11 namespace internal {
12
13 typedef compiler::Node Node;
14 typedef compiler::CodeAssemblerState CodeAssemblerState;
15 typedef compiler::CodeAssemblerLabel CodeAssemblerLabel;
16
17 class RegExpBuiltinsAssembler : public CodeStubAssembler {
18 public:
19 explicit RegExpBuiltinsAssembler(CodeAssemblerState* state)
20 : CodeStubAssembler(state) {}
21
22 void BranchIfFastRegExp(Node* context, Node* map, Label* if_isunmodified,
23 Label* if_ismodified);
24
25 protected:
26 Node* FastLoadLastIndex(Node* regexp);
27 Node* SlowLoadLastIndex(Node* context, Node* regexp);
28 Node* LoadLastIndex(Node* context, Node* regexp, bool is_fastpath);
29
30 void FastStoreLastIndex(Node* regexp, Node* value);
31 void SlowStoreLastIndex(Node* context, Node* regexp, Node* value);
32 void StoreLastIndex(Node* context, Node* regexp, Node* value,
33 bool is_fastpath);
34
35 Node* ConstructNewResultFromMatchInfo(Node* const context, Node* const regexp,
36 Node* const match_info,
37 Node* const string);
38
39 Node* RegExpPrototypeExecBodyWithoutResult(Node* const context,
40 Node* const regexp,
41 Node* const string,
42 Label* if_didnotmatch,
43 const bool is_fastpath);
44 Node* RegExpPrototypeExecBody(Node* const context, Node* const regexp,
45 Node* const string, const bool is_fastpath);
46
47 Node* ThrowIfNotJSReceiver(Node* context, Node* maybe_receiver,
48 MessageTemplate::Template msg_template,
49 char const* method_name);
50
51 Node* IsInitialRegExpMap(Node* context, Node* map);
52 void BranchIfFastRegExpResult(Node* context, Node* map,
53 Label* if_isunmodified, Label* if_ismodified);
54
55 Node* FlagsGetter(Node* const context, Node* const regexp, bool is_fastpath);
56
57 Node* FastFlagGetter(Node* const regexp, JSRegExp::Flag flag);
58 Node* SlowFlagGetter(Node* const context, Node* const regexp,
59 JSRegExp::Flag flag);
60 Node* FlagGetter(Node* const context, Node* const regexp, JSRegExp::Flag flag,
61 bool is_fastpath);
62 void FlagGetter(JSRegExp::Flag flag, v8::Isolate::UseCounterFeature counter,
63 const char* method_name);
64
65 Node* IsRegExp(Node* const context, Node* const maybe_receiver);
66 Node* RegExpInitialize(Node* const context, Node* const regexp,
67 Node* const maybe_pattern, Node* const maybe_flags);
68
69 Node* RegExpExec(Node* context, Node* regexp, Node* string);
70
71 Node* AdvanceStringIndex(Node* const string, Node* const index,
72 Node* const is_unicode);
73
74 void RegExpPrototypeMatchBody(Node* const context, Node* const regexp,
75 Node* const string, const bool is_fastpath);
76
77 void RegExpPrototypeSearchBodyFast(Node* const context, Node* const regexp,
78 Node* const string);
79 void RegExpPrototypeSearchBodySlow(Node* const context, Node* const regexp,
80 Node* const string);
81
82 void RegExpPrototypeSplitBody(Node* const context, Node* const regexp,
83 Node* const string, Node* const limit);
84
85 Node* ReplaceGlobalCallableFastPath(Node* context, Node* regexp, Node* string,
86 Node* replace_callable);
87 Node* ReplaceSimpleStringFastPath(Node* context, Node* regexp, Node* string,
88 Node* replace_string);
89 };
90
91 } // namespace internal
92 } // namespace v8
93
94 #endif // V8_BUILTINS_BUILTINS_REGEXP_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698