OLD | NEW |
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; | |
14 typedef compiler::CodeAssemblerState CodeAssemblerState; | |
15 typedef compiler::CodeAssemblerLabel CodeAssemblerLabel; | |
16 | |
17 class RegExpBuiltinsAssembler : public CodeStubAssembler { | 13 class RegExpBuiltinsAssembler : public CodeStubAssembler { |
18 public: | 14 public: |
19 explicit RegExpBuiltinsAssembler(CodeAssemblerState* state) | 15 explicit RegExpBuiltinsAssembler(compiler::CodeAssemblerState* state) |
20 : CodeStubAssembler(state) {} | 16 : CodeStubAssembler(state) {} |
21 | 17 |
22 void BranchIfFastRegExp(Node* const context, Node* const map, | 18 void BranchIfFastRegExp(Node* const context, Node* const map, |
23 Label* const if_isunmodified, | 19 Label* const if_isunmodified, |
24 Label* const if_ismodified); | 20 Label* const if_ismodified); |
25 | 21 |
26 protected: | 22 protected: |
27 Node* FastLoadLastIndex(Node* regexp); | 23 Node* FastLoadLastIndex(Node* regexp); |
28 Node* SlowLoadLastIndex(Node* context, Node* regexp); | 24 Node* SlowLoadLastIndex(Node* context, Node* regexp); |
29 Node* LoadLastIndex(Node* context, Node* regexp, bool is_fastpath); | 25 Node* LoadLastIndex(Node* context, Node* regexp, bool is_fastpath); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 Node* ReplaceGlobalCallableFastPath(Node* context, Node* regexp, Node* string, | 97 Node* ReplaceGlobalCallableFastPath(Node* context, Node* regexp, Node* string, |
102 Node* replace_callable); | 98 Node* replace_callable); |
103 Node* ReplaceSimpleStringFastPath(Node* context, Node* regexp, Node* string, | 99 Node* ReplaceSimpleStringFastPath(Node* context, Node* regexp, Node* string, |
104 Node* replace_string); | 100 Node* replace_string); |
105 }; | 101 }; |
106 | 102 |
107 } // namespace internal | 103 } // namespace internal |
108 } // namespace v8 | 104 } // namespace v8 |
109 | 105 |
110 #endif // V8_BUILTINS_BUILTINS_REGEXP_H_ | 106 #endif // V8_BUILTINS_BUILTINS_REGEXP_H_ |
OLD | NEW |