Commit 9d7354f9 authored by jgruber's avatar jgruber Committed by Commit bot

[regexp] Add additional asserts to RegExp builtins

Review-Url: https://codereview.chromium.org/2799663003
Cr-Commit-Position: refs/heads/master@{#44450}
parent 2db171c2
This diff is collapsed.
......@@ -58,6 +58,7 @@ class RegExpBuiltinsAssembler : public CodeStubAssembler {
char const* method_name);
// Analogous to BranchIfFastRegExp, for use in asserts.
Node* IsFastRegExp(Node* const context, Node* const object);
Node* IsFastRegExp(Node* const context, Node* const object, Node* const map);
// Performs fast path checks on the given object itself, but omits prototype
......
......@@ -3105,6 +3105,10 @@ Node* CodeStubAssembler::IsFixedTypedArray(Node* object) {
Int32Constant(LAST_FIXED_TYPED_ARRAY_TYPE)));
}
Node* CodeStubAssembler::IsJSRegExp(Node* object) {
return HasInstanceType(object, JS_REGEXP_TYPE);
}
Node* CodeStubAssembler::StringCharCodeAt(Node* string, Node* index,
ParameterMode parameter_mode) {
CSA_ASSERT(this, IsString(string));
......
......@@ -734,6 +734,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* IsJSFunction(Node* object);
Node* IsJSTypedArray(Node* object);
Node* IsFixedTypedArray(Node* object);
Node* IsJSRegExp(Node* object);
// ElementsKind helpers:
Node* IsFastElementsKind(Node* elements_kind);
......
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