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

Unified Diff: src/builtins/builtins-regexp.cc

Issue 2663803002: [string] Migrate String.prototype.{split,replace} to TF (Closed)
Patch Set: Add fast-path for strings Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: src/builtins/builtins-regexp.cc
diff --git a/src/builtins/builtins-regexp.cc b/src/builtins/builtins-regexp.cc
index eba57aa0168a92b9a223ef4ec60b5d9c43a78bb1..4575315e9bcdfeeeaaf42559c54f39a7972d2297 100644
--- a/src/builtins/builtins-regexp.cc
+++ b/src/builtins/builtins-regexp.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "src/builtins/builtins-regexp.h"
+
#include "src/builtins/builtins-constructor.h"
#include "src/builtins/builtins-utils.h"
#include "src/builtins/builtins.h"
@@ -14,81 +16,7 @@
namespace v8 {
namespace internal {
-typedef compiler::Node Node;
typedef CodeStubAssembler::ParameterMode ParameterMode;
-typedef compiler::CodeAssemblerState CodeAssemblerState;
-
-class RegExpBuiltinsAssembler : public CodeStubAssembler {
- public:
- explicit RegExpBuiltinsAssembler(CodeAssemblerState* state)
- : CodeStubAssembler(state) {}
-
- protected:
- Node* FastLoadLastIndex(Node* regexp);
- Node* SlowLoadLastIndex(Node* context, Node* regexp);
- Node* LoadLastIndex(Node* context, Node* regexp, bool is_fastpath);
-
- void FastStoreLastIndex(Node* regexp, Node* value);
- void SlowStoreLastIndex(Node* context, Node* regexp, Node* value);
- void StoreLastIndex(Node* context, Node* regexp, Node* value,
- bool is_fastpath);
-
- Node* ConstructNewResultFromMatchInfo(Node* context, Node* match_info,
- Node* string);
-
- Node* RegExpPrototypeExecBodyWithoutResult(Node* const context,
- Node* const regexp,
- Node* const string,
- Label* if_didnotmatch,
- const bool is_fastpath);
- Node* RegExpPrototypeExecBody(Node* const context, Node* const regexp,
- Node* const string, const bool is_fastpath);
-
- Node* ThrowIfNotJSReceiver(Node* context, Node* maybe_receiver,
- MessageTemplate::Template msg_template,
- char const* method_name);
-
- Node* IsInitialRegExpMap(Node* context, Node* map);
- void BranchIfFastRegExp(Node* context, Node* map, Label* if_isunmodified,
- Label* if_ismodified);
- void BranchIfFastRegExpResult(Node* context, Node* map,
- Label* if_isunmodified, Label* if_ismodified);
-
- Node* FlagsGetter(Node* const context, Node* const regexp, bool is_fastpath);
-
- Node* FastFlagGetter(Node* const regexp, JSRegExp::Flag flag);
- Node* SlowFlagGetter(Node* const context, Node* const regexp,
- JSRegExp::Flag flag);
- Node* FlagGetter(Node* const context, Node* const regexp, JSRegExp::Flag flag,
- bool is_fastpath);
- void FlagGetter(JSRegExp::Flag flag, v8::Isolate::UseCounterFeature counter,
- const char* method_name);
-
- Node* IsRegExp(Node* const context, Node* const maybe_receiver);
- Node* RegExpInitialize(Node* const context, Node* const regexp,
- Node* const maybe_pattern, Node* const maybe_flags);
-
- Node* RegExpExec(Node* context, Node* regexp, Node* string);
-
- Node* AdvanceStringIndex(Node* const string, Node* const index,
- Node* const is_unicode);
-
- void RegExpPrototypeMatchBody(Node* const context, Node* const regexp,
- Node* const string, const bool is_fastpath);
-
- void RegExpPrototypeSearchBodyFast(Node* const context, Node* const regexp,
- Node* const string);
- void RegExpPrototypeSearchBodySlow(Node* const context, Node* const regexp,
- Node* const string);
-
- void RegExpPrototypeSplitBody(Node* const context, Node* const regexp,
- Node* const string, Node* const limit);
-
- Node* ReplaceGlobalCallableFastPath(Node* context, Node* regexp, Node* string,
- Node* replace_callable);
- Node* ReplaceSimpleStringFastPath(Node* context, Node* regexp, Node* string,
- Node* replace_string);
-};
// -----------------------------------------------------------------------------
// ES6 section 21.2 RegExp Objects

Powered by Google App Engine
This is Rietveld 408576698