array is an abv, views

This commit is contained in:
dcode
2019-05-25 14:40:13 +02:00
parent 6d6ed710e5
commit 968192f99b
18 changed files with 90 additions and 53 deletions

View File

@ -4174,9 +4174,8 @@ export function compileRTTI(compiler: Compiler): void {
if (instance.isAcyclic) flags |= TypeinfoFlags.ACYCLIC;
if (instance !== abvInstance && instance.extends(abvPrototype)) {
let valueType = instance.getArrayValueType();
flags |= instance.extends(arrayPrototype)
? TypeinfoFlags.ARRAY
: TypeinfoFlags.ARRAYBUFFERVIEW;
flags |= TypeinfoFlags.ARRAYBUFFERVIEW;
if (instance.extends(arrayPrototype)) flags |= TypeinfoFlags.ARRAY;
flags |= TypeinfoFlags.VALUE_ALIGN_0 * typeToRuntimeFlags(valueType);
} else if (instance.extends(setPrototype)) {
let typeArguments = assert(instance.getTypeArgumentsTo(setPrototype));