mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 09:21:35 +00:00
Make the transition to ArrayBuffer backed Arrays (#70)
* Traverse base classes when resolving overloads * Implement preliminary TypedArray accessors * Extract decorator flags from common flags to make space * Add '**' overload * Implement basic explicit inlining * Support inlining of instance methods * Reduce number of required locals when inlining * Implement inlining of operator overloads * Fix issues when inlining generic functions
This commit is contained in:
@ -43,7 +43,8 @@ import {
|
||||
Global,
|
||||
FunctionPrototype,
|
||||
Class,
|
||||
Field
|
||||
Field,
|
||||
OperatorKind
|
||||
} from "./program";
|
||||
|
||||
/** Compiles a get of a built-in global. */
|
||||
@ -146,7 +147,7 @@ export function compileCall(
|
||||
compiler.currentType = Type.bool;
|
||||
if (!type) return module.createUnreachable();
|
||||
let classType = type.classReference;
|
||||
return classType != null && classType.prototype.fnIndexedGet != null
|
||||
return classType != null && classType.lookupOverload(OperatorKind.INDEXED_GET) != null
|
||||
? module.createI32(1)
|
||||
: module.createI32(0);
|
||||
}
|
||||
@ -1738,6 +1739,7 @@ export function compileCall(
|
||||
DiagnosticCode.Expected_0_type_arguments_but_got_1,
|
||||
reportNode.range, "1", typeArguments ? typeArguments.length.toString(10) : "0"
|
||||
);
|
||||
return module.createUnreachable();
|
||||
}
|
||||
let byteSize = (<Type[]>typeArguments)[0].byteSize;
|
||||
let alignLog2: i32;
|
||||
|
Reference in New Issue
Block a user