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

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

Issue 2668703002: [stubs] Add RegExpReplace and RegExpSplit stubs (Closed)
Patch Set: Rebase 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
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 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 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_BUILTINS_BUILTINS_REGEXP_H_ 5 #ifndef V8_BUILTINS_BUILTINS_REGEXP_H_
6 #define V8_BUILTINS_BUILTINS_REGEXP_H_ 6 #define V8_BUILTINS_BUILTINS_REGEXP_H_
7 7
8 #include "src/code-stub-assembler.h" 8 #include "src/code-stub-assembler.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 typedef compiler::Node Node; 13 typedef compiler::Node Node;
14 typedef compiler::CodeAssemblerState CodeAssemblerState; 14 typedef compiler::CodeAssemblerState CodeAssemblerState;
15 typedef compiler::CodeAssemblerLabel CodeAssemblerLabel; 15 typedef compiler::CodeAssemblerLabel CodeAssemblerLabel;
16 16
17 class RegExpBuiltinsAssembler : public CodeStubAssembler { 17 class RegExpBuiltinsAssembler : public CodeStubAssembler {
18 public: 18 public:
19 explicit RegExpBuiltinsAssembler(CodeAssemblerState* state) 19 explicit RegExpBuiltinsAssembler(CodeAssemblerState* state)
20 : CodeStubAssembler(state) {} 20 : CodeStubAssembler(state) {}
21 21
22 void BranchIfFastRegExp(Node* context, Node* map, Label* if_isunmodified, 22 Node* IsFastRegExpMap(Node* context, Node* map);
23 Label* if_ismodified);
24 23
25 protected: 24 protected:
26 Node* FastLoadLastIndex(Node* regexp); 25 Node* FastLoadLastIndex(Node* regexp);
27 Node* SlowLoadLastIndex(Node* context, Node* regexp); 26 Node* SlowLoadLastIndex(Node* context, Node* regexp);
28 Node* LoadLastIndex(Node* context, Node* regexp, bool is_fastpath); 27 Node* LoadLastIndex(Node* context, Node* regexp, bool is_fastpath);
29 28
30 void FastStoreLastIndex(Node* regexp, Node* value); 29 void FastStoreLastIndex(Node* regexp, Node* value);
31 void SlowStoreLastIndex(Node* context, Node* regexp, Node* value); 30 void SlowStoreLastIndex(Node* context, Node* regexp, Node* value);
32 void StoreLastIndex(Node* context, Node* regexp, Node* value, 31 void StoreLastIndex(Node* context, Node* regexp, Node* value,
33 bool is_fastpath); 32 bool is_fastpath);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 Node* ReplaceGlobalCallableFastPath(Node* context, Node* regexp, Node* string, 84 Node* ReplaceGlobalCallableFastPath(Node* context, Node* regexp, Node* string,
86 Node* replace_callable); 85 Node* replace_callable);
87 Node* ReplaceSimpleStringFastPath(Node* context, Node* regexp, Node* string, 86 Node* ReplaceSimpleStringFastPath(Node* context, Node* regexp, Node* string,
88 Node* replace_string); 87 Node* replace_string);
89 }; 88 };
90 89
91 } // namespace internal 90 } // namespace internal
92 } // namespace v8 91 } // namespace v8
93 92
94 #endif // V8_BUILTINS_BUILTINS_REGEXP_H_ 93 #endif // V8_BUILTINS_BUILTINS_REGEXP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698