Commit d084929d authored by jgruber's avatar jgruber Committed by Commit Bot

[regexp] Typify RegExpPrototypeExecBodyWithoutResult

And related call sites.

Drive-by: add IntPtrZero() and SmiZero() helpers.

Bug: v8:8015
Change-Id: I83195cf2da858f8d35f25c9a1aa5c40c81df78b9
Reviewed-on: https://chromium-review.googlesource.com/1162169
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54918}
parent cdb4d913
This diff is collapsed.
...@@ -34,6 +34,9 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler { ...@@ -34,6 +34,9 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
char const* method_name); char const* method_name);
protected: protected:
TNode<Smi> SmiZero();
TNode<IntPtrT> IntPtrZero();
// Allocate a RegExpResult with the given length (the number of captures, // Allocate a RegExpResult with the given length (the number of captures,
// including the match itself), index (the index where the match starts), // including the match itself), index (the index where the match starts),
// and input string. |length| and |index| are expected to be tagged, and // and input string. |length| and |index| are expected to be tagged, and
...@@ -41,9 +44,10 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler { ...@@ -41,9 +44,10 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
Node* AllocateRegExpResult(Node* context, Node* length, Node* index, Node* AllocateRegExpResult(Node* context, Node* length, Node* index,
Node* input); Node* input);
TNode<Object> FastLoadLastIndex(Node* regexp); TNode<Object> FastLoadLastIndex(TNode<JSRegExp> regexp);
Node* SlowLoadLastIndex(Node* context, Node* regexp); TNode<Object> SlowLoadLastIndex(TNode<Context> context, TNode<Object> regexp);
Node* LoadLastIndex(Node* context, Node* regexp, bool is_fastpath); TNode<Object> LoadLastIndex(TNode<Context> context, TNode<Object> regexp,
bool is_fastpath);
void FastStoreLastIndex(Node* regexp, Node* value); void FastStoreLastIndex(Node* regexp, Node* value);
void SlowStoreLastIndex(Node* context, Node* regexp, Node* value); void SlowStoreLastIndex(Node* context, Node* regexp, Node* value);
...@@ -58,20 +62,19 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler { ...@@ -58,20 +62,19 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
Variable* var_string_end); Variable* var_string_end);
// Low level logic around the actual call into pattern matching code. // Low level logic around the actual call into pattern matching code.
TNode<Object> RegExpExecInternal(TNode<Context> context, TNode<HeapObject> RegExpExecInternal(TNode<Context> context,
TNode<JSRegExp> regexp, TNode<String> string, TNode<JSRegExp> regexp,
TNode<Number> last_index, TNode<String> string,
TNode<FixedArray> match_info); TNode<Number> last_index,
TNode<RegExpMatchInfo> match_info);
Node* ConstructNewResultFromMatchInfo(Node* const context, Node* const regexp, Node* ConstructNewResultFromMatchInfo(Node* const context, Node* const regexp,
Node* const match_info, Node* const match_info,
TNode<String> const string); TNode<String> const string);
Node* RegExpPrototypeExecBodyWithoutResult(Node* const context, TNode<HeapObject> RegExpPrototypeExecBodyWithoutResult(
Node* const regexp, TNode<Context> context, TNode<JSReceiver> maybe_regexp,
Node* const string, TNode<String> string, Label* if_didnotmatch, const bool is_fastpath);
Label* if_didnotmatch,
const bool is_fastpath);
Node* RegExpPrototypeExecBody(Node* const context, Node* const regexp, Node* RegExpPrototypeExecBody(Node* const context, Node* const regexp,
TNode<String> string, const bool is_fastpath); TNode<String> string, const bool is_fastpath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment