Commit cb5b2eca authored by Bill Budge's avatar Bill Budge Committed by Commit Bot

[torque] Allow TaggedIndex to be used in runtime calls.

- Changes runtime return value / parameter checks to  check for subtype
  of StrongTagged.

Bug: v8:10047,v8:9891
Change-Id: Ie86bacf138c67092983fc72f37b1a13bffa904a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2314828Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69055}
parent 8d2c8d10
......@@ -133,17 +133,18 @@ void DeclarationVisitor::Visit(ExternalRuntimeDeclaration* decl) {
"type Context or NoContext, but found type ",
*signature.parameter_types.types[0]);
}
if (!(signature.return_type->IsSubtypeOf(TypeOracle::GetObjectType()) ||
if (!(signature.return_type->IsSubtypeOf(TypeOracle::GetStrongTaggedType()) ||
signature.return_type == TypeOracle::GetVoidType() ||
signature.return_type == TypeOracle::GetNeverType())) {
ReportError(
"runtime functions can only return tagged values, but found type ",
"runtime functions can only return strong tagged values, but "
"found type ",
signature.return_type);
}
for (const Type* parameter_type : signature.parameter_types.types) {
if (!parameter_type->IsSubtypeOf(TypeOracle::GetObjectType())) {
if (!parameter_type->IsSubtypeOf(TypeOracle::GetStrongTaggedType())) {
ReportError(
"runtime functions can only take tagged values as parameters, but "
"runtime functions can only take strong tagged parameters, but "
"found type ",
*parameter_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