Commit 652108e8 authored by Joshua Litt's avatar Joshua Litt Committed by Commit Bot

[torque] Update torque js linkage to allow any supertype of JSAny.

Change-Id: I9fa2276b9e27fe51d15be3c1afb34633b53d1230
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1973969Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Joshua Litt <joshualitt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65506}
parent b0dbe454
...@@ -81,8 +81,10 @@ Builtin* DeclarationVisitor::CreateBuiltin(BuiltinDeclaration* decl, ...@@ -81,8 +81,10 @@ Builtin* DeclarationVisitor::CreateBuiltin(BuiltinDeclaration* decl,
for (size_t i = signature.implicit_count; for (size_t i = signature.implicit_count;
i < signature.parameter_types.types.size(); ++i) { i < signature.parameter_types.types.size(); ++i) {
const Type* parameter_type = signature.parameter_types.types[i]; const Type* parameter_type = signature.parameter_types.types[i];
if (parameter_type != TypeOracle::GetJSAnyType()) { if (!TypeOracle::GetJSAnyType()->IsSubtypeOf(parameter_type)) {
Error("Parameters of JavaScript-linkage builtins have to be JSAny.") Error(
"Parameters of JavaScript-linkage builtins have to be a supertype "
"of JSAny.")
.Position(decl->parameters.types[i]->pos); .Position(decl->parameters.types[i]->pos);
} }
} }
......
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