Commit 28b7cdc0 authored by jgruber's avatar jgruber Committed by Commit Bot

[regexp] Typify result allocation & friends

Bug: v8:8015
Change-Id: Ie8265458ace8c0d12ca9d3f58afd981f1f30cd1e
Reviewed-on: https://chromium-review.googlesource.com/1170826
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55087}
parent df18e841
This diff is collapsed.
...@@ -39,10 +39,11 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler { ...@@ -39,10 +39,11 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
// 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.
// |input| must be a string. TNode<JSRegExpResult> AllocateRegExpResult(TNode<Context> context,
Node* AllocateRegExpResult(Node* context, Node* length, Node* index, TNode<Smi> length,
Node* input); TNode<Smi> index,
TNode<String> input);
TNode<Object> FastLoadLastIndex(TNode<JSRegExp> regexp); TNode<Object> FastLoadLastIndex(TNode<JSRegExp> regexp);
TNode<Object> SlowLoadLastIndex(TNode<Context> context, TNode<Object> regexp); TNode<Object> SlowLoadLastIndex(TNode<Context> context, TNode<Object> regexp);
...@@ -68,15 +69,17 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler { ...@@ -68,15 +69,17 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
TNode<Number> last_index, TNode<Number> last_index,
TNode<RegExpMatchInfo> match_info); TNode<RegExpMatchInfo> match_info);
Node* ConstructNewResultFromMatchInfo(Node* const context, Node* const regexp, TNode<JSRegExpResult> ConstructNewResultFromMatchInfo(
Node* const match_info, TNode<Context> context, TNode<JSReceiver> maybe_regexp,
TNode<String> const string); TNode<RegExpMatchInfo> match_info, TNode<String> string);
TNode<HeapObject> RegExpPrototypeExecBodyWithoutResult( TNode<RegExpMatchInfo> RegExpPrototypeExecBodyWithoutResult(
TNode<Context> context, TNode<JSReceiver> maybe_regexp, TNode<Context> context, TNode<JSReceiver> maybe_regexp,
TNode<String> string, Label* if_didnotmatch, const bool is_fastpath); TNode<String> string, Label* if_didnotmatch, const bool is_fastpath);
Node* RegExpPrototypeExecBody(Node* const context, Node* const regexp, TNode<HeapObject> RegExpPrototypeExecBody(TNode<Context> context,
TNode<String> string, const bool is_fastpath); TNode<JSReceiver> maybe_regexp,
TNode<String> string,
const bool is_fastpath);
Node* ThrowIfNotJSReceiver(Node* context, Node* maybe_receiver, Node* ThrowIfNotJSReceiver(Node* context, Node* maybe_receiver,
MessageTemplate::Template msg_template, MessageTemplate::Template msg_template,
......
...@@ -838,6 +838,7 @@ class ZoneForwardList; ...@@ -838,6 +838,7 @@ class ZoneForwardList;
V(JSProxy) \ V(JSProxy) \
V(JSReceiver) \ V(JSReceiver) \
V(JSRegExp) \ V(JSRegExp) \
V(JSRegExpResult) \
V(JSRegExpStringIterator) \ V(JSRegExpStringIterator) \
V(JSSet) \ V(JSSet) \
V(JSSetIterator) \ V(JSSetIterator) \
...@@ -987,6 +988,7 @@ class ZoneForwardList; ...@@ -987,6 +988,7 @@ class ZoneForwardList;
V(JSModuleNamespace, JS_MODULE_NAMESPACE_TYPE) \ V(JSModuleNamespace, JS_MODULE_NAMESPACE_TYPE) \
V(JSPromise, JS_PROMISE_TYPE) \ V(JSPromise, JS_PROMISE_TYPE) \
V(JSRegExp, JS_REGEXP_TYPE) \ V(JSRegExp, JS_REGEXP_TYPE) \
V(JSRegExpResult, JS_ARRAY_TYPE) \
V(JSRegExpStringIterator, JS_REGEXP_STRING_ITERATOR_TYPE) \ V(JSRegExpStringIterator, JS_REGEXP_STRING_ITERATOR_TYPE) \
V(JSSet, JS_SET_TYPE) \ V(JSSet, JS_SET_TYPE) \
V(JSStringIterator, JS_STRING_ITERATOR_TYPE) \ V(JSStringIterator, JS_STRING_ITERATOR_TYPE) \
......
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