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 {
// Allocate a RegExpResult with the given length (the number of captures,
// including the match itself), index (the index where the match starts),
// and input string. |length| and |index| are expected to be tagged, and
// |input| must be a string.
Node* AllocateRegExpResult(Node* context, Node* length, Node* index,
Node* input);
// and input string.
TNode<JSRegExpResult> AllocateRegExpResult(TNode<Context> context,
TNode<Smi> length,
TNode<Smi> index,
TNode<String> input);
TNode<Object> FastLoadLastIndex(TNode<JSRegExp> regexp);
TNode<Object> SlowLoadLastIndex(TNode<Context> context, TNode<Object> regexp);
......@@ -68,15 +69,17 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
TNode<Number> last_index,
TNode<RegExpMatchInfo> match_info);
Node* ConstructNewResultFromMatchInfo(Node* const context, Node* const regexp,
Node* const match_info,
TNode<String> const string);
TNode<JSRegExpResult> ConstructNewResultFromMatchInfo(
TNode<Context> context, TNode<JSReceiver> maybe_regexp,
TNode<RegExpMatchInfo> match_info, TNode<String> string);
TNode<HeapObject> RegExpPrototypeExecBodyWithoutResult(
TNode<RegExpMatchInfo> RegExpPrototypeExecBodyWithoutResult(
TNode<Context> context, TNode<JSReceiver> maybe_regexp,
TNode<String> string, Label* if_didnotmatch, const bool is_fastpath);
Node* RegExpPrototypeExecBody(Node* const context, Node* const regexp,
TNode<String> string, const bool is_fastpath);
TNode<HeapObject> RegExpPrototypeExecBody(TNode<Context> context,
TNode<JSReceiver> maybe_regexp,
TNode<String> string,
const bool is_fastpath);
Node* ThrowIfNotJSReceiver(Node* context, Node* maybe_receiver,
MessageTemplate::Template msg_template,
......
......@@ -838,6 +838,7 @@ class ZoneForwardList;
V(JSProxy) \
V(JSReceiver) \
V(JSRegExp) \
V(JSRegExpResult) \
V(JSRegExpStringIterator) \
V(JSSet) \
V(JSSetIterator) \
......@@ -987,6 +988,7 @@ class ZoneForwardList;
V(JSModuleNamespace, JS_MODULE_NAMESPACE_TYPE) \
V(JSPromise, JS_PROMISE_TYPE) \
V(JSRegExp, JS_REGEXP_TYPE) \
V(JSRegExpResult, JS_ARRAY_TYPE) \
V(JSRegExpStringIterator, JS_REGEXP_STRING_ITERATOR_TYPE) \
V(JSSet, JS_SET_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