ranger-compiler 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +21 -1
- package/dist/Lang.rgr +209 -19
- package/dist/api.d.ts +881 -47
- package/dist/api.js +13986 -961
- package/dist/lib/ranger-dir.rgr +25 -5
- package/dist/package.json +1 -1
- package/dist/rgrc.js +3746 -754
- package/package.json +139 -5
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type union_Any = CmdParams | test_cmdparams | InputFSFolder | InputFSFile | InputEnv | test_input_filesystem | RangerAppTodo | RangerCompilerMessage | RangerParamEventHandler | RangerParamEventList | RangerParamEventMap | RangerAppArrayValue | RangerAppHashValue | RangerAppValue | RangerRefForce | RangerAppParamDesc | RangerAppFunctionDesc | RangerAppMethodVariants | RangerAppInterfaceImpl | RangerTraitParams | RangerAppClassDesc | RangerTypeClass | SourceCode | CodeNodeLiteral | CodeNode | TypeCounts | RangerNodeValue | RangerBackReference | RangerAppEnum | OpFindResult | RangerOperatorList | RangerNodeList | ContextTransaction | ContextTransactionMutation | RangerRegisteredPlugin | RangerAppWriterContext | CodeFile | CodeFileSystem | CodeSlice | CodeWriter | RangerLispParser | RangerArgMatch | DictNode | RangerSerializeClass | RangerImmutableExtension | RangerServiceBuilder | RangerAppOperatorDesc | TFiles |
|
|
1
|
+
type union_Any = CmdParams | test_cmdparams | InputFSFolder | InputFSFile | InputEnv | test_input_filesystem | RangerAppTodo | RangerCompilerMessage | RangerParamEventHandler | RangerParamEventList | RangerParamEventMap | RangerAppArrayValue | RangerAppHashValue | RangerAppValue | RangerRefForce | RangerAppParamDesc | RangerAppFunctionDesc | RangerAppMethodVariants | RangerAppInterfaceImpl | RangerTraitParams | RangerAppClassDesc | RangerTypeClass | SourceCode | CodeNodeLiteral | CodeNode | TTypeRegistry | TypeCounts | RangerNodeValue | RangerBackReference | RangerAppEnum | OpFindResult | RangerOperatorList | RangerNodeList | ContextTransaction | ContextTransactionMutation | RangerRegisteredPlugin | RangerAppWriterContext | SourceMapEntry | SourceMapBuilder | CodeFile | CodeFileSystem | CodeSlice | CodeWriter | RangerLispParser | TTypes | RangerArgMatch | DictNode | RangerSerializeClass | RangerImmutableExtension | RangerProcessLifecycle | RangerProcessClass | RangerProcessProcSend | RangerProcessProcStartCheck | RangerProcessCodegen | RangerServiceBuilder | RangerAppOperatorDesc | TFiles | ClassJoinPoint | WalkLater | RangerFlowParser | TFactory | CallChain | NodeEvalState | RangerGenericClassWriter | AndroidPageWriter | RangerJava7ClassWriter | RangerSwift3ClassWriter | RangerSwift6ClassWriter | RangerCppClassWriter | MethodCallList | RangerRustClassWriter | RangerKotlinClassWriter | RangerCSharpClassWriter | RangerScalaClassWriter | RangerGolangClassWriter | RangerGolangHttpServerWriter | RangerPHPClassWriter | RangerPythonClassWriter | WebPageWriter | RangerJavaScriptClassWriter | RangerRangerClassWriter | LowIRUtil | LowIRParam | LowIRInstr | LowIRBlock | LowIRFunction | LowIRField | LowIRTypeFieldDesc | LowIRTypeDesc | LowIRStruct | LowIRStringGlobal | LowIRExternDecl | LowIRModule | LowIRSession | LowIRBuilder | LowIRRuntimeGen | LowIRTarget | LowIRLowerContext | LambdaCaptureInfo | LowIRBuilderPass | LLVMIRWriter | WATWriter | RangerLLVMPipeline | RangerLLVMClassWriter | OpList | RangerActiveOperators | LiveCompiler | ColorConsole | CLIProgress | RangerDocGenerator | StaticAnalyzer | viewbuilder_Android | viewbuilder_Web | CompilerResults | VirtualCompiler | CompilerInterface | number | string | boolean | number;
|
|
2
2
|
export declare class CmdParams {
|
|
3
3
|
flags: {
|
|
4
4
|
[key: string]: boolean;
|
|
@@ -9,7 +9,7 @@ export declare class CmdParams {
|
|
|
9
9
|
values: Array<string>;
|
|
10
10
|
constructor();
|
|
11
11
|
hasParam(name: string): boolean;
|
|
12
|
-
getParam(name: string): string;
|
|
12
|
+
getParam(name: string): string | undefined;
|
|
13
13
|
collect(): void;
|
|
14
14
|
toDictionary(): Record<string, any>;
|
|
15
15
|
static fromDictionary(dict: Record<string, any>): Promise<CmdParams>;
|
|
@@ -165,6 +165,12 @@ export declare class RangerAppParamDesc {
|
|
|
165
165
|
rust_assigned_to_weak: boolean;
|
|
166
166
|
rust_needs_rc_wrap: boolean;
|
|
167
167
|
rust_assigned_to_field: boolean;
|
|
168
|
+
ownership_kind: number;
|
|
169
|
+
ownership_resolved: boolean;
|
|
170
|
+
escapes_via: string;
|
|
171
|
+
escape_owners: Array<string>;
|
|
172
|
+
escape_via_call: boolean;
|
|
173
|
+
ownership_read_only: boolean;
|
|
168
174
|
node?: CodeNode;
|
|
169
175
|
nameNode?: CodeNode;
|
|
170
176
|
fnBody?: CodeNode;
|
|
@@ -274,7 +280,11 @@ export declare class RangerAppClassDesc extends RangerAppParamDesc {
|
|
|
274
280
|
is_system_union: boolean;
|
|
275
281
|
is_template: boolean;
|
|
276
282
|
is_serialized: boolean;
|
|
283
|
+
is_process: boolean;
|
|
284
|
+
process_path: string;
|
|
285
|
+
is_singleton: boolean;
|
|
277
286
|
is_trait: boolean;
|
|
287
|
+
is_record: boolean;
|
|
278
288
|
is_operator_class: boolean;
|
|
279
289
|
is_generic_instance: boolean;
|
|
280
290
|
is_union: boolean;
|
|
@@ -297,6 +307,7 @@ export declare class RangerAppClassDesc extends RangerAppParamDesc {
|
|
|
297
307
|
[key: string]: RangerAppMethodVariants;
|
|
298
308
|
};
|
|
299
309
|
has_constructor: boolean;
|
|
310
|
+
is_collected: boolean;
|
|
300
311
|
constructor_node?: CodeNode;
|
|
301
312
|
constructor_fn?: RangerAppFunctionDesc;
|
|
302
313
|
has_destructor: boolean;
|
|
@@ -322,14 +333,19 @@ export declare class RangerAppClassDesc extends RangerAppParamDesc {
|
|
|
322
333
|
isNormalClass(): boolean;
|
|
323
334
|
getSystemclassType(): string;
|
|
324
335
|
isSystemclassType(typeName: string): boolean;
|
|
325
|
-
hasTrait(class_name: string, ctx: RangerAppWriterContext): RangerAppClassDesc;
|
|
336
|
+
hasTrait(class_name: string, ctx: RangerAppWriterContext): RangerAppClassDesc | undefined;
|
|
326
337
|
isSameOrParentClass(class_name: string, ctx: RangerAppWriterContext): boolean;
|
|
327
338
|
hasOwnMethod(m_name: string): boolean;
|
|
339
|
+
methodParamSignature(fnDesc: RangerAppFunctionDesc): string;
|
|
340
|
+
hasDuplicateMethodSignature(fnDesc: RangerAppFunctionDesc): boolean;
|
|
328
341
|
hasMethod(m_name: string): boolean;
|
|
329
|
-
findMethod(f_name: string): RangerAppFunctionDesc;
|
|
342
|
+
findMethod(f_name: string): RangerAppFunctionDesc | undefined;
|
|
343
|
+
findMethodByCompiledName(compiled: string): RangerAppFunctionDesc | undefined;
|
|
344
|
+
isSingletonClass(): boolean;
|
|
345
|
+
buildSingletonAccessor(): RangerAppFunctionDesc | undefined;
|
|
330
346
|
hasStaticMethod(m_name: string): boolean;
|
|
331
|
-
findStaticMethod(f_name: string): RangerAppFunctionDesc;
|
|
332
|
-
findVariable(f_name: string): RangerAppParamDesc;
|
|
347
|
+
findStaticMethod(f_name: string): RangerAppFunctionDesc | undefined;
|
|
348
|
+
findVariable(f_name: string): RangerAppParamDesc | undefined;
|
|
333
349
|
addParentClass(p_name: string): void;
|
|
334
350
|
createVariable(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
335
351
|
addVariable(desc: RangerAppParamDesc): void;
|
|
@@ -498,14 +514,14 @@ export declare class CodeNode {
|
|
|
498
514
|
matched_type: string;
|
|
499
515
|
constructor(source: SourceCode, start: number, end: number);
|
|
500
516
|
childCnt(): number;
|
|
501
|
-
getChild(index: number): CodeNode;
|
|
517
|
+
getChild(index: number): CodeNode | undefined;
|
|
502
518
|
chlen(): number;
|
|
503
519
|
forTree(callback: (item: CodeNode, i: number) => void): Promise<void>;
|
|
504
520
|
parallelTree(otherTree: CodeNode, callback: (left: CodeNode, right: CodeNode, i: number) => void): void;
|
|
505
521
|
walkTreeUntil(callback: (item: CodeNode, i: number) => boolean): void;
|
|
506
522
|
getParsedString(): string;
|
|
507
523
|
getFilename(): string;
|
|
508
|
-
getFlag(flagName: string): CodeNode;
|
|
524
|
+
getFlag(flagName: string): CodeNode | undefined;
|
|
509
525
|
hasFlag(flagName: string): boolean;
|
|
510
526
|
setFlag(flagName: string): void;
|
|
511
527
|
getFlagInt(flagName: string, paramName: string, defaultValue: number): number;
|
|
@@ -528,7 +544,7 @@ export declare class CodeNode {
|
|
|
528
544
|
getVRefAt(idx: number): string;
|
|
529
545
|
getStringAt(idx: number): string;
|
|
530
546
|
hasExpressionProperty(name: string): boolean;
|
|
531
|
-
getExpressionProperty(name: string): CodeNode;
|
|
547
|
+
getExpressionProperty(name: string): CodeNode | undefined;
|
|
532
548
|
hasIntProperty(name: string): boolean;
|
|
533
549
|
getIntProperty(name: string): number;
|
|
534
550
|
hasDoubleProperty(name: string): boolean;
|
|
@@ -560,6 +576,8 @@ export declare class CodeNode {
|
|
|
560
576
|
newStringNode(name: string): CodeNode;
|
|
561
577
|
newExpressionNode(): CodeNode;
|
|
562
578
|
getChildrenFrom(otherNode: CodeNode): void;
|
|
579
|
+
finalizeAsCallChainRoot(): void;
|
|
580
|
+
tryDesugarNewMethodChain(): boolean;
|
|
563
581
|
cloneWithType(match: RangerArgMatch, changeVref: boolean): CodeNode;
|
|
564
582
|
rebuildWithType(match: RangerArgMatch, changeVref: boolean): CodeNode;
|
|
565
583
|
buildTypeSignatureUsingMatch(match: RangerArgMatch): string;
|
|
@@ -587,6 +605,23 @@ export declare class CodeNode {
|
|
|
587
605
|
static blockNode(): CodeNode;
|
|
588
606
|
static blockFromList(list: Array<CodeNode>): CodeNode;
|
|
589
607
|
}
|
|
608
|
+
export declare class TTypeRegistry {
|
|
609
|
+
constructor();
|
|
610
|
+
static scalarPrimitiveNames(): Array<string>;
|
|
611
|
+
static isIntAlias(typeName: string): boolean;
|
|
612
|
+
static isFloatAlias(typeName: string): boolean;
|
|
613
|
+
static canonicalScalar(typeName: string): string;
|
|
614
|
+
static bufferTypeNames(): Array<string>;
|
|
615
|
+
static isScalarPrimitive(typeName: string): boolean;
|
|
616
|
+
static isBufferType(typeName: string): boolean;
|
|
617
|
+
static isPrimitiveTypeName(typeName: string): boolean;
|
|
618
|
+
static isKnownTypeName(typeName: string): boolean;
|
|
619
|
+
static nameToNodeType(name: string): number;
|
|
620
|
+
static nodeTypeToName(valueType: number): string;
|
|
621
|
+
static isNodePrimitive(valueType: number): boolean;
|
|
622
|
+
static targetTypeString(lang: string, typeName: string): string;
|
|
623
|
+
static listContains(list: Array<string>, value: string): boolean;
|
|
624
|
+
}
|
|
590
625
|
export declare class TypeCounts {
|
|
591
626
|
b_counted: boolean;
|
|
592
627
|
interface_cnt: number;
|
|
@@ -813,21 +848,21 @@ export declare class RangerAppWriterContext {
|
|
|
813
848
|
rustGetUsageCount(varName: string): number;
|
|
814
849
|
rustNeedsClone(varName: string): boolean;
|
|
815
850
|
rustGetTempVar(): string;
|
|
816
|
-
getEnv(): InputEnv;
|
|
851
|
+
getEnv(): InputEnv | undefined;
|
|
817
852
|
setTestCompile(): void;
|
|
818
853
|
unsetTestCompile(): void;
|
|
819
854
|
isTestCompile(): boolean;
|
|
820
855
|
addOpFn(name: string, code: CodeNode): void;
|
|
821
856
|
getOpFns(name: string): Promise<Array<CodeNode>>;
|
|
822
|
-
getLastBlockOp(): CodeNode;
|
|
857
|
+
getLastBlockOp(): CodeNode | undefined;
|
|
823
858
|
removePluginOp(name: string): void;
|
|
824
859
|
isPluginOp(node: CodeNode): boolean;
|
|
825
860
|
addPlugin(p: RangerRegisteredPlugin): void;
|
|
826
861
|
findPluginsFor(featureName: string): Array<string>;
|
|
827
862
|
addTypeClass(name: string): RangerTypeClass;
|
|
828
|
-
getTypeClass(name: string): RangerTypeClass;
|
|
829
|
-
getParser(): RangerFlowParser;
|
|
830
|
-
getCompiler(): LiveCompiler;
|
|
863
|
+
getTypeClass(name: string): RangerTypeClass | undefined;
|
|
864
|
+
getParser(): RangerFlowParser | undefined;
|
|
865
|
+
getCompiler(): LiveCompiler | undefined;
|
|
831
866
|
getTypedNodes(name: string): Promise<Array<CodeNode>>;
|
|
832
867
|
addTypedNode(name: string, op: CodeNode): void;
|
|
833
868
|
getPluginNodes(name: string): Promise<Array<CodeNode>>;
|
|
@@ -849,7 +884,7 @@ export declare class RangerAppWriterContext {
|
|
|
849
884
|
addViewClassBody(name: string, classDef: CodeNode): void;
|
|
850
885
|
addPage(name: string, classDef: CodeNode): void;
|
|
851
886
|
addService(name: string, classDef: CodeNode): void;
|
|
852
|
-
getViewClass(s_name: string): CodeNode;
|
|
887
|
+
getViewClass(s_name: string): CodeNode | undefined;
|
|
853
888
|
addOpNs(n: string): void;
|
|
854
889
|
removeOpNs(n: string): void;
|
|
855
890
|
inLambda(): boolean;
|
|
@@ -871,6 +906,7 @@ export declare class RangerAppWriterContext {
|
|
|
871
906
|
transformTypeName(typeName: string): string;
|
|
872
907
|
isPrimitiveType(typeName: string): boolean;
|
|
873
908
|
isDefinedType(typeName: string): boolean;
|
|
909
|
+
isDefinedCollectionType(typeName: string): boolean;
|
|
874
910
|
hadValidType(node: CodeNode): boolean;
|
|
875
911
|
findOperator(node: CodeNode): CodeNode;
|
|
876
912
|
getStdCommands(): CodeNode;
|
|
@@ -880,9 +916,9 @@ export declare class RangerAppWriterContext {
|
|
|
880
916
|
createStaticMethod(withName: string, currC: RangerAppClassDesc, nameNode: CodeNode, argsNode: CodeNode, fnBody: CodeNode, parser: RangerFlowParser, wr: CodeWriter): Promise<RangerAppFunctionDesc>;
|
|
881
917
|
canUseTypeInference(nameNode: CodeNode): boolean;
|
|
882
918
|
createOpStaticClass(name: string): RangerAppClassDesc;
|
|
883
|
-
createTraitInstanceClass(traitName: string, instanceName: string, initParams: CodeNode, flowParser: RangerFlowParser, wr: CodeWriter): Promise<RangerAppClassDesc
|
|
919
|
+
createTraitInstanceClass(traitName: string, instanceName: string, initParams: CodeNode, flowParser: RangerFlowParser, wr: CodeWriter): Promise<RangerAppClassDesc> | undefined;
|
|
884
920
|
createOperator(fromNode: CodeNode): void;
|
|
885
|
-
findClassMethod(cname: string, fname: string): RangerAppFunctionDesc;
|
|
921
|
+
findClassMethod(cname: string, fname: string): RangerAppFunctionDesc | undefined;
|
|
886
922
|
getFileWriter(path: string, fileName: string): CodeWriter;
|
|
887
923
|
addTodo(node: CodeNode, descr: string): void;
|
|
888
924
|
setThisName(the_name: string): void;
|
|
@@ -899,7 +935,7 @@ export declare class RangerAppWriterContext {
|
|
|
899
935
|
setStaticWriter(className: string, writer: CodeWriter): void;
|
|
900
936
|
getStaticWriter(className: string): CodeWriter;
|
|
901
937
|
isEnumDefined(n: string): boolean;
|
|
902
|
-
getEnum(n: string): RangerAppEnum;
|
|
938
|
+
getEnum(n: string): RangerAppEnum | undefined;
|
|
903
939
|
isVarDefined(name: string): boolean;
|
|
904
940
|
setFlag(name: string, value: boolean): void;
|
|
905
941
|
getFlag(name: string): boolean;
|
|
@@ -919,6 +955,7 @@ export declare class RangerAppWriterContext {
|
|
|
919
955
|
getFnVarCnt2(name: string): number;
|
|
920
956
|
getFnVarCnt3(name: string): number;
|
|
921
957
|
isMemberVariable(name: string): boolean;
|
|
958
|
+
assignParamCompiledName(p: RangerAppParamDesc): void;
|
|
922
959
|
defineVariable(name: string, desc: RangerAppParamDesc): void;
|
|
923
960
|
isDefinedClass(name: string): boolean;
|
|
924
961
|
getRoot(): RangerAppWriterContext;
|
|
@@ -930,7 +967,7 @@ export declare class RangerAppWriterContext {
|
|
|
930
967
|
setCurrentClass(cc: RangerAppClassDesc): void;
|
|
931
968
|
disableCurrentClass(): void;
|
|
932
969
|
hasCurrentClass(): boolean;
|
|
933
|
-
getCurrentClass(): RangerAppClassDesc;
|
|
970
|
+
getCurrentClass(): RangerAppClassDesc | undefined;
|
|
934
971
|
restartExpressionLevel(): void;
|
|
935
972
|
newBlock(): void;
|
|
936
973
|
isInExpression(): boolean;
|
|
@@ -946,12 +983,48 @@ export declare class RangerAppWriterContext {
|
|
|
946
983
|
isInMethod(): boolean;
|
|
947
984
|
setInMethod(): void;
|
|
948
985
|
unsetInMethod(): void;
|
|
949
|
-
findMethodLevelContext(): RangerAppWriterContext;
|
|
950
|
-
findClassLevelContext(): RangerAppWriterContext;
|
|
986
|
+
findMethodLevelContext(): RangerAppWriterContext | undefined;
|
|
987
|
+
findClassLevelContext(): RangerAppWriterContext | undefined;
|
|
951
988
|
fork(): RangerAppWriterContext;
|
|
952
989
|
getRootFile(): string;
|
|
953
990
|
setRootFile(file_name: string): void;
|
|
954
991
|
}
|
|
992
|
+
export declare class SourceMapEntry {
|
|
993
|
+
genLine: number;
|
|
994
|
+
genCol: number;
|
|
995
|
+
sourceIdx: number;
|
|
996
|
+
origLine: number;
|
|
997
|
+
origCol: number;
|
|
998
|
+
nameIdx: number;
|
|
999
|
+
constructor();
|
|
1000
|
+
}
|
|
1001
|
+
export declare class SourceMapBuilder {
|
|
1002
|
+
mappings: Array<SourceMapEntry>;
|
|
1003
|
+
sources: Array<string>;
|
|
1004
|
+
sourceToIdx: {
|
|
1005
|
+
[key: string]: number;
|
|
1006
|
+
};
|
|
1007
|
+
sourcesContent: Array<string>;
|
|
1008
|
+
names: Array<string>;
|
|
1009
|
+
nameToIdx: {
|
|
1010
|
+
[key: string]: number;
|
|
1011
|
+
};
|
|
1012
|
+
outputFile: string;
|
|
1013
|
+
constructor();
|
|
1014
|
+
isSyntheticSource(sourceFile: string): boolean;
|
|
1015
|
+
registerSourceIdx(sourceFile: string, sourceContent: string): number;
|
|
1016
|
+
registerNameIdx(name: string): number;
|
|
1017
|
+
addMapping(genLine: number, genCol: number, sourceFile: string, sourceContent: string, origLine: number, origCol: number, name: string): void;
|
|
1018
|
+
addMappingFromNode(genLine: number, genCol: number, node: CodeNode, name: string): void;
|
|
1019
|
+
vlqBase64Chars(): string;
|
|
1020
|
+
encodeVLQUnsigned(value: number): string;
|
|
1021
|
+
encodeSignedVLQ(value: number): string;
|
|
1022
|
+
buildMappingsString(): string;
|
|
1023
|
+
jsonEscape(value: string): string;
|
|
1024
|
+
jsonStringArray(items: Array<string>): string;
|
|
1025
|
+
toJSON(fileName: string): string;
|
|
1026
|
+
hasMappings(): boolean;
|
|
1027
|
+
}
|
|
955
1028
|
export declare class CodeFile {
|
|
956
1029
|
path_name: string;
|
|
957
1030
|
name: string;
|
|
@@ -961,19 +1034,25 @@ export declare class CodeFile {
|
|
|
961
1034
|
};
|
|
962
1035
|
import_names: Array<string>;
|
|
963
1036
|
fileSystem?: CodeFileSystem;
|
|
1037
|
+
sourceMapBuilder?: SourceMapBuilder;
|
|
964
1038
|
constructor(filePath: string, fileName: string);
|
|
1039
|
+
initSourceMapsIfNeeded(): void;
|
|
965
1040
|
addImport(import_name: string): void;
|
|
966
1041
|
rewrite(newString: string): void;
|
|
967
1042
|
testCreateWriter(): CodeWriter;
|
|
968
1043
|
getImports(): Array<string>;
|
|
969
|
-
getWriter(): CodeWriter;
|
|
1044
|
+
getWriter(): CodeWriter | undefined;
|
|
970
1045
|
getCode(): string;
|
|
971
1046
|
}
|
|
972
1047
|
export declare class CodeFileSystem {
|
|
973
1048
|
files: Array<CodeFile>;
|
|
1049
|
+
sourceMapsEnabled: boolean;
|
|
974
1050
|
constructor();
|
|
1051
|
+
enableSourceMaps(): void;
|
|
1052
|
+
shouldWriteSourceMaps(): boolean;
|
|
975
1053
|
getFile(path: string, name: string): CodeFile;
|
|
976
1054
|
mkdir(path: string): void;
|
|
1055
|
+
isJsOutputFile(fileName: string): boolean;
|
|
977
1056
|
saveTo(path: string, verbose: boolean): void;
|
|
978
1057
|
}
|
|
979
1058
|
export declare class CodeSlice {
|
|
@@ -989,6 +1068,7 @@ export declare class CodeWriter {
|
|
|
989
1068
|
tabStr: string;
|
|
990
1069
|
nlStr: string;
|
|
991
1070
|
lineNumber: number;
|
|
1071
|
+
columnNumber: number;
|
|
992
1072
|
indentAmount: number;
|
|
993
1073
|
compiledTags: {
|
|
994
1074
|
[key: string]: boolean;
|
|
@@ -1003,8 +1083,24 @@ export declare class CodeWriter {
|
|
|
1003
1083
|
tagOffset: number;
|
|
1004
1084
|
parent?: CodeWriter;
|
|
1005
1085
|
had_nl: boolean;
|
|
1086
|
+
sourceMapsEnabled: boolean;
|
|
1087
|
+
sourceMapBuilder?: SourceMapBuilder;
|
|
1088
|
+
mappingNodeStack: Array<CodeNode>;
|
|
1089
|
+
mappingNameStack: Array<string>;
|
|
1090
|
+
walkNodeStack: Array<CodeNode>;
|
|
1006
1091
|
constructor();
|
|
1007
1092
|
rewrite(newString: string): void;
|
|
1093
|
+
enableSourceMaps(builder: SourceMapBuilder): void;
|
|
1094
|
+
getActiveSourceMapBuilder(): SourceMapBuilder | undefined;
|
|
1095
|
+
pushMappingNode(node: CodeNode, name: string): void;
|
|
1096
|
+
popMappingNode(): void;
|
|
1097
|
+
getCurrentMappingNode(): CodeNode | undefined;
|
|
1098
|
+
getCurrentMappingName(): string;
|
|
1099
|
+
pushWalkNode(node: CodeNode): void;
|
|
1100
|
+
popWalkNode(): void;
|
|
1101
|
+
getCurrentWalkNode(): CodeNode | undefined;
|
|
1102
|
+
recordCurrentMapping(): void;
|
|
1103
|
+
outMapped(str: string, node: CodeNode, newLine: boolean, name: string): void;
|
|
1008
1104
|
getFilesystem(): CodeFileSystem;
|
|
1009
1105
|
getFileWriter(path: string, fileName: string): CodeWriter;
|
|
1010
1106
|
getImports(): Array<string>;
|
|
@@ -1017,6 +1113,8 @@ export declare class CodeWriter {
|
|
|
1017
1113
|
fork(): CodeWriter;
|
|
1018
1114
|
newline(): void;
|
|
1019
1115
|
line_end(str: string): void;
|
|
1116
|
+
advanceColumnForString(str: string): void;
|
|
1117
|
+
syncColumnFromCurrentLine(): void;
|
|
1020
1118
|
writeSlice(str: string, newLine: boolean): void;
|
|
1021
1119
|
out(str: string, newLine: boolean): void;
|
|
1022
1120
|
raw(str: string, newLine: boolean): void;
|
|
@@ -1042,14 +1140,27 @@ export declare class RangerLispParser {
|
|
|
1042
1140
|
joo(cm: SourceCode): void;
|
|
1043
1141
|
parse_raw_annotation(): CodeNode;
|
|
1044
1142
|
skip_space(is_block_parent: boolean): boolean;
|
|
1045
|
-
end_expression(): boolean;
|
|
1143
|
+
end_expression(consumeCurrent: boolean): boolean;
|
|
1046
1144
|
getOperator(disabled: boolean): number;
|
|
1047
1145
|
isOperator(disabled: boolean): number;
|
|
1048
1146
|
getOperatorPred(str: string, disabled: boolean): number;
|
|
1147
|
+
isComparisonOpPred(pred: number): boolean;
|
|
1148
|
+
isDotVRef(n: CodeNode): boolean;
|
|
1149
|
+
isDotCallPairOnNode(node: CodeNode): boolean;
|
|
1150
|
+
foldDotCallPairToGroup(node: CodeNode): void;
|
|
1151
|
+
tryCloseCallArgParenBeforeInfix(): boolean;
|
|
1049
1152
|
insert_node(p_node: CodeNode): void;
|
|
1050
1153
|
parse_attributes(): boolean;
|
|
1051
1154
|
parseXML(): void;
|
|
1052
1155
|
parse(disable_ops: boolean): void;
|
|
1156
|
+
static normalizeLineEndings(src: string): string;
|
|
1157
|
+
}
|
|
1158
|
+
export declare class TTypes {
|
|
1159
|
+
constructor();
|
|
1160
|
+
static nameToValue(name: string): number;
|
|
1161
|
+
static isPrimitive(valueType: number): boolean;
|
|
1162
|
+
static valueAsString(valueType: number): string;
|
|
1163
|
+
static baseTypeAsEval(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1053
1164
|
}
|
|
1054
1165
|
export declare class RangerArgMatch {
|
|
1055
1166
|
_debug: boolean;
|
|
@@ -1073,11 +1184,14 @@ export declare class RangerArgMatch {
|
|
|
1073
1184
|
add_atype(tplKeyword: string, typeName: string, ctx: RangerAppWriterContext): boolean;
|
|
1074
1185
|
doesDefsMatch(arg: CodeNode, node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1075
1186
|
doesMatch(arg: CodeNode, node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1076
|
-
areEqualTypes(
|
|
1077
|
-
areEqualATypes(
|
|
1187
|
+
areEqualTypes(type1o: string, type2o: string, ctx: RangerAppWriterContext): boolean;
|
|
1188
|
+
areEqualATypes(type1i: string, type2i: string, ctx: RangerAppWriterContext): boolean;
|
|
1078
1189
|
getTypeName(n: string): string;
|
|
1079
1190
|
getType(n: string): number;
|
|
1080
1191
|
setRvBasedOn(arg: CodeNode, node: CodeNode): boolean;
|
|
1192
|
+
nodeTypeString(node: CodeNode): string;
|
|
1193
|
+
isCollectionTypeString(s: string): boolean;
|
|
1194
|
+
applyTypeStringToNode(node: CodeNode, typeStr: string): void;
|
|
1081
1195
|
}
|
|
1082
1196
|
export declare class DictNode {
|
|
1083
1197
|
is_property: boolean;
|
|
@@ -1100,28 +1214,32 @@ export declare class DictNode {
|
|
|
1100
1214
|
addDouble(key: string, value: number): void;
|
|
1101
1215
|
addInt(key: string, value: number): void;
|
|
1102
1216
|
addBoolean(key: string, value: boolean): void;
|
|
1103
|
-
addObject(key: string): DictNode;
|
|
1217
|
+
addObject(key: string): DictNode | undefined;
|
|
1104
1218
|
setObject(key: string, value: DictNode): void;
|
|
1105
|
-
addArray(key: string): DictNode;
|
|
1219
|
+
addArray(key: string): DictNode | undefined;
|
|
1106
1220
|
push(obj: DictNode): void;
|
|
1107
1221
|
getDoubleAt(index: number): number;
|
|
1108
1222
|
getStringAt(index: number): string;
|
|
1109
1223
|
getIntAt(index: number): number;
|
|
1110
1224
|
getBooleanAt(index: number): boolean;
|
|
1111
|
-
getString(key: string): string;
|
|
1112
|
-
getDouble(key: string): number;
|
|
1113
|
-
getInt(key: string): number;
|
|
1114
|
-
getBoolean(key: string): boolean;
|
|
1115
|
-
getArray(key: string): DictNode;
|
|
1116
|
-
getArrayAt(index: number): DictNode;
|
|
1117
|
-
getObject(key: string): DictNode;
|
|
1118
|
-
getObjectAt(index: number): DictNode;
|
|
1225
|
+
getString(key: string): string | undefined;
|
|
1226
|
+
getDouble(key: string): number | undefined;
|
|
1227
|
+
getInt(key: string): number | undefined;
|
|
1228
|
+
getBoolean(key: string): boolean | undefined;
|
|
1229
|
+
getArray(key: string): DictNode | undefined;
|
|
1230
|
+
getArrayAt(index: number): DictNode | undefined;
|
|
1231
|
+
getObject(key: string): DictNode | undefined;
|
|
1232
|
+
getObjectAt(index: number): DictNode | undefined;
|
|
1119
1233
|
stringify(): string;
|
|
1120
1234
|
static createEmptyObject(): DictNode;
|
|
1121
1235
|
}
|
|
1122
1236
|
export declare class RangerSerializeClass {
|
|
1123
1237
|
constructor();
|
|
1124
1238
|
isSerializedClass(cName: string, ctx: RangerAppWriterContext): boolean;
|
|
1239
|
+
canSerializeClass(cName: string, ctx: RangerAppWriterContext): boolean;
|
|
1240
|
+
missesSerializeSupport(cName: string, ctx: RangerAppWriterContext): boolean;
|
|
1241
|
+
describeFieldType(nn: CodeNode): string;
|
|
1242
|
+
validateSerializedClass(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): boolean;
|
|
1125
1243
|
createWRWriter(pvar: RangerAppParamDesc, nn: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1126
1244
|
createJSONSerializerFn(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1127
1245
|
createWRWriter2(pvar: RangerAppParamDesc, nn: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
@@ -1133,6 +1251,55 @@ export declare class RangerImmutableExtension {
|
|
|
1133
1251
|
typeDefOf(p: RangerAppParamDesc): string;
|
|
1134
1252
|
createImmutableExtension(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1135
1253
|
}
|
|
1254
|
+
export declare class RangerProcessLifecycle {
|
|
1255
|
+
constructor();
|
|
1256
|
+
emitInvokeMethods(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter, regName: string): void;
|
|
1257
|
+
emitStopSubtree(cl: RangerAppClassDesc, wr: CodeWriter, regName: string): void;
|
|
1258
|
+
}
|
|
1259
|
+
export declare class RangerProcessClass {
|
|
1260
|
+
constructor();
|
|
1261
|
+
emitAssignProcessId(wr: CodeWriter): void;
|
|
1262
|
+
createProcessExtension(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter, typeId: number): void;
|
|
1263
|
+
emitStaticHelpers(cl: RangerAppClassDesc, typeId: number, wr: CodeWriter, regName: string): void;
|
|
1264
|
+
emitProcessNameRegistryExtension(processClasses: Array<RangerAppClassDesc>, wr: CodeWriter): void;
|
|
1265
|
+
emitProcessRuntimeExtension(processClasses: Array<RangerAppClassDesc>, wr: CodeWriter): void;
|
|
1266
|
+
emitProcessTypeScriptHelpers(processClasses: Array<RangerAppClassDesc>, wr: CodeWriter): void;
|
|
1267
|
+
}
|
|
1268
|
+
export declare class RangerProcessProcSend {
|
|
1269
|
+
constructor();
|
|
1270
|
+
static isReservedHandler(name: string): boolean;
|
|
1271
|
+
static collectProcessClasses(ctx: RangerAppWriterContext): Array<RangerAppClassDesc>;
|
|
1272
|
+
static findClassByPath(pathLit: string, processClasses: Array<RangerAppClassDesc>): RangerAppClassDesc | undefined;
|
|
1273
|
+
static resolveTargetClass(parser: RangerFlowParser, target: CodeNode, processClasses: Array<RangerAppClassDesc>, ctx: RangerAppWriterContext, wr: CodeWriter, errNode: CodeNode): Promise<RangerAppClassDesc> | undefined;
|
|
1274
|
+
static matchHandler(parser: RangerFlowParser, recvClass: RangerAppClassDesc, methodName: string, argNodes: Array<CodeNode>, ctx: RangerAppWriterContext, wr: CodeWriter, errNode: CodeNode): Promise<RangerAppFunctionDesc> | undefined;
|
|
1275
|
+
static buildLiveGuard(targetVref: string): CodeNode;
|
|
1276
|
+
static buildHandlerCall(targetVref: string, handlerName: string, argNodes: Array<CodeNode>): CodeNode;
|
|
1277
|
+
static buildFindRootExpr(targetVref: string): CodeNode;
|
|
1278
|
+
static buildDispatchTurnBoundary(opName: string, rootExpr: CodeNode): CodeNode;
|
|
1279
|
+
static transform(parser: RangerFlowParser, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1280
|
+
}
|
|
1281
|
+
export declare class RangerProcessProcStartCheck {
|
|
1282
|
+
constructor();
|
|
1283
|
+
static validate(parser: RangerFlowParser, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1284
|
+
}
|
|
1285
|
+
export declare class RangerProcessCodegen {
|
|
1286
|
+
constructor();
|
|
1287
|
+
validateProcessNewSite(node: CodeNode, newCl: RangerAppClassDesc, ctx: RangerAppWriterContext): void;
|
|
1288
|
+
shouldWrapProcessNew(procNewNode: CodeNode, procNewCtx: RangerAppWriterContext): boolean;
|
|
1289
|
+
hasParentRegister(procNewCtx: RangerAppWriterContext): boolean;
|
|
1290
|
+
writeNewArgs(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, writer: RangerGenericClassWriter): Promise<void>;
|
|
1291
|
+
writeProcessInstanceRegisterCall(wr: CodeWriter, lang: string): void;
|
|
1292
|
+
shouldUseProcessInstanceRegister(procNewCtx: RangerAppWriterContext, newCl: RangerAppClassDesc): boolean;
|
|
1293
|
+
writeRegisterCall(procNewCtx: RangerAppWriterContext, wr: CodeWriter, lang: string, newCl: RangerAppClassDesc): void;
|
|
1294
|
+
writeWrappedNewCallEs6(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, writer: RangerGenericClassWriter): Promise<void>;
|
|
1295
|
+
writeWrappedNewCallKotlin(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, writer: RangerGenericClassWriter): Promise<void>;
|
|
1296
|
+
writeWrappedNewCallSwift6(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, writer: RangerGenericClassWriter): Promise<void>;
|
|
1297
|
+
writeWrappedNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, lang: string, writer: RangerGenericClassWriter): Promise<void>;
|
|
1298
|
+
static isNamedProcess(cl: RangerAppClassDesc): boolean;
|
|
1299
|
+
static isInProcessInstanceMethod(ctx: RangerAppWriterContext): boolean;
|
|
1300
|
+
static isBootstrapSite(ctx: RangerAppWriterContext): boolean;
|
|
1301
|
+
static isInsideNamedProcessMethod(ctx: RangerAppWriterContext): boolean;
|
|
1302
|
+
}
|
|
1136
1303
|
export declare class RangerServiceBuilder {
|
|
1137
1304
|
constructor();
|
|
1138
1305
|
createOpStaticClass(ctx: RangerAppWriterContext, name: string): RangerAppClassDesc;
|
|
@@ -1155,13 +1322,6 @@ export declare class TFiles {
|
|
|
1155
1322
|
static searchEnv(env: InputEnv, paths: Array<string>, fileName: string): string;
|
|
1156
1323
|
static search(paths: Array<string>, fileName: string): string;
|
|
1157
1324
|
}
|
|
1158
|
-
export declare class TTypes {
|
|
1159
|
-
constructor();
|
|
1160
|
-
static nameToValue(name: string): number;
|
|
1161
|
-
static isPrimitive(valueType: number): boolean;
|
|
1162
|
-
static valueAsString(valueType: number): string;
|
|
1163
|
-
static baseTypeAsEval(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1164
|
-
}
|
|
1165
1325
|
export declare class ClassJoinPoint {
|
|
1166
1326
|
class_def?: RangerAppClassDesc;
|
|
1167
1327
|
node?: CodeNode;
|
|
@@ -1182,6 +1342,7 @@ export declare class RangerFlowParser {
|
|
|
1182
1342
|
walkAlso: Array<CodeNode>;
|
|
1183
1343
|
serializedClasses: Array<RangerAppClassDesc>;
|
|
1184
1344
|
immutableClasses: Array<RangerAppClassDesc>;
|
|
1345
|
+
processClasses: Array<RangerAppClassDesc>;
|
|
1185
1346
|
classesWithTraits: Array<ClassJoinPoint>;
|
|
1186
1347
|
collectedIntefaces: Array<RangerAppClassDesc>;
|
|
1187
1348
|
definedInterfaces: {
|
|
@@ -1205,6 +1366,7 @@ export declare class RangerFlowParser {
|
|
|
1205
1366
|
[key: string]: string;
|
|
1206
1367
|
};
|
|
1207
1368
|
constructor();
|
|
1369
|
+
fixExpressionAssignmentChains(node: CodeNode): void;
|
|
1208
1370
|
WalkNodeChildren(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1209
1371
|
WalkNode(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1210
1372
|
getVoidNameSignature(): string;
|
|
@@ -1216,17 +1378,24 @@ export declare class RangerFlowParser {
|
|
|
1216
1378
|
EnterFn(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, callback: (node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, nameNode: CodeNode, fnArgs: CodeNode, fnBody: CodeNode, desc: RangerAppClassDesc) => void): Promise<void>;
|
|
1217
1379
|
Constructor(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1218
1380
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1381
|
+
normalizeNewArgList(node: CodeNode): void;
|
|
1219
1382
|
cmdNew(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1220
1383
|
transformParams(list: Array<CodeNode>, fnArgs: Array<RangerAppParamDesc>, ctx: RangerAppWriterContext): Array<CodeNode>;
|
|
1221
1384
|
transformParams2(list: Array<CodeNode>, fnArgs: Array<CodeNode>, ctx: RangerAppWriterContext): Array<CodeNode>;
|
|
1222
1385
|
CreateCTTI(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1223
1386
|
CreateRTTI(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1224
1387
|
SolveAsyncFuncs(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1388
|
+
matchMethodCall(cl: RangerAppClassDesc, methodName: string, callArgs: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, errNode: CodeNode): Promise<RangerAppFunctionDesc> | undefined;
|
|
1225
1389
|
cmdCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1226
1390
|
matchLambdaArgs(n1: CodeNode, n2: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1227
1391
|
testLambdaCallArgs(lambda_expression: CodeNode, callParams: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1228
1392
|
cmdLocalCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1229
1393
|
transformImmutableAssigment(node: CodeNode): CodeNode;
|
|
1394
|
+
transformDotMethodCallExpr(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1395
|
+
repairUnaryMinusExpr(node: CodeNode): void;
|
|
1396
|
+
repairAssignUnaryMinusRhs(node: CodeNode): void;
|
|
1397
|
+
repairAssignMethodCallRhs(node: CodeNode): void;
|
|
1398
|
+
checkInitializedObjectReceiver(receiverName: string, node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1230
1399
|
cmdAssign(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1231
1400
|
EnterTemplateClass(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1232
1401
|
EnterClass(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1246,22 +1415,36 @@ export declare class RangerFlowParser {
|
|
|
1246
1415
|
matchNode(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1247
1416
|
StartWalk(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1248
1417
|
clearImports(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1418
|
+
registerLangSystemClasses(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1419
|
+
walkLangDefinitions(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1420
|
+
registerSystemClassFromNode(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1421
|
+
registerSystemUnionFromNode(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1422
|
+
finalizeRecordClasses(ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1423
|
+
expandRecordCtorArgsIfNeeded(cl: RangerAppClassDesc, fnDescr: RangerAppFunctionDesc, params: CodeNode, node: CodeNode): void;
|
|
1424
|
+
buildRecordConstructor(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1249
1425
|
mergeImports(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1250
1426
|
CollectMethods(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1251
1427
|
defineFunctionParam(method: RangerAppFunctionDesc, arg: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1252
1428
|
spliceFunctionBody(startIndex: number, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): CodeNode;
|
|
1253
1429
|
CreateFunctionObject(orig_node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<RangerAppFunctionDesc>;
|
|
1254
1430
|
WalkCollectMethods(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1255
|
-
|
|
1256
|
-
|
|
1431
|
+
varShadowsSystemType(strname: string, ctx: RangerAppWriterContext): boolean;
|
|
1432
|
+
findFunctionDesc(obj: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): RangerAppFunctionDesc | undefined;
|
|
1433
|
+
findParamDesc(obj: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): RangerAppParamDesc | undefined;
|
|
1257
1434
|
convertToUnion(unionName: string, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1258
1435
|
transformMethodToLambda(node: CodeNode, vFnDef: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1259
1436
|
areEqualTypes(n1: CodeNode, n2: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1260
1437
|
shouldBeEqualTypes(n1: CodeNode, n2: CodeNode, ctx: RangerAppWriterContext, msg: string): void;
|
|
1261
1438
|
shouldBeExpression(n1: CodeNode, ctx: RangerAppWriterContext, msg: string): void;
|
|
1262
1439
|
shouldHaveChildCnt(cnt: number, n1: CodeNode, ctx: RangerAppWriterContext, msg: string): void;
|
|
1263
|
-
|
|
1440
|
+
readProcessPathFromClassTree(root: CodeNode): string;
|
|
1441
|
+
applyProcessClassMeta(cl: RangerAppClassDesc, classNameNode: CodeNode, node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1442
|
+
resolveProcessPathFromFields(cl: RangerAppClassDesc): void;
|
|
1443
|
+
validateProcessPaths(processClasses: Array<RangerAppClassDesc>, ctx: RangerAppWriterContext): void;
|
|
1444
|
+
isValidProcessPath(pathStr: string): boolean;
|
|
1445
|
+
findLanguageOper(details: CodeNode, ctx: RangerAppWriterContext, opDef: CodeNode): Promise<CodeNode> | undefined;
|
|
1264
1446
|
buildMacro(langOper: CodeNode, args: CodeNode, ctx: RangerAppWriterContext): Promise<CodeNode>;
|
|
1447
|
+
operandIsNonOptionalForNullCheck(node: CodeNode): boolean;
|
|
1265
1448
|
stdParamMatch(callArgs: CodeNode, inCtx: RangerAppWriterContext, wr: CodeWriter, require_all_match: boolean): Promise<boolean>;
|
|
1266
1449
|
}
|
|
1267
1450
|
export declare class TFactory {
|
|
@@ -1327,6 +1510,8 @@ export declare class RangerGenericClassWriter {
|
|
|
1327
1510
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1328
1511
|
writeRawTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1329
1512
|
adjustType(tn: string): string;
|
|
1513
|
+
defValueHasSideEffects(value: CodeNode): boolean;
|
|
1514
|
+
writeSideEffectOnlyStmt(value: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1330
1515
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1331
1516
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1332
1517
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1340,6 +1525,8 @@ export declare class RangerGenericClassWriter {
|
|
|
1340
1525
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1341
1526
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1342
1527
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1528
|
+
walkNewArgForProcess(n: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1529
|
+
tryWriteProcessNewCall(procNewNode: CodeNode, procNewCtx: RangerAppWriterContext, outWr: CodeWriter): Promise<boolean>;
|
|
1343
1530
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1344
1531
|
writeInterface(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1345
1532
|
disabledVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1410,6 +1597,7 @@ export declare class RangerSwift6ClassWriter extends RangerGenericClassWriter {
|
|
|
1410
1597
|
constructor();
|
|
1411
1598
|
adjustType(tn: string): string;
|
|
1412
1599
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1600
|
+
collectionTypeStringToSwift(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1413
1601
|
getTypeString(type_string: string): string;
|
|
1414
1602
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1415
1603
|
WriteEnum(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1417,6 +1605,8 @@ export declare class RangerSwift6ClassWriter extends RangerGenericClassWriter {
|
|
|
1417
1605
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1418
1606
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1419
1607
|
writeArgsDefWithLocals(fnDesc: RangerAppFunctionDesc, localFnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1608
|
+
resolveCallReceiverClassName(obj: CodeNode, ctx: RangerAppWriterContext): string;
|
|
1609
|
+
isSimpleClassCallReceiver(obj: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1420
1610
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1421
1611
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1422
1612
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1425,18 +1615,28 @@ export declare class RangerSwift6ClassWriter extends RangerGenericClassWriter {
|
|
|
1425
1615
|
haveSameSig(fn1: RangerAppFunctionDesc, fn2: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
1426
1616
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1427
1617
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1618
|
+
resolveMethodFnDesc(methodNode: CodeNode, ctx: RangerAppWriterContext): RangerAppFunctionDesc | undefined;
|
|
1619
|
+
CreateMethodCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1428
1620
|
}
|
|
1429
1621
|
export declare class RangerCppClassWriter extends RangerGenericClassWriter {
|
|
1430
1622
|
compiler?: LiveCompiler;
|
|
1431
1623
|
header_created: boolean;
|
|
1624
|
+
buf_ret_seen: boolean;
|
|
1625
|
+
buf_ret_all_safe: boolean;
|
|
1432
1626
|
constructor();
|
|
1433
1627
|
lineEnding(): string;
|
|
1434
1628
|
adjustType(tn: string): string;
|
|
1435
1629
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1436
1630
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1631
|
+
collectionTypeStringToCpp(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1437
1632
|
getTypeString2(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1438
1633
|
writePtr(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1439
1634
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1635
|
+
cppMemberPathOf(node: CodeNode): string;
|
|
1636
|
+
cppReturnIsSafeBufferLvalue(retValue: CodeNode): boolean;
|
|
1637
|
+
cppScanBufferReturns(node: CodeNode): void;
|
|
1638
|
+
cppBufferReturnByRef(variant: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
1639
|
+
writeReturnTypeDef(variant: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1440
1640
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1441
1641
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1442
1642
|
disabledVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1447,6 +1647,7 @@ export declare class RangerCppClassWriter extends RangerGenericClassWriter {
|
|
|
1447
1647
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1448
1648
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1449
1649
|
writeCppHeaderVar(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, do_initialize: boolean): Promise<void>;
|
|
1650
|
+
cppReadonlyValueParam(arg: RangerAppParamDesc): boolean;
|
|
1450
1651
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1451
1652
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1452
1653
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1504,6 +1705,7 @@ export declare class RangerRustClassWriter extends RangerGenericClassWriter {
|
|
|
1504
1705
|
findSelfCallInArgs(node: CodeNode): number;
|
|
1505
1706
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1506
1707
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1708
|
+
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1507
1709
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1508
1710
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1509
1711
|
}
|
|
@@ -1513,10 +1715,12 @@ export declare class RangerKotlinClassWriter extends RangerGenericClassWriter {
|
|
|
1513
1715
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1514
1716
|
adjustType(tn: string): string;
|
|
1515
1717
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1718
|
+
collectionTypeStringToKotlin(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1516
1719
|
getTypeString(type_string: string): string;
|
|
1517
1720
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1518
1721
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1519
1722
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1723
|
+
paramEmitName(arg: RangerAppParamDesc, ctx: RangerAppWriterContext): string;
|
|
1520
1724
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1521
1725
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1522
1726
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1661,12 +1865,14 @@ export declare class RangerJavaScriptClassWriter extends RangerGenericClassWrite
|
|
|
1661
1865
|
target_esm: boolean;
|
|
1662
1866
|
constructor();
|
|
1663
1867
|
lineEnding(): string;
|
|
1868
|
+
writeTsOptionalReturnSuffix(variant: RangerAppFunctionDesc, wr: CodeWriter): void;
|
|
1664
1869
|
adjustType(tn: string): string;
|
|
1665
1870
|
CreateTsUnions(parser: RangerFlowParser, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1666
1871
|
isOptionalReference(node: CodeNode): boolean;
|
|
1667
1872
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1668
1873
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1669
1874
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1875
|
+
collectionTypeStringToTs(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1670
1876
|
getTypeString(type_string: string): string;
|
|
1671
1877
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1672
1878
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1703,6 +1909,619 @@ export declare class RangerRangerClassWriter extends RangerGenericClassWriter {
|
|
|
1703
1909
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1704
1910
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1705
1911
|
}
|
|
1912
|
+
export declare class LowIRUtil {
|
|
1913
|
+
constructor();
|
|
1914
|
+
static typeFromRanger(typeName: string): string;
|
|
1915
|
+
static isSupportedPrimitive(typeName: string): boolean;
|
|
1916
|
+
static isStringType(typeName: string): boolean;
|
|
1917
|
+
static isArrayTypeName(typeName: string): boolean;
|
|
1918
|
+
static isBufferTypeName(typeName: string): boolean;
|
|
1919
|
+
static isSupportedParam(typeName: string): boolean;
|
|
1920
|
+
static fieldIrType(typeName: string): string;
|
|
1921
|
+
static mangleMethod(className: string, methodName: string): string;
|
|
1922
|
+
static structPtrType(className: string): string;
|
|
1923
|
+
static structType(className: string): string;
|
|
1924
|
+
static moduleUsesHeap(module: LowIRModule): boolean;
|
|
1925
|
+
}
|
|
1926
|
+
export declare class LowIRParam {
|
|
1927
|
+
name: string;
|
|
1928
|
+
irType: string;
|
|
1929
|
+
constructor();
|
|
1930
|
+
}
|
|
1931
|
+
export declare class LowIRInstr {
|
|
1932
|
+
op: string;
|
|
1933
|
+
dest: string;
|
|
1934
|
+
irType: string;
|
|
1935
|
+
arg1: string;
|
|
1936
|
+
arg2: string;
|
|
1937
|
+
arg3: string;
|
|
1938
|
+
pred: string;
|
|
1939
|
+
fnName: string;
|
|
1940
|
+
callArgs: Array<string>;
|
|
1941
|
+
callTypes: Array<string>;
|
|
1942
|
+
callSig: string;
|
|
1943
|
+
structName: string;
|
|
1944
|
+
fieldIndex: number;
|
|
1945
|
+
structSize: number;
|
|
1946
|
+
constructor();
|
|
1947
|
+
}
|
|
1948
|
+
export declare class LowIRBlock {
|
|
1949
|
+
label: string;
|
|
1950
|
+
instrs: Array<LowIRInstr>;
|
|
1951
|
+
termKind: string;
|
|
1952
|
+
termType: string;
|
|
1953
|
+
termValue: string;
|
|
1954
|
+
termTarget: string;
|
|
1955
|
+
termIfTrue: string;
|
|
1956
|
+
termIfFalse: string;
|
|
1957
|
+
constructor();
|
|
1958
|
+
}
|
|
1959
|
+
export declare class LowIRFunction {
|
|
1960
|
+
name: string;
|
|
1961
|
+
exportFn: boolean;
|
|
1962
|
+
isMain: boolean;
|
|
1963
|
+
returnType: string;
|
|
1964
|
+
params: Array<LowIRParam>;
|
|
1965
|
+
blocks: Array<LowIRBlock>;
|
|
1966
|
+
constructor();
|
|
1967
|
+
}
|
|
1968
|
+
export declare class LowIRField {
|
|
1969
|
+
name: string;
|
|
1970
|
+
irType: string;
|
|
1971
|
+
isPtrArray: boolean;
|
|
1972
|
+
isBool: boolean;
|
|
1973
|
+
isString: boolean;
|
|
1974
|
+
isBuffer: boolean;
|
|
1975
|
+
isObject: boolean;
|
|
1976
|
+
constructor();
|
|
1977
|
+
}
|
|
1978
|
+
export declare class LowIRTypeFieldDesc {
|
|
1979
|
+
offset: number;
|
|
1980
|
+
kind: number;
|
|
1981
|
+
owned: number;
|
|
1982
|
+
constructor();
|
|
1983
|
+
}
|
|
1984
|
+
export declare class LowIRTypeDesc {
|
|
1985
|
+
className: string;
|
|
1986
|
+
size: number;
|
|
1987
|
+
fields: Array<LowIRTypeFieldDesc>;
|
|
1988
|
+
constructor();
|
|
1989
|
+
}
|
|
1990
|
+
export declare class LowIRStruct {
|
|
1991
|
+
name: string;
|
|
1992
|
+
fields: Array<LowIRField>;
|
|
1993
|
+
constructor();
|
|
1994
|
+
}
|
|
1995
|
+
export declare class LowIRStringGlobal {
|
|
1996
|
+
name: string;
|
|
1997
|
+
text: string;
|
|
1998
|
+
byteLen: number;
|
|
1999
|
+
withNewline: boolean;
|
|
2000
|
+
constructor();
|
|
2001
|
+
}
|
|
2002
|
+
export declare class LowIRExternDecl {
|
|
2003
|
+
fnName: string;
|
|
2004
|
+
retType: string;
|
|
2005
|
+
paramTypes: Array<string>;
|
|
2006
|
+
isVararg: boolean;
|
|
2007
|
+
declSig: string;
|
|
2008
|
+
constructor();
|
|
2009
|
+
}
|
|
2010
|
+
export declare class LowIRModule {
|
|
2011
|
+
name: string;
|
|
2012
|
+
triple: string;
|
|
2013
|
+
ptrType: string;
|
|
2014
|
+
useLibcHeap: boolean;
|
|
2015
|
+
useFreeListHeap: boolean;
|
|
2016
|
+
structs: Array<LowIRStruct>;
|
|
2017
|
+
typeDescs: Array<LowIRTypeDesc>;
|
|
2018
|
+
functions: Array<LowIRFunction>;
|
|
2019
|
+
stringGlobals: Array<LowIRStringGlobal>;
|
|
2020
|
+
externDecls: Array<LowIRExternDecl>;
|
|
2021
|
+
singletonClasses: Array<string>;
|
|
2022
|
+
lambdaTableFuncs: Array<string>;
|
|
2023
|
+
lambdaSigs: Array<string>;
|
|
2024
|
+
constructor();
|
|
2025
|
+
}
|
|
2026
|
+
export declare class LowIRSession {
|
|
2027
|
+
module: LowIRModule;
|
|
2028
|
+
constructor();
|
|
2029
|
+
beginModule(moduleName: string): void;
|
|
2030
|
+
static current(): LowIRSession;
|
|
2031
|
+
static __singleton_instance: LowIRSession | null;
|
|
2032
|
+
static __singleton(): LowIRSession;
|
|
2033
|
+
}
|
|
2034
|
+
export declare class LowIRBuilder {
|
|
2035
|
+
irModule?: LowIRModule;
|
|
2036
|
+
tempCounter: number;
|
|
2037
|
+
blockCounter: number;
|
|
2038
|
+
blocks: Array<LowIRBlock>;
|
|
2039
|
+
currentBlock?: LowIRBlock;
|
|
2040
|
+
constructor(module: LowIRModule);
|
|
2041
|
+
freshTemp(prefix: string): string;
|
|
2042
|
+
freshLabel(prefix: string): string;
|
|
2043
|
+
reset(): void;
|
|
2044
|
+
startBlock(label: string): string;
|
|
2045
|
+
emit(instr: LowIRInstr): LowIRInstr;
|
|
2046
|
+
emitToEntry(instr: LowIRInstr): LowIRInstr;
|
|
2047
|
+
emitConst(irType: string, value: string): string;
|
|
2048
|
+
emitBin(kind: string, irType: string, lhs: string, rhs: string): string;
|
|
2049
|
+
emitIcmp(pred: string, lhs: string, rhs: string): string;
|
|
2050
|
+
emitIcmpTyped(pred: string, operandType: string, lhs: string, rhs: string): string;
|
|
2051
|
+
emitPtrToInt(ptr: string): string;
|
|
2052
|
+
emitCall(fnName: string, retType: string, args: Array<string>, argTypes: Array<string>): string;
|
|
2053
|
+
emitComment(text: string): void;
|
|
2054
|
+
emitCallWithSig(fnName: string, retType: string, callSig: string, args: Array<string>, argTypes: Array<string>): string;
|
|
2055
|
+
emitAllocaStruct(className: string, slotName: string, fieldCount: number): string;
|
|
2056
|
+
emitGep(className: string, structPtr: string, fieldIndex: number): string;
|
|
2057
|
+
emitAlloca(irType: string, slotName: string): string;
|
|
2058
|
+
emitZeroInitToEntry(irType: string, slotName: string): void;
|
|
2059
|
+
emitLoad(irType: string, slotName: string): string;
|
|
2060
|
+
emitStore(irType: string, value: string, slotName: string): void;
|
|
2061
|
+
emitHeapAlloc(byteCount: string): string;
|
|
2062
|
+
emitIntToI8Ptr(addr: string, addrType: string): string;
|
|
2063
|
+
emitIntToStructPtr(className: string, addr: string): string;
|
|
2064
|
+
emitCast(castOp: string, destType: string, srcType: string, value: string): string;
|
|
2065
|
+
emitZextI1ToI32(v: string): string;
|
|
2066
|
+
emitZextI32ToPtr(v: string): string;
|
|
2067
|
+
emitPtrLoad(ptr: string): string;
|
|
2068
|
+
emitPtrLoadTyped(ptr: string, valueType: string): string;
|
|
2069
|
+
emitPtrStore(ptr: string, value: string): void;
|
|
2070
|
+
emitPtrStoreTyped(ptr: string, value: string, valueType: string): void;
|
|
2071
|
+
emitPtrLoad8(ptr: string): string;
|
|
2072
|
+
emitPtrStore8(ptr: string, value: string): void;
|
|
2073
|
+
emitMemSize(): string;
|
|
2074
|
+
emitMemGrow(pages: string): string;
|
|
2075
|
+
emitGlobalGet(name: string): string;
|
|
2076
|
+
emitGlobalSet(name: string, value: string): void;
|
|
2077
|
+
emitFuncRef(name: string): string;
|
|
2078
|
+
emitCallIndirect(retType: string, callSig: string, args: Array<string>, argTypes: Array<string>, selector: string): string;
|
|
2079
|
+
emitI32At(base: string, byteOff: number): string;
|
|
2080
|
+
emitStoreI32At(base: string, byteOff: number, value: string): void;
|
|
2081
|
+
emitLoadI32At(base: string, byteOff: number): string;
|
|
2082
|
+
emitStrPtr(globalName: string, byteLen: number): string;
|
|
2083
|
+
emitTypeDescPtr(className: string): string;
|
|
2084
|
+
terminateRet(retType: string, value: string): void;
|
|
2085
|
+
terminateBr(target: string): void;
|
|
2086
|
+
terminateBrIf(cond: string, ifTrue: string, ifFalse: string): void;
|
|
2087
|
+
terminateUnreachable(): void;
|
|
2088
|
+
finishFunction(name: string, retType: string, params: Array<LowIRParam>, exportFn: boolean, isMain: boolean): string;
|
|
2089
|
+
}
|
|
2090
|
+
export declare class LowIRRuntimeGen {
|
|
2091
|
+
constructor();
|
|
2092
|
+
static hasFunction(module: LowIRModule, name: string): boolean;
|
|
2093
|
+
static ensureArrayRuntime(module: LowIRModule): void;
|
|
2094
|
+
static ensureMapRuntime(module: LowIRModule): void;
|
|
2095
|
+
static finishFn(builder: LowIRBuilder, module: LowIRModule, name: string, retType: string, params: Array<LowIRParam>, exportFn: boolean): void;
|
|
2096
|
+
static buildRtArraySet(module: LowIRModule): void;
|
|
2097
|
+
static arrayLenOff(module: LowIRModule): number;
|
|
2098
|
+
static arrayCapOff(module: LowIRModule): number;
|
|
2099
|
+
static arrayDescBytes(module: LowIRModule): number;
|
|
2100
|
+
static mapValsOff(module: LowIRModule): number;
|
|
2101
|
+
static mapCapOff(module: LowIRModule): number;
|
|
2102
|
+
static mapSizeOff(module: LowIRModule): number;
|
|
2103
|
+
static mapDescBytes(module: LowIRModule): number;
|
|
2104
|
+
static emitDescLoad(builder: LowIRBuilder, module: LowIRModule, desc: string, byteOff: number): string;
|
|
2105
|
+
static emitKeysPtr(builder: LowIRBuilder, module: LowIRModule, desc: string): string;
|
|
2106
|
+
static emitValsPtr(builder: LowIRBuilder, module: LowIRModule, desc: string): string;
|
|
2107
|
+
static emitCap(builder: LowIRBuilder, module: LowIRModule, desc: string): string;
|
|
2108
|
+
static emitSize(builder: LowIRBuilder, module: LowIRModule, desc: string): string;
|
|
2109
|
+
static emitSlotAddr(builder: LowIRBuilder, module: LowIRModule, base: string, slot: string): string;
|
|
2110
|
+
static emitFreePtr(builder: LowIRBuilder, module: LowIRModule, ptr: string): void;
|
|
2111
|
+
static buildRtMapNew(module: LowIRModule): void;
|
|
2112
|
+
static buildRtMapGrow(module: LowIRModule): void;
|
|
2113
|
+
static buildRtMapFree(module: LowIRModule): void;
|
|
2114
|
+
static buildRtMapHashSlot(module: LowIRModule): void;
|
|
2115
|
+
static buildRtMapPutAt(module: LowIRModule): void;
|
|
2116
|
+
static buildRtMapPut(module: LowIRModule): void;
|
|
2117
|
+
static buildRtMapGetAt(module: LowIRModule): void;
|
|
2118
|
+
static buildRtMapGet(module: LowIRModule): void;
|
|
2119
|
+
static buildRtMapHas(module: LowIRModule): void;
|
|
2120
|
+
static ptrBytes(module: LowIRModule): number;
|
|
2121
|
+
static descMetaOff(module: LowIRModule): number;
|
|
2122
|
+
static ensurePtrArrayRuntime(module: LowIRModule): void;
|
|
2123
|
+
static buildRtPtrArrayNew(module: LowIRModule): void;
|
|
2124
|
+
static buildRtPtrArrayLen(module: LowIRModule): void;
|
|
2125
|
+
static buildRtPtrArrayGet(module: LowIRModule): void;
|
|
2126
|
+
static buildRtPtrArraySet(module: LowIRModule): void;
|
|
2127
|
+
static buildRtPtrArrayPush(module: LowIRModule): void;
|
|
2128
|
+
}
|
|
2129
|
+
export declare class LowIRTarget {
|
|
2130
|
+
arch: string;
|
|
2131
|
+
env: string;
|
|
2132
|
+
triple: string;
|
|
2133
|
+
ptrType: string;
|
|
2134
|
+
usesLibc: boolean;
|
|
2135
|
+
ioFn: string;
|
|
2136
|
+
ioFnRet: string;
|
|
2137
|
+
ioFnVararg: boolean;
|
|
2138
|
+
constructor();
|
|
2139
|
+
memoryModel(): string;
|
|
2140
|
+
isManualMemory(): boolean;
|
|
2141
|
+
static resolve(ctx: RangerAppWriterContext): LowIRTarget;
|
|
2142
|
+
static applyName(t: LowIRTarget, name: string): void;
|
|
2143
|
+
static applyExplicitTriple(t: LowIRTarget, triple: string): void;
|
|
2144
|
+
static applyNameKnown(t: LowIRTarget, name: string): void;
|
|
2145
|
+
}
|
|
2146
|
+
export declare class LowIRLowerContext {
|
|
2147
|
+
ctx?: RangerAppWriterContext;
|
|
2148
|
+
builder?: LowIRBuilder;
|
|
2149
|
+
target?: LowIRTarget;
|
|
2150
|
+
ptrType: string;
|
|
2151
|
+
slots: {
|
|
2152
|
+
[key: string]: string;
|
|
2153
|
+
};
|
|
2154
|
+
slotTypes: {
|
|
2155
|
+
[key: string]: string;
|
|
2156
|
+
};
|
|
2157
|
+
objectSlots: {
|
|
2158
|
+
[key: string]: string;
|
|
2159
|
+
};
|
|
2160
|
+
collectionSlots: {
|
|
2161
|
+
[key: string]: string;
|
|
2162
|
+
};
|
|
2163
|
+
ptrArrayElemTypes: {
|
|
2164
|
+
[key: string]: string;
|
|
2165
|
+
};
|
|
2166
|
+
ownedObjectLocals: Array<string>;
|
|
2167
|
+
ownedCollectionLocals: Array<string>;
|
|
2168
|
+
ownedStringLocals: Array<string>;
|
|
2169
|
+
pendingStringTemps: Array<string>;
|
|
2170
|
+
pendingObjectTemps: Array<string>;
|
|
2171
|
+
boxedCandidates: {
|
|
2172
|
+
[key: string]: number;
|
|
2173
|
+
};
|
|
2174
|
+
boxedLocals: {
|
|
2175
|
+
[key: string]: number;
|
|
2176
|
+
};
|
|
2177
|
+
escapedLocals: {
|
|
2178
|
+
[key: string]: string;
|
|
2179
|
+
};
|
|
2180
|
+
currentRetType: string;
|
|
2181
|
+
llvmRetType: string;
|
|
2182
|
+
className: string;
|
|
2183
|
+
selfPtr: string;
|
|
2184
|
+
constructor();
|
|
2185
|
+
}
|
|
2186
|
+
export declare class LambdaCaptureInfo {
|
|
2187
|
+
names: Array<string>;
|
|
2188
|
+
irTypes: Array<string>;
|
|
2189
|
+
kinds: Array<number>;
|
|
2190
|
+
objClasses: Array<string>;
|
|
2191
|
+
offsets: Array<number>;
|
|
2192
|
+
totalBytes: number;
|
|
2193
|
+
hasOwned: boolean;
|
|
2194
|
+
tdName: string;
|
|
2195
|
+
constructor();
|
|
2196
|
+
}
|
|
2197
|
+
export declare class LowIRBuilderPass {
|
|
2198
|
+
irModule: LowIRModule;
|
|
2199
|
+
usedMapRuntime: boolean;
|
|
2200
|
+
usedArrayRuntime: boolean;
|
|
2201
|
+
usedPtrArrayRuntime: boolean;
|
|
2202
|
+
usedMemRuntime: boolean;
|
|
2203
|
+
lambdaSigMap: {
|
|
2204
|
+
[key: string]: string;
|
|
2205
|
+
};
|
|
2206
|
+
lambdaByName: {
|
|
2207
|
+
[key: string]: RangerAppFunctionDesc;
|
|
2208
|
+
};
|
|
2209
|
+
lambdaNames: Array<string>;
|
|
2210
|
+
lambdaCounter: number;
|
|
2211
|
+
lambdaCaptures: {
|
|
2212
|
+
[key: string]: LambdaCaptureInfo;
|
|
2213
|
+
};
|
|
2214
|
+
constructor();
|
|
2215
|
+
isLambdaTypeNode(node: CodeNode): boolean;
|
|
2216
|
+
canLowerFunction(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
2217
|
+
canLowerMethod(fnDesc: RangerAppFunctionDesc): boolean;
|
|
2218
|
+
canLowerInstanceMethod(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
2219
|
+
isMainEntry(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
2220
|
+
shouldExport(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
2221
|
+
lowerModule(appCtx: RangerAppWriterContext): LowIRModule;
|
|
2222
|
+
ensureExternDecl(fnName: string, retType: string, paramTypes: Array<string>, isVararg: boolean): void;
|
|
2223
|
+
ensureLibcExtern(target: LowIRTarget): void;
|
|
2224
|
+
ensureBufferExtern(target: LowIRTarget): void;
|
|
2225
|
+
ensureMemExtern(target: LowIRTarget): void;
|
|
2226
|
+
memEnabled(lctx: LowIRLowerContext): boolean;
|
|
2227
|
+
objRcEnabled(lctx: LowIRLowerContext): boolean;
|
|
2228
|
+
wasmStrEnabled(lctx: LowIRLowerContext): boolean;
|
|
2229
|
+
isLowerableParamType(typeName: string): boolean;
|
|
2230
|
+
llvmTypeForRanger(typeName: string, ptrType: string): string;
|
|
2231
|
+
varTypeName(nameNode: CodeNode): string;
|
|
2232
|
+
exprIsObjectPtr(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2233
|
+
isObjectTypeName(typeName: string): boolean;
|
|
2234
|
+
exprIsString(node: CodeNode): boolean;
|
|
2235
|
+
exprMightBeString(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2236
|
+
lowerConcatOperand(node: CodeNode, isStr: boolean, lctx: LowIRLowerContext): string;
|
|
2237
|
+
emitStrdupExpr(strPtr: string, lctx: LowIRLowerContext): string;
|
|
2238
|
+
lowerStringConcat(aNode: CodeNode, bNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2239
|
+
hasExternDecl(fnName: string): boolean;
|
|
2240
|
+
internStringGlobal(text: string, withNewline: boolean): string;
|
|
2241
|
+
utf8ByteLen(text: string): number;
|
|
2242
|
+
stringGlobalByteLen(gname: string): number;
|
|
2243
|
+
printTextFromNode(node: CodeNode): string;
|
|
2244
|
+
emitIoString(text: string, withNewline: boolean, lctx: LowIRLowerContext): void;
|
|
2245
|
+
emitPrintfFmt(fmt: string, args: Array<string>, argTypes: Array<string>, lctx: LowIRLowerContext): void;
|
|
2246
|
+
lowerPrint(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2247
|
+
lowerWrite(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2248
|
+
lowerExit(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2249
|
+
lowerSleepMs(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2250
|
+
lowerTerminalEsc(text: string, lctx: LowIRLowerContext): void;
|
|
2251
|
+
emitTermVoidCall(fnName: string, lctx: LowIRLowerContext): void;
|
|
2252
|
+
lowerClearScreen(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2253
|
+
lowerHideCursor(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2254
|
+
lowerShowCursor(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2255
|
+
lowerMoveCursor(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2256
|
+
forIndexName(idxNode: CodeNode): string;
|
|
2257
|
+
resolveItemClass(itemNode: CodeNode): string;
|
|
2258
|
+
lowerPollKeypress(lctx: LowIRLowerContext): string;
|
|
2259
|
+
lowerOnKeypress(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2260
|
+
lowerShellArgCnt(lctx: LowIRLowerContext): string;
|
|
2261
|
+
lowerShellArg(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2262
|
+
lowerReadFile(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2263
|
+
lowerBufferAlloc(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2264
|
+
lowerBufferLength(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2265
|
+
lowerBufferGet(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2266
|
+
lowerBufferSet(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2267
|
+
lowerBufferReadFile(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2268
|
+
lowerBufferWriteFile(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2269
|
+
lowerIntBufferAlloc(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2270
|
+
lowerIntBufferGet(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2271
|
+
lowerIntBufferSet(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2272
|
+
exprIsF64(node: CodeNode): boolean;
|
|
2273
|
+
promoteToF64(node: CodeNode, val: string, lctx: LowIRLowerContext): string;
|
|
2274
|
+
lowerToDouble(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2275
|
+
lowerToInt(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2276
|
+
lowerStr2Double(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2277
|
+
lowerStr2Int(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2278
|
+
lowerIntBufferFill(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2279
|
+
lowerCharAt(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2280
|
+
lowerSubstring(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2281
|
+
lowerAtArgs(textNode: CodeNode, posNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2282
|
+
lowerAt(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2283
|
+
lowerAtCall(argsNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2284
|
+
lowerPtrIsNull(ptr: string, lctx: LowIRLowerContext): string;
|
|
2285
|
+
lowerPtrIsNotNull(ptr: string, lctx: LowIRLowerContext): string;
|
|
2286
|
+
loadArrayDescExpr(arrNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2287
|
+
pushItemNeedsWiden(itemNode: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2288
|
+
arrayElemTypeName(arrNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2289
|
+
lowerPush(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2290
|
+
lowerFor(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2291
|
+
emitStrcmpEq(lhs: string, rhs: string, ctx: LowIRLowerContext): string;
|
|
2292
|
+
lowerToString(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2293
|
+
lowerStrFromCode(node: CodeNode, fnName: string, lctx: LowIRLowerContext): string;
|
|
2294
|
+
lowerStrlen(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2295
|
+
isIntArrayTypeNode(node: CodeNode): boolean;
|
|
2296
|
+
isIntIntMapTypeNode(node: CodeNode): boolean;
|
|
2297
|
+
isObjectPtrArrayTypeNode(node: CodeNode): boolean;
|
|
2298
|
+
isStringArrayTypeNode(node: CodeNode): boolean;
|
|
2299
|
+
emitPtrArrayNewEmpty(lctx: LowIRLowerContext, elemKind: number): string;
|
|
2300
|
+
bindPtrArraySlot(varName: string, desc: string, lctx: LowIRLowerContext, owned: boolean): void;
|
|
2301
|
+
wasmCollectionRcEnabled(lctx: LowIRLowerContext): boolean;
|
|
2302
|
+
collectionKind(varName: string, lctx: LowIRLowerContext): string;
|
|
2303
|
+
arrayLenOff(lctx: LowIRLowerContext): number;
|
|
2304
|
+
arrayCapOff(lctx: LowIRLowerContext): number;
|
|
2305
|
+
arrayDescBytes(lctx: LowIRLowerContext): number;
|
|
2306
|
+
ptrArrayOwnedOff(lctx: LowIRLowerContext): number;
|
|
2307
|
+
bindCollectionSlot(varName: string, kind: string, desc: string, lctx: LowIRLowerContext): void;
|
|
2308
|
+
loadCollectionDesc(varName: string, lctx: LowIRLowerContext): string;
|
|
2309
|
+
emitDescLoad(desc: string, byteOff: number, lctx: LowIRLowerContext): string;
|
|
2310
|
+
emitRtArrayNewEmpty(lctx: LowIRLowerContext): string;
|
|
2311
|
+
emitRtArrayNewSized(cap: string, lctx: LowIRLowerContext): string;
|
|
2312
|
+
emitRtArrayGet(desc: string, idx: string, lctx: LowIRLowerContext): string;
|
|
2313
|
+
emitRtArraySet(desc: string, idx: string, val: string, lctx: LowIRLowerContext): void;
|
|
2314
|
+
emitRtArrayLen(desc: string, lctx: LowIRLowerContext): string;
|
|
2315
|
+
emitRtMapNew(cap: string, lctx: LowIRLowerContext): string;
|
|
2316
|
+
emitRtMapPut(desc: string, key: string, val: string, lctx: LowIRLowerContext): void;
|
|
2317
|
+
emitRtMapGet(desc: string, key: string, lctx: LowIRLowerContext): string;
|
|
2318
|
+
emitRtMapHas(desc: string, key: string, lctx: LowIRLowerContext): string;
|
|
2319
|
+
lowerCollectionMake(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2320
|
+
lowerCollectionGet(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2321
|
+
lowerCollectionLen(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2322
|
+
lowerCollectionHas(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2323
|
+
lowerCollectionSet(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2324
|
+
lowerStruct(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): void;
|
|
2325
|
+
lowerTypeDesc(st: LowIRStruct, target: LowIRTarget): void;
|
|
2326
|
+
fieldByteOffset(className: string, fieldIndex: number, module: LowIRModule): number;
|
|
2327
|
+
bindSlot(varName: string, irType: string, value: string, lctx: LowIRLowerContext): void;
|
|
2328
|
+
loadSlot(varName: string, irType: string, lctx: LowIRLowerContext): string;
|
|
2329
|
+
fieldIrTypeFor(className: string, fieldName: string): string;
|
|
2330
|
+
fieldIsPtrArraySlot(className: string, fieldName: string): boolean;
|
|
2331
|
+
fieldIsObjectSlot(className: string, fieldName: string): boolean;
|
|
2332
|
+
fieldIsStringSlot(className: string, fieldName: string): boolean;
|
|
2333
|
+
fieldIsBufferSlot(className: string, fieldName: string): boolean;
|
|
2334
|
+
fieldIsBoolSlot(className: string, fieldName: string): boolean;
|
|
2335
|
+
ptrArrayDescFromVref(vref: string, lctx: LowIRLowerContext): string;
|
|
2336
|
+
loadPtrArrayDescExpr(arrNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2337
|
+
emitPtrArrayLen(desc: string, lctx: LowIRLowerContext): string;
|
|
2338
|
+
fieldArrayElemType(className: string, fieldName: string, lctx: LowIRLowerContext): string;
|
|
2339
|
+
ptrArrayElemIsInt(arrNode: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2340
|
+
lowerItemAt(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2341
|
+
emitPtrArrayElemGet(desc: string, idx: string, arrNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2342
|
+
emitPtrArrayElemSet(desc: string, idx: string, val: string, arrNode: CodeNode, lctx: LowIRLowerContext): void;
|
|
2343
|
+
emitFieldLoadOn(className: string, structPtr: string, fieldName: string, lctx: LowIRLowerContext): string;
|
|
2344
|
+
emitReleaseFieldValue(className: string, fieldName: string, rawVal: string, lctx: LowIRLowerContext): void;
|
|
2345
|
+
emitFieldStoreOn(className: string, structPtr: string, fieldName: string, value: string, lctx: LowIRLowerContext): void;
|
|
2346
|
+
emitFieldStoreOnEx(className: string, structPtr: string, fieldName: string, value: string, srcIsFresh: boolean, lctx: LowIRLowerContext): void;
|
|
2347
|
+
emitObjRetainPtr(ptr: string, lctx: LowIRLowerContext): void;
|
|
2348
|
+
emitObjReleasePtr(ptr: string, lctx: LowIRLowerContext): void;
|
|
2349
|
+
emitFieldLoad(fieldName: string, lctx: LowIRLowerContext): string;
|
|
2350
|
+
emitFieldStore(fieldName: string, value: string, lctx: LowIRLowerContext): void;
|
|
2351
|
+
fieldObjectClassName(className: string, fieldName: string, lctx: LowIRLowerContext): string;
|
|
2352
|
+
resolveObjectPtr(varName: string, className: string, lctx: LowIRLowerContext): string;
|
|
2353
|
+
joinDotPrefix(parts: Array<string>, count: number): string;
|
|
2354
|
+
resolveObjectClassChain(varName: string, lctx: LowIRLowerContext): string;
|
|
2355
|
+
resolveObjectPtrChain(varName: string, className: string, lctx: LowIRLowerContext): string;
|
|
2356
|
+
resolveObjectClass(varName: string, lctx: LowIRLowerContext): string;
|
|
2357
|
+
resolveFieldPtrExpr(vref: string, lctx: LowIRLowerContext): string;
|
|
2358
|
+
isObjectArrayField(v: RangerAppParamDesc): boolean;
|
|
2359
|
+
newTargetClassName(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2360
|
+
emitFieldDefault(className: string, objPtr: string, fieldName: string, valNode: CodeNode, lctx: LowIRLowerContext): void;
|
|
2361
|
+
initFieldDefaultsInObject(className: string, objPtr: string, lctx: LowIRLowerContext): void;
|
|
2362
|
+
initFieldDefaultsInConstructor(className: string, lctx: LowIRLowerContext): void;
|
|
2363
|
+
initArrayFieldsInObject(className: string, objPtr: string, lctx: LowIRLowerContext): void;
|
|
2364
|
+
initArrayFieldsInConstructor(className: string, lctx: LowIRLowerContext): void;
|
|
2365
|
+
structByteSize(className: string, module: LowIRModule): number;
|
|
2366
|
+
classHasOwnedFields(className: string): boolean;
|
|
2367
|
+
lowerNewObject(className: string, argsNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2368
|
+
findFieldIndex(className: string, fieldName: string, module: LowIRModule): number;
|
|
2369
|
+
isClassField(fieldName: string, className: string, module: LowIRModule): boolean;
|
|
2370
|
+
structFieldCount(className: string, module: LowIRModule): number;
|
|
2371
|
+
lowerFunction(fnDesc: RangerAppFunctionDesc, className: string, appCtx: RangerAppWriterContext, exportFn: boolean, isMain: boolean, isInstance: boolean): void;
|
|
2372
|
+
lowerSingletonAccessor(cl: RangerAppClassDesc, appCtx: RangerAppWriterContext): void;
|
|
2373
|
+
collectLambdas(appCtx: RangerAppWriterContext): void;
|
|
2374
|
+
collectMethodLambdas(m: RangerAppFunctionDesc, pt: string): void;
|
|
2375
|
+
lambdaCallSig(lam: RangerAppFunctionDesc, pt: string): string;
|
|
2376
|
+
addLambdaSig(sig: string): void;
|
|
2377
|
+
lowerLambdaBodies(appCtx: RangerAppWriterContext): void;
|
|
2378
|
+
lowerLambdaFunction(lam: RangerAppFunctionDesc, fnName: string, appCtx: RangerAppWriterContext): void;
|
|
2379
|
+
lambdaTableIndex(name: string): number;
|
|
2380
|
+
nodeAssignsToName(node: CodeNode, name: string): boolean;
|
|
2381
|
+
computeBoxedCandidates(fnDesc: RangerAppFunctionDesc, lctx: LowIRLowerContext): void;
|
|
2382
|
+
collectBoxedCandidates(m: RangerAppFunctionDesc, lctx: LowIRLowerContext): void;
|
|
2383
|
+
computeLambdaCaptures(node: CodeNode, lam: RangerAppFunctionDesc, lctx: LowIRLowerContext): LambdaCaptureInfo;
|
|
2384
|
+
lowerLambdaValue(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2385
|
+
lowerLambdaCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2386
|
+
isOwnedObjectLocal(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2387
|
+
releaseOwnedLocal(varName: string, lctx: LowIRLowerContext): void;
|
|
2388
|
+
isOwnedStringLocal(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2389
|
+
registerFreshStringTemp(tmp: string, lctx: LowIRLowerContext): void;
|
|
2390
|
+
claimStringTemp(tmp: string, lctx: LowIRLowerContext): void;
|
|
2391
|
+
flushStringTempsFrom(mark: number, lctx: LowIRLowerContext): void;
|
|
2392
|
+
registerFreshObjectTemp(tmp: string, lctx: LowIRLowerContext): void;
|
|
2393
|
+
claimObjectTemp(tmp: string, lctx: LowIRLowerContext): void;
|
|
2394
|
+
flushObjectTempsFrom(mark: number, lctx: LowIRLowerContext): void;
|
|
2395
|
+
emitStrReleasePtr(ptr: string, lctx: LowIRLowerContext): void;
|
|
2396
|
+
releaseOwnedString(varName: string, lctx: LowIRLowerContext): void;
|
|
2397
|
+
releaseOwnedCollectionLocal(varName: string, lctx: LowIRLowerContext): void;
|
|
2398
|
+
emitOwnedStringInit(varName: string, valNode: CodeNode, strPtr: string, lctx: LowIRLowerContext): string;
|
|
2399
|
+
emitOwnedStringReassign(varName: string, valNode: CodeNode, strPtr: string, lctx: LowIRLowerContext): string;
|
|
2400
|
+
strictOwnershipEnabled(lctx: LowIRLowerContext): boolean;
|
|
2401
|
+
emitOwnershipSummary(lctx: LowIRLowerContext): void;
|
|
2402
|
+
emitReleaseOwnedLocals(lctx: LowIRLowerContext): void;
|
|
2403
|
+
lowerBlock(block: CodeNode, lctx: LowIRLowerContext): void;
|
|
2404
|
+
isAssignNode(node: CodeNode): boolean;
|
|
2405
|
+
lowerStmt(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2406
|
+
lowerStmtDispatch(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2407
|
+
lowerVarDef(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2408
|
+
assignTargetFieldClass(varName: string, lctx: LowIRLowerContext): string;
|
|
2409
|
+
lowerAssign(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2410
|
+
lowerReturn(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2411
|
+
isCompareOp(op: string): boolean;
|
|
2412
|
+
unwrapInfixExpr(node: CodeNode): CodeNode;
|
|
2413
|
+
unwrapCondExpr(node: CodeNode): CodeNode;
|
|
2414
|
+
exprProducesI1(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2415
|
+
condVref(node: CodeNode): string;
|
|
2416
|
+
lowerCond(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2417
|
+
lowerIf(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2418
|
+
lowerWhile(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2419
|
+
releaseLoopBodyOwned(ownedBefore: number, ownedStrBefore: number, ownedCollBefore: number, lctx: LowIRLowerContext): void;
|
|
2420
|
+
lowerExpr(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2421
|
+
operatorReturnsString(op: string): boolean;
|
|
2422
|
+
exprIsFreshString(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2423
|
+
exprIsStringish(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2424
|
+
lowerStringCompare(aNode: CodeNode, bNode: CodeNode, pred: string, lctx: LowIRLowerContext): string;
|
|
2425
|
+
lowerCompareI32(aNode: CodeNode, bNode: CodeNode, pred: string, lctx: LowIRLowerContext): string;
|
|
2426
|
+
lowerArithF64OrI32(intKind: string, fpKind: string, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2427
|
+
lowerBinaryOp(opName: string, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2428
|
+
tryLowerIntrinsic(fnName: string, argsNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2429
|
+
finishObjectCall(rv: string): string;
|
|
2430
|
+
lowerCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2431
|
+
tryLowerObjectCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2432
|
+
fieldReceiverClass(recvName: string, lctx: LowIRLowerContext): string;
|
|
2433
|
+
callArgsNode(node: CodeNode): CodeNode;
|
|
2434
|
+
resolveMethodName(node: CodeNode, defaultName: string): string;
|
|
2435
|
+
argIrType(arg: CodeNode, lctx: LowIRLowerContext): string;
|
|
2436
|
+
paramIrTypeFromDesc(paramIndex: number, fnDesc: RangerAppFunctionDesc, lctx: LowIRLowerContext): string;
|
|
2437
|
+
lowerInstanceCallOn(node: CodeNode, receiverName: string, recvNode: CodeNode, methodName: string, lctx: LowIRLowerContext): string;
|
|
2438
|
+
lowerInstanceCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2439
|
+
resolveCalleeName(callee: CodeNode): string;
|
|
2440
|
+
}
|
|
2441
|
+
export declare class LLVMIRWriter {
|
|
2442
|
+
varargNames: Array<string>;
|
|
2443
|
+
varargSigs: Array<string>;
|
|
2444
|
+
constructor();
|
|
2445
|
+
collectVarargFns(module: LowIRModule): void;
|
|
2446
|
+
varargSigFor(fnName: string): string;
|
|
2447
|
+
llTy(t: string): string;
|
|
2448
|
+
normalizeDoubleLit(lit: string): string;
|
|
2449
|
+
hexDigit(d: number): string;
|
|
2450
|
+
hexByte(b: number): string;
|
|
2451
|
+
llvmEscapeCString(text: string): string;
|
|
2452
|
+
writeModule(module: LowIRModule, wr: CodeWriter): void;
|
|
2453
|
+
writeTypeDescs(module: LowIRModule, wr: CodeWriter): void;
|
|
2454
|
+
writeOneTypeDesc(td: LowIRTypeDesc, wr: CodeWriter): void;
|
|
2455
|
+
writeStruct(st: LowIRStruct, wr: CodeWriter): void;
|
|
2456
|
+
writeFunction(fn: LowIRFunction, wr: CodeWriter): void;
|
|
2457
|
+
writeInstr(ins: LowIRInstr, wr: CodeWriter): void;
|
|
2458
|
+
writeTerminator(bb: LowIRBlock, wr: CodeWriter): void;
|
|
2459
|
+
}
|
|
2460
|
+
export declare class WATWriter {
|
|
2461
|
+
strAddrs: {
|
|
2462
|
+
[key: string]: number;
|
|
2463
|
+
};
|
|
2464
|
+
typeDescAddrs: {
|
|
2465
|
+
[key: string]: number;
|
|
2466
|
+
};
|
|
2467
|
+
lambdaFuncs: Array<string>;
|
|
2468
|
+
constructor();
|
|
2469
|
+
lambdaFuncIndex(name: string): number;
|
|
2470
|
+
sigTypeName(callSig: string): string;
|
|
2471
|
+
sigTypeDecl(callSig: string): string;
|
|
2472
|
+
utf8Encode(text: string): Array<number>;
|
|
2473
|
+
hexDigit(d: number): string;
|
|
2474
|
+
hexByte(b: number): string;
|
|
2475
|
+
dataEscape(bytes: Array<number>): string;
|
|
2476
|
+
leWord(v: number): string;
|
|
2477
|
+
align4(a: number): number;
|
|
2478
|
+
fieldOwnedFlag(fd: LowIRTypeFieldDesc): number;
|
|
2479
|
+
descHasOwned(td: LowIRTypeDesc): boolean;
|
|
2480
|
+
moduleHasOwnedTypeDescs(module: LowIRModule): boolean;
|
|
2481
|
+
emitStaticData(module: LowIRModule, wr: CodeWriter): void;
|
|
2482
|
+
wasmName(llvmName: string): string;
|
|
2483
|
+
isGepTemp(name: string): boolean;
|
|
2484
|
+
moduleUsesHeap(module: LowIRModule): boolean;
|
|
2485
|
+
watType(irType: string): string;
|
|
2486
|
+
localTypeMap(fn: LowIRFunction): {
|
|
2487
|
+
[key: string]: string;
|
|
2488
|
+
};
|
|
2489
|
+
localTypeOf(m: {
|
|
2490
|
+
[key: string]: string;
|
|
2491
|
+
}, wn: string): string;
|
|
2492
|
+
writeModule(module: LowIRModule, wr: CodeWriter): void;
|
|
2493
|
+
findBlockIdx(fn: LowIRFunction, label: string): number;
|
|
2494
|
+
isWhileHeader(fn: LowIRFunction, condIdx: number): boolean;
|
|
2495
|
+
collectLocals(fn: LowIRFunction): Array<string>;
|
|
2496
|
+
writeBlockInstrs(bb: LowIRBlock, wr: CodeWriter): void;
|
|
2497
|
+
writeFunction(fn: LowIRFunction, wr: CodeWriter, doExport: boolean): void;
|
|
2498
|
+
markVisited(label: string, visited: {
|
|
2499
|
+
[key: string]: boolean;
|
|
2500
|
+
}): void;
|
|
2501
|
+
isVisited(label: string, visited: {
|
|
2502
|
+
[key: string]: boolean;
|
|
2503
|
+
}): boolean;
|
|
2504
|
+
emitRegion(fn: LowIRFunction, startIdx: number, boundIdx: number, wr: CodeWriter, visited: {
|
|
2505
|
+
[key: string]: boolean;
|
|
2506
|
+
}): string;
|
|
2507
|
+
emitIf(fn: LowIRFunction, headerIdx: number, wr: CodeWriter, visited: {
|
|
2508
|
+
[key: string]: boolean;
|
|
2509
|
+
}): string;
|
|
2510
|
+
emitWhile(fn: LowIRFunction, condIdx: number, wr: CodeWriter, visited: {
|
|
2511
|
+
[key: string]: boolean;
|
|
2512
|
+
}): string;
|
|
2513
|
+
writeGet(llvmRef: string, wr: CodeWriter): void;
|
|
2514
|
+
writeInstr(ins: LowIRInstr, wr: CodeWriter): void;
|
|
2515
|
+
}
|
|
2516
|
+
export declare class RangerLLVMPipeline {
|
|
2517
|
+
constructor();
|
|
2518
|
+
generateModule(appCtx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2519
|
+
}
|
|
2520
|
+
export declare class RangerLLVMClassWriter extends RangerGenericClassWriter {
|
|
2521
|
+
compiler?: LiveCompiler;
|
|
2522
|
+
constructor();
|
|
2523
|
+
writeClass(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2524
|
+
}
|
|
1706
2525
|
export declare class OpList {
|
|
1707
2526
|
list: Array<CodeNode>;
|
|
1708
2527
|
constructor();
|
|
@@ -1732,6 +2551,7 @@ export declare class LiveCompiler {
|
|
|
1732
2551
|
[key: string]: boolean;
|
|
1733
2552
|
};
|
|
1734
2553
|
constructor();
|
|
2554
|
+
treeReferencesVRef(node: CodeNode, name: string): boolean;
|
|
1735
2555
|
initWriter(ctx: RangerAppWriterContext): void;
|
|
1736
2556
|
EncodeString(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): string;
|
|
1737
2557
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
@@ -1746,13 +2566,14 @@ export declare class LiveCompiler {
|
|
|
1746
2566
|
createPolyfillLegacy(code: string, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1747
2567
|
installFile(filename: string, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1748
2568
|
findOpCode(op: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1749
|
-
findOpTemplate(op: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<CodeNode
|
|
2569
|
+
findOpTemplate(op: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<CodeNode> | undefined;
|
|
1750
2570
|
localCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2571
|
+
finishWalkNode(wr: CodeWriter): void;
|
|
1751
2572
|
WalkNode(node: CodeNode, in_ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1752
2573
|
walkCommandList(cmd: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1753
2574
|
walkCommand(cmd: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1754
2575
|
compile(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1755
|
-
findParamDesc(obj: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): RangerAppParamDesc;
|
|
2576
|
+
findParamDesc(obj: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): RangerAppParamDesc | undefined;
|
|
1756
2577
|
}
|
|
1757
2578
|
export declare class ColorConsole {
|
|
1758
2579
|
constructor();
|
|
@@ -1852,6 +2673,7 @@ export declare class StaticAnalyzer {
|
|
|
1852
2673
|
analyzeClass(cl: RangerAppClassDesc): void;
|
|
1853
2674
|
analyzeTransitiveWeak(fn: RangerAppFunctionDesc): void;
|
|
1854
2675
|
analyzeClassTransitiveWeak(cl: RangerAppClassDesc): void;
|
|
2676
|
+
propagateArgMutRef(calledParam: RangerAppParamDesc, arg: CodeNode, fnCtx: RangerAppWriterContext, changedParams: Array<string>): void;
|
|
1855
2677
|
walkForTransitiveMutBorrow(node: CodeNode, fnCtx: RangerAppWriterContext, fn: RangerAppFunctionDesc, changedParams: Array<string>): void;
|
|
1856
2678
|
analyzeTransitiveMutBorrow(fn: RangerAppFunctionDesc, changedParams: Array<string>): void;
|
|
1857
2679
|
analyzeClassTransitiveMutBorrow(cl: RangerAppClassDesc, changedParams: Array<string>): void;
|
|
@@ -1864,6 +2686,18 @@ export declare class StaticAnalyzer {
|
|
|
1864
2686
|
analyzeParamMethodCalls(node: CodeNode, fnCtx: RangerAppWriterContext, fn: RangerAppFunctionDesc): void;
|
|
1865
2687
|
analyzeMethodParamMutations(fn: RangerAppFunctionDesc): void;
|
|
1866
2688
|
analyzeClassParamMutations(cl: RangerAppClassDesc): void;
|
|
2689
|
+
ownershipKindName(kind: number): string;
|
|
2690
|
+
ownerPathOf(node: CodeNode): string;
|
|
2691
|
+
targetOutlivesScope(target: CodeNode, fnCtx: RangerAppWriterContext): boolean;
|
|
2692
|
+
isPrimitiveTypeName(name: string): boolean;
|
|
2693
|
+
isHeapOwnedParam(p: RangerAppParamDesc): boolean;
|
|
2694
|
+
recordEscape(valueName: string, ownerPath: string, via: string, fnCtx: RangerAppWriterContext): void;
|
|
2695
|
+
walkForEscapes(node: CodeNode, fnCtx: RangerAppWriterContext): void;
|
|
2696
|
+
ownerSuffix(param: RangerAppParamDesc): string;
|
|
2697
|
+
finalizeOwnership(fn: RangerAppFunctionDesc, strict: boolean): void;
|
|
2698
|
+
analyzeOwnership(fn: RangerAppFunctionDesc, strict: boolean): void;
|
|
2699
|
+
analyzeOwnershipClass(cl: RangerAppClassDesc, strict: boolean): void;
|
|
2700
|
+
analyzeOwnershipAll(strict: boolean): void;
|
|
1867
2701
|
analyzeAll(): void;
|
|
1868
2702
|
}
|
|
1869
2703
|
export declare class viewbuilder_Android {
|