Skip to content

Commit 1825de7

Browse files
committed
Nightly v0.8.1-nightly.20191219
1 parent ad28811 commit 1825de7

File tree

5 files changed

+27
-36
lines changed

5 files changed

+27
-36
lines changed

dist/asc.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/asc.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.d.ts

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,6 @@ declare module "assemblyscript/src/module" {
17081708
*/ /***/
17091709
import { Target } from "assemblyscript/src/common";
17101710
export type ModuleRef = number;
1711-
export type FunctionTypeRef = number;
17121711
export type FunctionRef = number;
17131712
export type ExpressionRef = number;
17141713
export type GlobalRef = number;
@@ -1727,7 +1726,8 @@ declare module "assemblyscript/src/module" {
17271726
V128,
17281727
Anyref,
17291728
Exnref,
1730-
Unreachable
1729+
Unreachable,
1730+
Auto
17311731
}
17321732
export enum FeatureFlags {
17331733
MVP,
@@ -2147,7 +2147,7 @@ declare module "assemblyscript/src/module" {
21472147
binary(op: BinaryOp, left: ExpressionRef, right: ExpressionRef): ExpressionRef;
21482148
host(op: HostOp, name?: string | null, operands?: ExpressionRef[] | null): ExpressionRef;
21492149
local_get(index: number, type: NativeType): ExpressionRef;
2150-
local_tee(index: number, value: ExpressionRef): ExpressionRef;
2150+
local_tee(index: number, value: ExpressionRef, type?: NativeType): ExpressionRef;
21512151
global_get(name: string, type: NativeType): ExpressionRef;
21522152
load(bytes: Index, signed: boolean, ptr: ExpressionRef, type: NativeType, offset?: Index, align?: Index): ExpressionRef;
21532153
store(bytes: Index, ptr: ExpressionRef, value: ExpressionRef, type: NativeType, offset?: Index, align?: Index): ExpressionRef;
@@ -2171,8 +2171,8 @@ declare module "assemblyscript/src/module" {
21712171
switch(names: string[], defaultName: string | null, condition: ExpressionRef, value?: ExpressionRef): ExpressionRef;
21722172
call(target: string, operands: ExpressionRef[] | null, returnType: NativeType, isReturn?: boolean): ExpressionRef;
21732173
return_call(target: string, operands: ExpressionRef[] | null, returnType: NativeType): ExpressionRef;
2174-
call_indirect(index: ExpressionRef, operands: ExpressionRef[] | null, typeName: string, isReturn?: boolean): ExpressionRef;
2175-
return_call_indirect(index: ExpressionRef, operands: ExpressionRef[] | null, typeName: string): ExpressionRef;
2174+
call_indirect(index: ExpressionRef, operands: ExpressionRef[] | null, params: NativeType, results: NativeType, isReturn?: boolean): ExpressionRef;
2175+
return_call_indirect(index: ExpressionRef, operands: ExpressionRef[] | null, params: NativeType, results: NativeType): ExpressionRef;
21762176
unreachable(): ExpressionRef;
21772177
memory_copy(dest: ExpressionRef, source: ExpressionRef, size: ExpressionRef): ExpressionRef;
21782178
memory_fill(dest: ExpressionRef, value: ExpressionRef, size: ExpressionRef): ExpressionRef;
@@ -2188,16 +2188,13 @@ declare module "assemblyscript/src/module" {
21882188
simd_ternary(op: SIMDTernaryOp, a: ExpressionRef, b: ExpressionRef, c: ExpressionRef): ExpressionRef;
21892189
simd_shift(op: SIMDShiftOp, vec: ExpressionRef, shift: ExpressionRef): ExpressionRef;
21902190
simd_load(op: SIMDLoadOp, ptr: ExpressionRef, offset: number, align: number): ExpressionRef;
2191-
addFunctionType(name: string, result: NativeType, paramTypes: NativeType[] | null): FunctionTypeRef;
2192-
getFunctionTypeBySignature(result: NativeType, paramTypes: NativeType[] | null): FunctionTypeRef;
2193-
removeFunctionType(name: string): void;
21942191
addGlobal(name: string, type: NativeType, mutable: boolean, initializer: ExpressionRef): GlobalRef;
21952192
getGlobal(name: string): GlobalRef;
21962193
removeGlobal(name: string): void;
2197-
addEvent(name: string, attribute: number, type: FunctionTypeRef): EventRef;
2194+
addEvent(name: string, attribute: number, params: NativeType, results: NativeType): EventRef;
21982195
getEvent(name: string): EventRef;
21992196
removeEvent(name: string): void;
2200-
addFunction(name: string, type: FunctionTypeRef, varTypes: NativeType[] | null, body: ExpressionRef): FunctionRef;
2197+
addFunction(name: string, params: NativeType, results: NativeType, varTypes: NativeType[] | null, body: ExpressionRef): FunctionRef;
22012198
getFunction(name: string): FunctionRef;
22022199
removeFunction(name: string): void;
22032200
private hasTemporaryFunction;
@@ -2210,11 +2207,11 @@ declare module "assemblyscript/src/module" {
22102207
addGlobalExport(internalName: string, externalName: string): ExportRef;
22112208
addEventExport(internalName: string, externalName: string): ExportRef;
22122209
removeExport(externalName: string): void;
2213-
addFunctionImport(internalName: string, externalModuleName: string, externalBaseName: string, functionType: FunctionTypeRef): void;
2210+
addFunctionImport(internalName: string, externalModuleName: string, externalBaseName: string, params: NativeType, results: NativeType): void;
22142211
addTableImport(internalName: string, externalModuleName: string, externalBaseName: string): void;
22152212
addMemoryImport(internalName: string, externalModuleName: string, externalBaseName: string, shared?: boolean): void;
22162213
addGlobalImport(internalName: string, externalModuleName: string, externalBaseName: string, globalType: NativeType, mutable?: boolean): void;
2217-
addEventImport(internalName: string, externalModuleName: string, externalBaseName: string, attribute: number, eventType: FunctionTypeRef): void;
2214+
addEventImport(internalName: string, externalModuleName: string, externalBaseName: string, attribute: number, params: NativeType, results: NativeType): void;
22182215
/** Unlimited memory constant. */
22192216
static readonly UNLIMITED_MEMORY: Index;
22202217
setMemory(initial: Index, maximum: Index, segments: MemorySegment[], target: Target, exportName?: string | null, shared?: boolean): void;
@@ -2247,6 +2244,8 @@ declare module "assemblyscript/src/module" {
22472244
getDebugInfoFile(index: Index): string | null;
22482245
setDebugLocation(func: FunctionRef, expr: ExpressionRef, fileIndex: Index, lineNumber: Index, columnNumber: Index): void;
22492246
}
2247+
export function createType(types: NativeType[] | null): NativeType;
2248+
export function expandType(type: NativeType): NativeType[];
22502249
export function getExpressionId(expr: ExpressionRef): ExpressionId;
22512250
export function getExpressionType(expr: ExpressionRef): NativeType;
22522251
export function getConstValueI32(expr: ExpressionRef): number;
@@ -2294,15 +2293,11 @@ declare module "assemblyscript/src/module" {
22942293
export function getHostOperandCount(expr: ExpressionRef): Index;
22952294
export function getHostOperand(expr: ExpressionRef, index: Index): ExpressionRef;
22962295
export function getHostName(expr: ExpressionRef): string | null;
2297-
export function getFunctionTypeName(ftype: FunctionTypeRef): string | null;
2298-
export function getFunctionTypeParamCount(ftype: FunctionTypeRef): Index;
2299-
export function getFunctionTypeParam(ftype: FunctionTypeRef, index: Index): NativeType;
2300-
export function getFunctionTypeResult(ftype: FunctionTypeRef): NativeType;
23012296
export function getFunctionBody(func: FunctionRef): ExpressionRef;
23022297
export function getFunctionName(func: FunctionRef): string | null;
2303-
export function getFunctionParamCount(func: FunctionRef): Index;
2304-
export function getFunctionParamType(func: FunctionRef, index: Index): NativeType;
2305-
export function getFunctionResultType(func: FunctionRef): NativeType;
2298+
export function getFunctionParams(func: FunctionRef): Index;
2299+
export function getFunctionResults(func: FunctionRef): NativeType;
2300+
export function getFunctionVars(func: FunctionRef): NativeType;
23062301
export function getGlobalName(global: GlobalRef): string | null;
23072302
export function getGlobalType(global: GlobalRef): NativeType;
23082303
export function isGlobalMutable(global: GlobalRef): boolean;
@@ -2463,8 +2458,6 @@ declare module "assemblyscript/src/types" {
24632458
toString(): string;
24642459
/** Converts this type to its respective native type. */
24652460
toNativeType(): NativeType;
2466-
/** Converts this type to its signature string. */
2467-
toSignatureString(): string;
24682461
/** An 8-bit signed integer. */
24692462
static readonly i8: Type;
24702463
/** A 16-bit signed integer. */
@@ -2534,17 +2527,15 @@ declare module "assemblyscript/src/types" {
25342527
program: Program;
25352528
/** Constructs a new signature. */
25362529
constructor(program: Program, parameterTypes?: Type[] | null, returnType?: Type | null, thisType?: Type | null);
2530+
get nativeParams(): NativeType;
2531+
get nativeResults(): NativeType;
25372532
asFunctionTarget(program: Program): FunctionTarget;
25382533
/** Gets the known or, alternatively, generic parameter name at the specified index. */
25392534
getParameterName(index: number): string;
25402535
/** Tests if a value of this function type is assignable to a target of the specified function type. */
25412536
isAssignableTo(target: Signature): boolean;
25422537
/** Tests to see if a signature equals another signature. */
25432538
equals(value: Signature): boolean;
2544-
/** Converts a signature to a function type string. */
2545-
static makeSignatureString(parameterTypes: Type[] | null, returnType: Type, thisType?: Type | null): string;
2546-
/** Converts this signature to a function type string. */
2547-
toSignatureString(): string;
25482539
/** Converts this signature to a string. */
25492540
toString(): string;
25502541
}
@@ -3839,7 +3830,7 @@ declare module "assemblyscript/src/program" {
38393830
/** Concrete signature. */
38403831
signature: Signature,
38413832
/** Program reference. */
3842-
program: Program, __s?: string);
3833+
program: Program);
38433834
lookup(name: string): Element | null;
38443835
}
38453836
/** A yet unresolved instance field prototype. */
@@ -4041,7 +4032,7 @@ declare module "assemblyscript/src/compiler" {
40414032
* @module compiler
40424033
*/ /***/
40434034
import { DiagnosticEmitter } from "assemblyscript/src/diagnostics";
4044-
import { Module, MemorySegment, ExpressionRef, NativeType, FunctionRef, FunctionTypeRef, GlobalRef, EventRef } from "assemblyscript/src/module";
4035+
import { Module, MemorySegment, ExpressionRef, NativeType, FunctionRef, GlobalRef, EventRef } from "assemblyscript/src/module";
40454036
import { Feature, Target } from "assemblyscript/src/common";
40464037
import { Program, ClassPrototype, Class, Element, Enum, Field, FunctionPrototype, Function, Global, VariableLikeElement, File } from "assemblyscript/src/program";
40474038
import { Flow } from "assemblyscript/src/flow";
@@ -4060,6 +4051,8 @@ declare module "assemblyscript/src/compiler" {
40604051
sharedMemory: number;
40614052
/** If true, imports the function table provided by the embedder. */
40624053
importTable: boolean;
4054+
/** If true, exports the function table. */
4055+
exportTable: boolean;
40634056
/** If true, generates information necessary for source maps. */
40644057
sourceMap: boolean;
40654058
/** If true, generates an explicit start function. */
@@ -4141,7 +4134,7 @@ declare module "assemblyscript/src/compiler" {
41414134
memorySegments: MemorySegment[];
41424135
/** Map of already compiled static string segments. */
41434136
stringSegments: Map<string, MemorySegment>;
4144-
/** Function table being compiled. */
4137+
/** Function table being compiled. First elem is blank. */
41454138
functionTable: string[];
41464139
/** Argument count helper global. */
41474140
argcVar: GlobalRef;
@@ -4181,10 +4174,6 @@ declare module "assemblyscript/src/compiler" {
41814174
compileEnum(element: Enum): boolean;
41824175
/** Resolves the specified type arguments prior to compiling the resulting function instance. */
41834176
compileFunctionUsingTypeArguments(prototype: FunctionPrototype, typeArguments: NamedTypeNode[], contextualTypeArguments?: Map<string, Type>, alternativeReportNode?: Node | null): Function | null;
4184-
/** Either reuses or creates the function type matching the specified signature. */
4185-
ensureFunctionType(parameterTypes: Type[] | null, returnType: Type, thisType?: Type | null): FunctionTypeRef;
4186-
/** Either reuses or creates the event type matching the specified name. */
4187-
ensureEventType(name: string, parameterTypes: Type[] | null): EventRef;
41884177
/** Compiles the body of a function within the specified flow. */
41894178
compileFunctionBody(
41904179
/** Function to compile. */
@@ -5031,6 +5020,8 @@ declare module "assemblyscript/src/index" {
50315020
export function setSharedMemory(options: Options, sharedMemory: number): void;
50325021
/** Sets the `importTable` option. */
50335022
export function setImportTable(options: Options, importTable: boolean): void;
5023+
/** Sets the `exportTable` option. */
5024+
export function setExportTable(options: Options, exportTable: boolean): void;
50345025
/** Sets the `sourceMap` option. */
50355026
export function setSourceMap(options: Options, sourceMap: boolean): void;
50365027
/** Sets the `memoryBase` option. */

dist/assemblyscript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/assemblyscript.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)