ranger-compiler 3.2.0 → 3.4.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 +2482 -0
- package/LICENSE +28 -0
- package/LICENSE-MIT +21 -0
- package/README.md +1650 -1895
- package/dist/Lang.rgr +10946 -5852
- package/dist/README.md +3 -2
- package/dist/api.d.ts +1157 -29
- package/dist/api.js +66623 -38073
- package/dist/lib/ACEEditor.rgr +2 -0
- package/dist/lib/Ajax.rgr +2 -0
- package/dist/lib/CmdParams.rgr +2 -0
- package/dist/lib/Crypto.rgr +2 -0
- package/dist/lib/DOMLib.rgr +2 -0
- package/dist/lib/Engine3D.rgr +2 -0
- package/dist/lib/ImmutableVector.rgr +2 -0
- package/dist/lib/IndexedDB.rgr +2 -0
- package/dist/lib/IsoDate/DateMath.rgr +2 -0
- package/dist/lib/IsoDate/IsoCalendar.rgr +2 -0
- package/dist/lib/IsoDate/IsoDateParse.rgr +2 -0
- package/dist/lib/IsoDateLib.rgr +2 -0
- package/dist/lib/JSON.rgr +4906 -48
- package/dist/lib/JinxProcess.rgr +2 -0
- package/dist/lib/RangerProcess.rgr +2 -0
- package/dist/lib/Regex/RegexMatch.rgr +2 -0
- package/dist/lib/RegexLib.rgr +2 -0
- package/dist/lib/SQL.rgr +2 -0
- package/dist/lib/ServiceLib.rgr +2 -0
- package/dist/lib/Shell.rgr +326 -0
- package/dist/lib/Storage.rgr +2 -0
- package/dist/lib/Time.rgr +2 -0
- package/dist/lib/Timers.rgr +2 -0
- package/dist/lib/TypedArrays.rgr +2 -0
- package/dist/lib/ViewLib.rgr +2 -0
- package/dist/lib/WebLib.rgr +2 -0
- package/dist/lib/WebServerLib.rgr +2 -0
- package/dist/lib/apple/AppleAppBuilder.rgr +572 -0
- package/dist/lib/apple/AppleAppSpec.rgr +201 -0
- package/dist/lib/apple/AppleDevice.rgr +295 -0
- package/dist/lib/apple/AppleDeviceDoctor.rgr +453 -0
- package/dist/lib/apple/AppleSigning.rgr +379 -0
- package/dist/lib/apple/AppleSimulator.rgr +248 -0
- package/dist/lib/apple/AppleTarget.rgr +185 -0
- package/dist/lib/apple/AppleToolchain.rgr +458 -0
- package/dist/lib/apple/README.md +311 -0
- package/dist/lib/apple/apple_test.rgr +669 -0
- package/dist/lib/core/README.md +251 -0
- package/dist/lib/core/RgBase.rgr +313 -0
- package/dist/lib/core/RgNum.rgr +653 -0
- package/dist/lib/core/RgText.rgr +680 -0
- package/dist/lib/core/RgU32.rgr +309 -0
- package/dist/lib/ranger-dir.rgr +2 -0
- package/dist/lib/shell_test.rgr +193 -0
- package/dist/lib/stdlib.rgr +1176 -665
- package/dist/lib/stdops.rgr +2 -0
- package/dist/package.json +1 -1
- package/dist/rgrc.js +72955 -40753
- package/dist/stdops.rgr +2 -0
- package/package.json +1121 -339
package/dist/api.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
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
1
|
export declare class CmdParams {
|
|
3
2
|
flags: {
|
|
4
3
|
[key: string]: boolean;
|
|
@@ -12,7 +11,7 @@ export declare class CmdParams {
|
|
|
12
11
|
getParam(name: string): string | undefined;
|
|
13
12
|
collect(): void;
|
|
14
13
|
toDictionary(): Record<string, any>;
|
|
15
|
-
static fromDictionary(dict: Record<string, any>):
|
|
14
|
+
static fromDictionary(dict: Record<string, any>): CmdParams;
|
|
16
15
|
}
|
|
17
16
|
export declare class test_cmdparams {
|
|
18
17
|
constructor();
|
|
@@ -28,7 +27,7 @@ export declare class InputFSFolder {
|
|
|
28
27
|
constructor();
|
|
29
28
|
forTree(cb: (item: InputFSFolder) => void): void;
|
|
30
29
|
toDictionary(): Record<string, any>;
|
|
31
|
-
static fromDictionary(dict: Record<string, any>):
|
|
30
|
+
static fromDictionary(dict: Record<string, any>): InputFSFolder;
|
|
32
31
|
}
|
|
33
32
|
export declare class InputFSFile {
|
|
34
33
|
name: string;
|
|
@@ -39,6 +38,23 @@ export declare class InputFSFile {
|
|
|
39
38
|
toDictionary(): Record<string, any>;
|
|
40
39
|
static fromDictionary(dict: Record<string, any>): InputFSFile;
|
|
41
40
|
}
|
|
41
|
+
export declare class InputFileResolver {
|
|
42
|
+
files: {
|
|
43
|
+
[key: string]: string;
|
|
44
|
+
};
|
|
45
|
+
hostDirs: Array<string>;
|
|
46
|
+
constructor();
|
|
47
|
+
putFile(name: string, data: string): void;
|
|
48
|
+
addHostDir(dir: string): void;
|
|
49
|
+
knownName(name: string): boolean;
|
|
50
|
+
baseName(path: string): string;
|
|
51
|
+
exists(path: string, name: string): boolean;
|
|
52
|
+
tryRead(path: string, name: string): Promise<string> | undefined;
|
|
53
|
+
hostHas(name: string): boolean;
|
|
54
|
+
hostRead(name: string): Promise<string> | undefined;
|
|
55
|
+
toDictionary(): Record<string, any>;
|
|
56
|
+
static fromDictionary(dict: Record<string, any>): InputFileResolver;
|
|
57
|
+
}
|
|
42
58
|
export declare class InputEnv {
|
|
43
59
|
use_real: boolean;
|
|
44
60
|
filesystem?: InputFSFolder;
|
|
@@ -46,10 +62,12 @@ export declare class InputEnv {
|
|
|
46
62
|
[key: string]: string;
|
|
47
63
|
};
|
|
48
64
|
commandLine?: CmdParams;
|
|
65
|
+
resolver?: InputFileResolver;
|
|
49
66
|
constructor();
|
|
50
67
|
setEnv(name: string, value: string): void;
|
|
68
|
+
setResolver(r: InputFileResolver): void;
|
|
51
69
|
toDictionary(): Record<string, any>;
|
|
52
|
-
static fromDictionary(dict: Record<string, any>):
|
|
70
|
+
static fromDictionary(dict: Record<string, any>): InputEnv;
|
|
53
71
|
}
|
|
54
72
|
export declare class test_input_filesystem {
|
|
55
73
|
constructor();
|
|
@@ -67,6 +85,218 @@ export declare class RangerCompilerMessage {
|
|
|
67
85
|
node?: CodeNode;
|
|
68
86
|
constructor();
|
|
69
87
|
}
|
|
88
|
+
export declare class RangerDocParam {
|
|
89
|
+
name: string;
|
|
90
|
+
text: string;
|
|
91
|
+
node?: CodeNode;
|
|
92
|
+
constructor();
|
|
93
|
+
}
|
|
94
|
+
export declare class RangerDocDeprecation {
|
|
95
|
+
since: string;
|
|
96
|
+
use: string;
|
|
97
|
+
description: string;
|
|
98
|
+
constructor();
|
|
99
|
+
}
|
|
100
|
+
export declare class RangerDocBlock {
|
|
101
|
+
is_public: boolean;
|
|
102
|
+
is_internal: boolean;
|
|
103
|
+
is_experimental: boolean;
|
|
104
|
+
description: string;
|
|
105
|
+
params: Array<RangerDocParam>;
|
|
106
|
+
returns: string;
|
|
107
|
+
throws: Array<string>;
|
|
108
|
+
since: string;
|
|
109
|
+
is_deprecated: boolean;
|
|
110
|
+
deprecation?: RangerDocDeprecation;
|
|
111
|
+
see: Array<string>;
|
|
112
|
+
examples: Array<string>;
|
|
113
|
+
exampleRefs: Array<string>;
|
|
114
|
+
category: string;
|
|
115
|
+
platform: string;
|
|
116
|
+
attrs: Array<string>;
|
|
117
|
+
targets: {
|
|
118
|
+
[key: string]: RangerDocBlock;
|
|
119
|
+
};
|
|
120
|
+
targetNames: Array<string>;
|
|
121
|
+
node?: CodeNode;
|
|
122
|
+
constructor();
|
|
123
|
+
hasParamDoc(n: string): boolean;
|
|
124
|
+
paramText(n: string): string;
|
|
125
|
+
hasTargetView(name: string): boolean;
|
|
126
|
+
viewFor(name: string): RangerDocBlock;
|
|
127
|
+
}
|
|
128
|
+
export declare class RangerDocReader {
|
|
129
|
+
constructor();
|
|
130
|
+
wordAt(node: CodeNode, idx: number): string;
|
|
131
|
+
textFrom(node: CodeNode, startIndex: number): string;
|
|
132
|
+
blockArgOf(node: CodeNode): CodeNode;
|
|
133
|
+
hasBlockArg(node: CodeNode): boolean;
|
|
134
|
+
readDeprecation(blockNode: CodeNode, ctx: RangerAppWriterContext): RangerDocDeprecation;
|
|
135
|
+
fill(doc: RangerDocBlock, blockNode: CodeNode, ctx: RangerAppWriterContext, allowTargets: boolean): void;
|
|
136
|
+
read(blockNode: CodeNode, ctx: RangerAppWriterContext): RangerDocBlock;
|
|
137
|
+
}
|
|
138
|
+
export declare class RangerApiParam {
|
|
139
|
+
name: string;
|
|
140
|
+
compiledName: string;
|
|
141
|
+
typeName: string;
|
|
142
|
+
description: string;
|
|
143
|
+
constructor();
|
|
144
|
+
}
|
|
145
|
+
export declare class RangerApiMethod {
|
|
146
|
+
name: string;
|
|
147
|
+
compiledName: string;
|
|
148
|
+
is_static: boolean;
|
|
149
|
+
is_constructor: boolean;
|
|
150
|
+
is_public: boolean;
|
|
151
|
+
returnType: string;
|
|
152
|
+
returnDoc: string;
|
|
153
|
+
params: Array<RangerApiParam>;
|
|
154
|
+
doc?: RangerDocBlock;
|
|
155
|
+
has_doc: boolean;
|
|
156
|
+
node?: CodeNode;
|
|
157
|
+
constructor();
|
|
158
|
+
}
|
|
159
|
+
export declare class RangerApiField {
|
|
160
|
+
name: string;
|
|
161
|
+
compiledName: string;
|
|
162
|
+
typeName: string;
|
|
163
|
+
is_public: boolean;
|
|
164
|
+
is_static: boolean;
|
|
165
|
+
doc?: RangerDocBlock;
|
|
166
|
+
has_doc: boolean;
|
|
167
|
+
constructor();
|
|
168
|
+
}
|
|
169
|
+
export declare class RangerApiClass {
|
|
170
|
+
name: string;
|
|
171
|
+
compiledName: string;
|
|
172
|
+
kind: string;
|
|
173
|
+
is_public: boolean;
|
|
174
|
+
extendsName: string;
|
|
175
|
+
fields: Array<RangerApiField>;
|
|
176
|
+
methods: Array<RangerApiMethod>;
|
|
177
|
+
doc?: RangerDocBlock;
|
|
178
|
+
has_doc: boolean;
|
|
179
|
+
node?: CodeNode;
|
|
180
|
+
constructor();
|
|
181
|
+
hasPublicMember(): boolean;
|
|
182
|
+
}
|
|
183
|
+
export declare class RangerApiModel {
|
|
184
|
+
moduleName: string;
|
|
185
|
+
version: string;
|
|
186
|
+
description: string;
|
|
187
|
+
classes: Array<RangerApiClass>;
|
|
188
|
+
warnings: Array<string>;
|
|
189
|
+
constructor();
|
|
190
|
+
publicClassCount(): number;
|
|
191
|
+
}
|
|
192
|
+
export declare class RangerApiBuilder {
|
|
193
|
+
strict: boolean;
|
|
194
|
+
publicClassNames: {
|
|
195
|
+
[key: string]: boolean;
|
|
196
|
+
};
|
|
197
|
+
internalClassNames: {
|
|
198
|
+
[key: string]: boolean;
|
|
199
|
+
};
|
|
200
|
+
exampleFns: Array<RangerAppFunctionDesc>;
|
|
201
|
+
constructor();
|
|
202
|
+
typeNameOf(node: CodeNode): string;
|
|
203
|
+
readDocOf(node: CodeNode, ctx: RangerAppWriterContext): RangerDocBlock;
|
|
204
|
+
warn(model: RangerApiModel, ctx: RangerAppWriterContext, node: CodeNode, msg: string): void;
|
|
205
|
+
validateMethod(model: RangerApiModel, m: RangerApiMethod, ctx: RangerAppWriterContext): void;
|
|
206
|
+
typeNamesOf(node: CodeNode): Array<string>;
|
|
207
|
+
checkNoLeak(ctx: RangerAppWriterContext, node: CodeNode, what: string, role: string, typeNode: CodeNode): void;
|
|
208
|
+
buildMethod(fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, isStatic: boolean): RangerApiMethod;
|
|
209
|
+
checkMethodLeaks(m: RangerApiMethod, fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext): void;
|
|
210
|
+
build(ctx: RangerAppWriterContext): RangerApiModel;
|
|
211
|
+
findExampleFn(ctx: RangerAppWriterContext, name: string): RangerAppFunctionDesc;
|
|
212
|
+
markExamplesOf(doc: RangerDocBlock, owner: CodeNode, ctx: RangerAppWriterContext): void;
|
|
213
|
+
resolveExamples(model: RangerApiModel, ctx: RangerAppWriterContext): void;
|
|
214
|
+
}
|
|
215
|
+
export declare class RangerDocCommentWriter {
|
|
216
|
+
exampleTexts: Array<string>;
|
|
217
|
+
constructor();
|
|
218
|
+
clearExamples(): void;
|
|
219
|
+
loadExamples(doc: RangerDocBlock, ctx: RangerAppWriterContext): void;
|
|
220
|
+
allExamples(doc: RangerDocBlock): Array<string>;
|
|
221
|
+
jsTypeName(t: string): string;
|
|
222
|
+
jsTypeOf(node: CodeNode): string;
|
|
223
|
+
csTypeName(t: string): string;
|
|
224
|
+
xmlEscape(value: string): string;
|
|
225
|
+
linesOf(text: string): Array<string>;
|
|
226
|
+
writeJsDoc(doc: RangerDocBlock, retType: string, params: Array<RangerApiParam>, wr: CodeWriter): void;
|
|
227
|
+
writeJsDocTyped(doc: RangerDocBlock, retType: string, params: Array<RangerApiParam>, valueType: string, wr: CodeWriter): void;
|
|
228
|
+
writeXmlLines(tag: string, attrs: string, text: string, wr: CodeWriter): void;
|
|
229
|
+
writeCsDoc(doc: RangerDocBlock, retType: string, params: Array<RangerApiParam>, wr: CodeWriter): void;
|
|
230
|
+
writeCsAttrs(doc: RangerDocBlock, wr: CodeWriter): void;
|
|
231
|
+
swiftTypeName(t: string): string;
|
|
232
|
+
writeSwiftDoc(doc: RangerDocBlock, retType: string, params: Array<RangerApiParam>, wr: CodeWriter): void;
|
|
233
|
+
writeSwiftAttrs(doc: RangerDocBlock, wr: CodeWriter): void;
|
|
234
|
+
kotlinTypeName(t: string): string;
|
|
235
|
+
writeKotlinDoc(doc: RangerDocBlock, retType: string, params: Array<RangerApiParam>, wr: CodeWriter): void;
|
|
236
|
+
writeKotlinAttrs(doc: RangerDocBlock, replaceWith: string, wr: CodeWriter): void;
|
|
237
|
+
pyTypeName(t: string): string;
|
|
238
|
+
pyTypeOf(node: CodeNode): string;
|
|
239
|
+
writePyDoc(doc: RangerDocBlock, retType: string, params: Array<RangerApiParam>, wr: CodeWriter): void;
|
|
240
|
+
dartTypeName(t: string): string;
|
|
241
|
+
writeDartDoc(doc: RangerDocBlock, retType: string, params: Array<RangerApiParam>, wr: CodeWriter): void;
|
|
242
|
+
writeDartAttrs(doc: RangerDocBlock, wr: CodeWriter): void;
|
|
243
|
+
paramsOf(fd: RangerAppFunctionDesc, doc: RangerDocBlock, forJs: boolean): Array<RangerApiParam>;
|
|
244
|
+
writeJsDocForMethod(fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
245
|
+
writeCsDocForMethod(fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
246
|
+
writeJsDocForClass(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
247
|
+
writeCsDocForClass(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
248
|
+
writeSwiftDocForMethod(fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
249
|
+
writeSwiftDocForClass(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
250
|
+
writeSwiftDocForField(p: RangerAppParamDesc, wr: CodeWriter): void;
|
|
251
|
+
kotlinReplaceWith(cl: RangerAppClassDesc, doc: RangerDocBlock): string;
|
|
252
|
+
writeKotlinDocForMethod(cl: RangerAppClassDesc, fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
253
|
+
writeKotlinDocForClass(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
254
|
+
writeKotlinDocForField(p: RangerAppParamDesc, wr: CodeWriter): void;
|
|
255
|
+
writePyDocForMethod(fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
256
|
+
writePyDocForClass(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
257
|
+
writeDartDocForMethod(fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
258
|
+
writeDartDocForClass(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
259
|
+
writeDartDocForField(p: RangerAppParamDesc, wr: CodeWriter): void;
|
|
260
|
+
memberVisibility(cl: RangerAppClassDesc, member: RangerAppParamDesc, whenLegacy: string, whenPublic: string, whenInternal: string): string;
|
|
261
|
+
classVisibility(cl: RangerAppClassDesc, whenLegacy: string, whenPublic: string, whenInternal: string): string;
|
|
262
|
+
writeJsDocForField(p: RangerAppParamDesc, wr: CodeWriter): void;
|
|
263
|
+
writeCsDocForField(p: RangerAppParamDesc, wr: CodeWriter): void;
|
|
264
|
+
static lookupFn(ctx: RangerAppWriterContext, name: string): RangerAppFunctionDesc;
|
|
265
|
+
}
|
|
266
|
+
export declare class RangerApiArtifactWriter {
|
|
267
|
+
constructor();
|
|
268
|
+
jsonEscape(value: string): string;
|
|
269
|
+
jsonString(value: string): string;
|
|
270
|
+
jsonBool(value: boolean): string;
|
|
271
|
+
jsonStringList(items: Array<string>): string;
|
|
272
|
+
docFields(doc: RangerDocBlock, has: boolean): string;
|
|
273
|
+
writeJson(model: RangerApiModel, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
274
|
+
writeMarkdown(model: RangerApiModel, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
275
|
+
writeReport(model: RangerApiModel, wr: CodeWriter): void;
|
|
276
|
+
writeAll(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
277
|
+
}
|
|
278
|
+
export declare class RangerApiPackageWriter {
|
|
279
|
+
constructor();
|
|
280
|
+
settingOr(ctx: RangerAppWriterContext, key: string, fallback: string): string;
|
|
281
|
+
jsonEscape(value: string): string;
|
|
282
|
+
writeNpmPackage(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
283
|
+
xmlEscape(value: string): string;
|
|
284
|
+
writeCsProject(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
285
|
+
writeDocFxConfig(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
286
|
+
writeDocFxHome(model: RangerApiModel, ctx: RangerAppWriterContext, name: string, orig_wr: CodeWriter): void;
|
|
287
|
+
swiftModuleName(raw: string): string;
|
|
288
|
+
writeSwiftPackage(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
289
|
+
writeDocCCatalog(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
290
|
+
writeKotlinGradle(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
291
|
+
writeDokkaModuleDoc(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
292
|
+
writeDartBarrel(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter, node: CodeNode): void;
|
|
293
|
+
pyModuleName(raw: string): string;
|
|
294
|
+
writePyProject(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
295
|
+
writePyAll(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
296
|
+
writeReadme(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
297
|
+
writeDartPubspec(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter): void;
|
|
298
|
+
writeAll(model: RangerApiModel, ctx: RangerAppWriterContext, orig_wr: CodeWriter, node: CodeNode): void;
|
|
299
|
+
}
|
|
70
300
|
export declare class RangerParamEventHandler {
|
|
71
301
|
constructor();
|
|
72
302
|
callback(param: RangerAppParamDesc): void;
|
|
@@ -130,6 +360,7 @@ export declare class RangerAppParamDesc {
|
|
|
130
360
|
debugString: string;
|
|
131
361
|
is_register: boolean;
|
|
132
362
|
ref_cnt: number;
|
|
363
|
+
read_cnt: number;
|
|
133
364
|
init_cnt: number;
|
|
134
365
|
set_cnt: number;
|
|
135
366
|
return_cnt: number;
|
|
@@ -162,14 +393,19 @@ export declare class RangerAppParamDesc {
|
|
|
162
393
|
escapes_function: boolean;
|
|
163
394
|
needs_cpp_reference: boolean;
|
|
164
395
|
rust_borrow_type: number;
|
|
396
|
+
needs_swift_inout: boolean;
|
|
397
|
+
rust_static_str: boolean;
|
|
398
|
+
rust_interior_cell: boolean;
|
|
165
399
|
rust_assigned_to_weak: boolean;
|
|
166
400
|
rust_needs_rc_wrap: boolean;
|
|
167
401
|
rust_assigned_to_field: boolean;
|
|
402
|
+
sharing_mutates: boolean;
|
|
168
403
|
ownership_kind: number;
|
|
169
404
|
ownership_resolved: boolean;
|
|
170
405
|
escapes_via: string;
|
|
171
406
|
escape_owners: Array<string>;
|
|
172
407
|
escape_via_call: boolean;
|
|
408
|
+
escape_return_only: boolean;
|
|
173
409
|
ownership_read_only: boolean;
|
|
174
410
|
node?: CodeNode;
|
|
175
411
|
nameNode?: CodeNode;
|
|
@@ -178,10 +414,15 @@ export declare class RangerAppParamDesc {
|
|
|
178
414
|
return_value?: RangerAppParamDesc;
|
|
179
415
|
description: string;
|
|
180
416
|
git_doc: string;
|
|
417
|
+
has_doc: boolean;
|
|
418
|
+
docBlock?: RangerDocBlock;
|
|
419
|
+
is_doc_example: boolean;
|
|
420
|
+
docExampleText: string;
|
|
181
421
|
has_events: boolean;
|
|
182
422
|
eMap?: RangerParamEventMap;
|
|
183
423
|
constructor();
|
|
184
424
|
addEvent(name: string, e: RangerParamEventHandler): void;
|
|
425
|
+
changeStrengthSelf(newStrength: number, lifeTime: number): void;
|
|
185
426
|
changeStrength(newStrength: number, lifeTime: number, changer: CodeNode): void;
|
|
186
427
|
isFunction(): boolean;
|
|
187
428
|
isProperty(): boolean;
|
|
@@ -231,6 +472,8 @@ export declare class RangerAppFunctionDesc extends RangerAppParamDesc {
|
|
|
231
472
|
all_paths_return: boolean;
|
|
232
473
|
mutates_self: boolean;
|
|
233
474
|
static_analysis_done: boolean;
|
|
475
|
+
rust_needs_self_rc: boolean;
|
|
476
|
+
rust_mut_self: boolean;
|
|
234
477
|
rust_uses_self: boolean;
|
|
235
478
|
rust_passes_self_to_weak: boolean;
|
|
236
479
|
rust_can_be_static: boolean;
|
|
@@ -241,13 +484,34 @@ export declare class RangerAppFunctionDesc extends RangerAppParamDesc {
|
|
|
241
484
|
mutates_param_indices: Array<number>;
|
|
242
485
|
constructor();
|
|
243
486
|
addCallTo(m: RangerAppFunctionDesc): void;
|
|
244
|
-
addIndirectClassUsage(m: RangerAppClassDesc, ctx: RangerAppWriterContext): void
|
|
245
|
-
addClassUsage(m: RangerAppClassDesc, ctx: RangerAppWriterContext): void
|
|
487
|
+
addIndirectClassUsage(m: RangerAppClassDesc, ctx: RangerAppWriterContext): Promise<void>;
|
|
488
|
+
addClassUsage(m: RangerAppClassDesc, ctx: RangerAppWriterContext): Promise<void>;
|
|
246
489
|
forOtherVersions(ctx: RangerAppWriterContext, cb: (item: RangerAppFunctionDesc) => void): Promise<void>;
|
|
247
490
|
isFunction(): boolean;
|
|
248
491
|
isClass(): boolean;
|
|
249
492
|
isProperty(): boolean;
|
|
250
493
|
}
|
|
494
|
+
export declare class ShapeViewDesc {
|
|
495
|
+
shapeName: string;
|
|
496
|
+
viewKind: string;
|
|
497
|
+
viewName: string;
|
|
498
|
+
className: string;
|
|
499
|
+
allowedCases: Array<string>;
|
|
500
|
+
parentView: string;
|
|
501
|
+
methodNames: Array<string>;
|
|
502
|
+
requiredMethods: Array<string>;
|
|
503
|
+
constructor();
|
|
504
|
+
}
|
|
505
|
+
export declare class ShapeGroupMethodSlot {
|
|
506
|
+
declaringGroup: string;
|
|
507
|
+
methodName: string;
|
|
508
|
+
isRequired: boolean;
|
|
509
|
+
hasDefault: boolean;
|
|
510
|
+
defaultNode?: CodeNode;
|
|
511
|
+
implCaseNames: Array<string>;
|
|
512
|
+
implNodes: Array<CodeNode>;
|
|
513
|
+
constructor();
|
|
514
|
+
}
|
|
251
515
|
export declare class RangerAppMethodVariants {
|
|
252
516
|
name: string;
|
|
253
517
|
variants: Array<RangerAppFunctionDesc>;
|
|
@@ -326,10 +590,17 @@ export declare class RangerAppClassDesc extends RangerAppParamDesc {
|
|
|
326
590
|
is_inherited: boolean;
|
|
327
591
|
is_extended_by_children: boolean;
|
|
328
592
|
child_classes: Array<string>;
|
|
593
|
+
rust_trait_mut: {
|
|
594
|
+
[key: string]: boolean;
|
|
595
|
+
};
|
|
596
|
+
rust_trait_mut_ready: boolean;
|
|
597
|
+
rust_needs_ref_semantics: boolean;
|
|
598
|
+
rust_ref_reason: string;
|
|
329
599
|
constructor();
|
|
330
600
|
isClass(): boolean;
|
|
331
601
|
isProperty(): boolean;
|
|
332
602
|
doesInherit(): boolean;
|
|
603
|
+
isDocExampleOnly(): boolean;
|
|
333
604
|
isNormalClass(): boolean;
|
|
334
605
|
getSystemclassType(): string;
|
|
335
606
|
isSystemclassType(typeName: string): boolean;
|
|
@@ -362,7 +633,7 @@ export declare class RangerTypeClass {
|
|
|
362
633
|
implements_interfaces: Array<RangerTypeClass>;
|
|
363
634
|
extends_classes: Array<RangerTypeClass>;
|
|
364
635
|
belongs_to_union: Array<RangerTypeClass>;
|
|
365
|
-
description?:
|
|
636
|
+
description?: any;
|
|
366
637
|
is_empty: boolean;
|
|
367
638
|
is_primitive: boolean;
|
|
368
639
|
is_mutable: boolean;
|
|
@@ -416,7 +687,7 @@ export declare class CodeNodeLiteral {
|
|
|
416
687
|
attrs: Array<CodeNodeLiteral>;
|
|
417
688
|
constructor();
|
|
418
689
|
toDictionary(): Record<string, any>;
|
|
419
|
-
static fromDictionary(dict: Record<string, any>):
|
|
690
|
+
static fromDictionary(dict: Record<string, any>): CodeNodeLiteral;
|
|
420
691
|
}
|
|
421
692
|
export declare class CodeNode {
|
|
422
693
|
code?: SourceCode;
|
|
@@ -441,9 +712,11 @@ export declare class CodeNode {
|
|
|
441
712
|
has_lambda: boolean;
|
|
442
713
|
has_lambda_call: boolean;
|
|
443
714
|
has_call: boolean;
|
|
715
|
+
is_call_args: boolean;
|
|
444
716
|
rust_needs_preevaluate: boolean;
|
|
445
717
|
rust_preevaluated_args: Array<CodeNode>;
|
|
446
718
|
rust_use_tmpvar: string;
|
|
719
|
+
rust_is_tail_return: boolean;
|
|
447
720
|
operator_pred: number;
|
|
448
721
|
to_the_right: boolean;
|
|
449
722
|
right_node?: CodeNode;
|
|
@@ -498,6 +771,8 @@ export declare class CodeNode {
|
|
|
498
771
|
fnDesc?: RangerAppFunctionDesc;
|
|
499
772
|
lambdaFnDesc?: RangerAppFunctionDesc;
|
|
500
773
|
hasParamDesc: boolean;
|
|
774
|
+
has_doc_tail: boolean;
|
|
775
|
+
docNode?: CodeNode;
|
|
501
776
|
paramDesc?: RangerAppParamDesc;
|
|
502
777
|
ownParamDesc?: RangerAppParamDesc;
|
|
503
778
|
evalCtx?: RangerAppWriterContext;
|
|
@@ -561,6 +836,7 @@ export declare class CodeNode {
|
|
|
561
836
|
isParsedAsPrimitive(): boolean;
|
|
562
837
|
isPrimitiveType(): boolean;
|
|
563
838
|
isAPrimitiveType(): boolean;
|
|
839
|
+
rangerDoubleLiteral(v: number): string;
|
|
564
840
|
writeCode(wr: CodeWriter): void;
|
|
565
841
|
createChainTarget(): void;
|
|
566
842
|
inferDefExpressionTypeFromValue(node: CodeNode): void;
|
|
@@ -577,6 +853,7 @@ export declare class CodeNode {
|
|
|
577
853
|
newExpressionNode(): CodeNode;
|
|
578
854
|
getChildrenFrom(otherNode: CodeNode): void;
|
|
579
855
|
finalizeAsCallChainRoot(): void;
|
|
856
|
+
chainDotName(item: CodeNode): string;
|
|
580
857
|
tryDesugarNewMethodChain(): boolean;
|
|
581
858
|
cloneWithType(match: RangerArgMatch, changeVref: boolean): CodeNode;
|
|
582
859
|
rebuildWithType(match: RangerArgMatch, changeVref: boolean): CodeNode;
|
|
@@ -589,6 +866,7 @@ export declare class CodeNode {
|
|
|
589
866
|
typeNameAsType(ctx: RangerAppWriterContext): number;
|
|
590
867
|
copyEvalResFrom(node: CodeNode): void;
|
|
591
868
|
defineNodeTypeTo(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
869
|
+
defineNodeTypeToSelf(ctx: RangerAppWriterContext): void;
|
|
592
870
|
ifNoTypeSetToVoid(): void;
|
|
593
871
|
ifNoTypeSetToEvalTypeOf(node: CodeNode): boolean;
|
|
594
872
|
static vref1(name: string): CodeNode;
|
|
@@ -702,6 +980,10 @@ export declare class RangerAppWriterContext {
|
|
|
702
980
|
targetLangName: string;
|
|
703
981
|
parent?: RangerAppWriterContext;
|
|
704
982
|
defined_imports: Array<string>;
|
|
983
|
+
active_macros: {
|
|
984
|
+
[key: string]: boolean;
|
|
985
|
+
};
|
|
986
|
+
macro_expansion_depth: number;
|
|
705
987
|
already_imported: {
|
|
706
988
|
[key: string]: boolean;
|
|
707
989
|
};
|
|
@@ -839,6 +1121,10 @@ export declare class RangerAppWriterContext {
|
|
|
839
1121
|
[key: string]: number;
|
|
840
1122
|
};
|
|
841
1123
|
rust_temp_counter: number;
|
|
1124
|
+
rust_path_field_names: {
|
|
1125
|
+
[key: string]: boolean;
|
|
1126
|
+
};
|
|
1127
|
+
rust_path_names_ready: boolean;
|
|
842
1128
|
rootFile: string;
|
|
843
1129
|
constructor();
|
|
844
1130
|
rustMarkMoved(varName: string): void;
|
|
@@ -900,7 +1186,10 @@ export declare class RangerAppWriterContext {
|
|
|
900
1186
|
addCapturedVariable(name: string): void;
|
|
901
1187
|
getCapturedVariables(): Array<string>;
|
|
902
1188
|
transformOpNameWord(input_word: string): string;
|
|
1189
|
+
transformMemberWord(input_word: string): string;
|
|
1190
|
+
transformBindingWord(input_word: string): string;
|
|
903
1191
|
transformWord(input_word: string): string;
|
|
1192
|
+
getTargetLangName(): string;
|
|
904
1193
|
initReservedWords(): boolean;
|
|
905
1194
|
initStdCommands(): boolean;
|
|
906
1195
|
transformTypeName(typeName: string): string;
|
|
@@ -917,6 +1206,7 @@ export declare class RangerAppWriterContext {
|
|
|
917
1206
|
canUseTypeInference(nameNode: CodeNode): boolean;
|
|
918
1207
|
createOpStaticClass(name: string): RangerAppClassDesc;
|
|
919
1208
|
createTraitInstanceClass(traitName: string, instanceName: string, initParams: CodeNode, flowParser: RangerFlowParser, wr: CodeWriter): Promise<RangerAppClassDesc> | undefined;
|
|
1209
|
+
createGenericClassInstance(templateName: string, instanceName: string, typeArgs: CodeNode, flowParser: RangerFlowParser, wr: CodeWriter): Promise<RangerAppClassDesc> | undefined;
|
|
920
1210
|
createOperator(fromNode: CodeNode): void;
|
|
921
1211
|
findClassMethod(cname: string, fname: string): RangerAppFunctionDesc | undefined;
|
|
922
1212
|
getFileWriter(path: string, fileName: string): CodeWriter;
|
|
@@ -1025,6 +1315,28 @@ export declare class SourceMapBuilder {
|
|
|
1025
1315
|
toJSON(fileName: string): string;
|
|
1026
1316
|
hasMappings(): boolean;
|
|
1027
1317
|
}
|
|
1318
|
+
export declare class RangerSourceFormat {
|
|
1319
|
+
constructor();
|
|
1320
|
+
static defaultWidthFor(ext: string): number;
|
|
1321
|
+
static dotLeadsLine(ext: string): boolean;
|
|
1322
|
+
static isSpaceCode(c: number): boolean;
|
|
1323
|
+
static indentOf(line: string): string;
|
|
1324
|
+
static isCommentOrEmpty(line: string): boolean;
|
|
1325
|
+
static codeEndOf(line: string): number;
|
|
1326
|
+
static chainSplits(line: string): Array<number>;
|
|
1327
|
+
static breakChainLine(line: string, ext: string): string;
|
|
1328
|
+
static isCallKeyword(word: string): boolean;
|
|
1329
|
+
static isWordCode(c: number): boolean;
|
|
1330
|
+
static wordBefore(line: string, i: number): string;
|
|
1331
|
+
static argListOpen(line: string): number;
|
|
1332
|
+
static topCommaCount(line: string, open: number, limit: number): number;
|
|
1333
|
+
static topCommaAt(line: string, open: number, limit: number): Array<number>;
|
|
1334
|
+
static codeTailChar(line: string): number;
|
|
1335
|
+
static breakArgLine(line: string, ext: string): string;
|
|
1336
|
+
static hasOpenString(line: string): boolean;
|
|
1337
|
+
static breakRustBlockLine(line: string, ext: string): string;
|
|
1338
|
+
static formatSource(text: string, ext: string, width: number): string;
|
|
1339
|
+
}
|
|
1028
1340
|
export declare class CodeFile {
|
|
1029
1341
|
path_name: string;
|
|
1030
1342
|
name: string;
|
|
@@ -1036,7 +1348,7 @@ export declare class CodeFile {
|
|
|
1036
1348
|
fileSystem?: CodeFileSystem;
|
|
1037
1349
|
sourceMapBuilder?: SourceMapBuilder;
|
|
1038
1350
|
constructor(filePath: string, fileName: string);
|
|
1039
|
-
initSourceMapsIfNeeded(): void;
|
|
1351
|
+
initSourceMapsIfNeeded(mapsEnabled: boolean): void;
|
|
1040
1352
|
addImport(import_name: string): void;
|
|
1041
1353
|
rewrite(newString: string): void;
|
|
1042
1354
|
testCreateWriter(): CodeWriter;
|
|
@@ -1047,6 +1359,7 @@ export declare class CodeFile {
|
|
|
1047
1359
|
export declare class CodeFileSystem {
|
|
1048
1360
|
files: Array<CodeFile>;
|
|
1049
1361
|
sourceMapsEnabled: boolean;
|
|
1362
|
+
formatWidth: number;
|
|
1050
1363
|
constructor();
|
|
1051
1364
|
enableSourceMaps(): void;
|
|
1052
1365
|
shouldWriteSourceMaps(): boolean;
|
|
@@ -1063,6 +1376,10 @@ export declare class CodeSlice {
|
|
|
1063
1376
|
}
|
|
1064
1377
|
export declare class CodeWriter {
|
|
1065
1378
|
tagName: string;
|
|
1379
|
+
suppress_expr_parens: boolean;
|
|
1380
|
+
current_op_no_parens: boolean;
|
|
1381
|
+
in_format_args: boolean;
|
|
1382
|
+
parent_binding: number;
|
|
1066
1383
|
codeStr: string;
|
|
1067
1384
|
currentLine: string;
|
|
1068
1385
|
tabStr: string;
|
|
@@ -1123,6 +1440,7 @@ export declare class CodeWriter {
|
|
|
1123
1440
|
}
|
|
1124
1441
|
export declare class RangerLispParser {
|
|
1125
1442
|
code?: SourceCode;
|
|
1443
|
+
source_text: string;
|
|
1126
1444
|
buff?: string;
|
|
1127
1445
|
__len: number;
|
|
1128
1446
|
i: number;
|
|
@@ -1136,23 +1454,34 @@ export declare class RangerLispParser {
|
|
|
1136
1454
|
curr_node?: CodeNode;
|
|
1137
1455
|
had_error: boolean;
|
|
1138
1456
|
disableOperators: boolean;
|
|
1457
|
+
recv_tmp_count: number;
|
|
1458
|
+
last_call_group?: CodeNode;
|
|
1459
|
+
pending_comments: Array<CodeNode>;
|
|
1139
1460
|
constructor(code_module: SourceCode);
|
|
1140
1461
|
joo(cm: SourceCode): void;
|
|
1141
1462
|
parse_raw_annotation(): CodeNode;
|
|
1142
|
-
skip_space(is_block_parent: boolean): boolean;
|
|
1463
|
+
skip_space(s: string, is_block_parent: boolean): boolean;
|
|
1143
1464
|
end_expression(consumeCurrent: boolean): boolean;
|
|
1144
|
-
getOperator(disabled: boolean): number;
|
|
1145
|
-
isOperator(disabled: boolean): number;
|
|
1465
|
+
getOperator(s: string, disabled: boolean): number;
|
|
1466
|
+
isOperator(s: string, disabled: boolean): number;
|
|
1146
1467
|
getOperatorPred(str: string, disabled: boolean): number;
|
|
1147
1468
|
isComparisonOpPred(pred: number): boolean;
|
|
1469
|
+
isFoldableInfixPred(pred: number): boolean;
|
|
1148
1470
|
isDotVRef(n: CodeNode): boolean;
|
|
1149
1471
|
isDotCallPairOnNode(node: CodeNode): boolean;
|
|
1472
|
+
isCallChainOnNode(node: CodeNode): boolean;
|
|
1473
|
+
foldCallChainToGroup(node: CodeNode): void;
|
|
1150
1474
|
foldDotCallPairToGroup(node: CodeNode): void;
|
|
1475
|
+
isPlainDotCallee(n: CodeNode, paren_pos: number): boolean;
|
|
1476
|
+
isChainTailCallee(n: CodeNode, paren_pos: number): boolean;
|
|
1477
|
+
insertCallOrNode(p_node: CodeNode): boolean;
|
|
1151
1478
|
tryCloseCallArgParenBeforeInfix(): boolean;
|
|
1152
1479
|
insert_node(p_node: CodeNode): void;
|
|
1153
|
-
|
|
1154
|
-
|
|
1480
|
+
attachPendingComments(node: CodeNode): void;
|
|
1481
|
+
parse_attributes(s: string): boolean;
|
|
1482
|
+
parseXML(s: string): void;
|
|
1155
1483
|
parse(disable_ops: boolean): void;
|
|
1484
|
+
parseBuf(s: string, disable_ops: boolean): void;
|
|
1156
1485
|
static normalizeLineEndings(src: string): string;
|
|
1157
1486
|
}
|
|
1158
1487
|
export declare class TTypes {
|
|
@@ -1176,6 +1505,7 @@ export declare class RangerArgMatch {
|
|
|
1176
1505
|
matchedLambdas: {
|
|
1177
1506
|
[key: string]: CodeNode;
|
|
1178
1507
|
};
|
|
1508
|
+
typeParamNames: Array<string>;
|
|
1179
1509
|
constructor();
|
|
1180
1510
|
matchArguments(args: CodeNode, callArgs: CodeNode, ctx: RangerAppWriterContext, firstArgIndex: number): boolean;
|
|
1181
1511
|
force_add(tplKeyword: string, typeName: string, ctx: RangerAppWriterContext): void;
|
|
@@ -1186,6 +1516,9 @@ export declare class RangerArgMatch {
|
|
|
1186
1516
|
doesMatch(arg: CodeNode, node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1187
1517
|
areEqualTypes(type1o: string, type2o: string, ctx: RangerAppWriterContext): boolean;
|
|
1188
1518
|
areEqualATypes(type1i: string, type2i: string, ctx: RangerAppWriterContext): boolean;
|
|
1519
|
+
addTypeParam(tplKeyword: string, typeName: string): boolean;
|
|
1520
|
+
isCollectionParam(n: string): boolean;
|
|
1521
|
+
applyCollectionType(node: CodeNode, n: string): void;
|
|
1189
1522
|
getTypeName(n: string): string;
|
|
1190
1523
|
getType(n: string): number;
|
|
1191
1524
|
setRvBasedOn(arg: CodeNode, node: CodeNode): boolean;
|
|
@@ -1322,6 +1655,51 @@ export declare class TFiles {
|
|
|
1322
1655
|
static searchEnv(env: InputEnv, paths: Array<string>, fileName: string): string;
|
|
1323
1656
|
static search(paths: Array<string>, fileName: string): string;
|
|
1324
1657
|
}
|
|
1658
|
+
export declare class PkgHit {
|
|
1659
|
+
ok: boolean;
|
|
1660
|
+
err: string;
|
|
1661
|
+
dir: string;
|
|
1662
|
+
name: string;
|
|
1663
|
+
packageId: string;
|
|
1664
|
+
constructor();
|
|
1665
|
+
}
|
|
1666
|
+
export declare class PkgJVal {
|
|
1667
|
+
kind: string;
|
|
1668
|
+
str: string;
|
|
1669
|
+
keys: Array<string>;
|
|
1670
|
+
vals: Array<PkgJVal>;
|
|
1671
|
+
constructor();
|
|
1672
|
+
}
|
|
1673
|
+
export declare class PkgJRead {
|
|
1674
|
+
text: string;
|
|
1675
|
+
i: number;
|
|
1676
|
+
n: number;
|
|
1677
|
+
ok: boolean;
|
|
1678
|
+
constructor();
|
|
1679
|
+
parse(src: string): PkgJVal;
|
|
1680
|
+
skipWs(): void;
|
|
1681
|
+
val(): PkgJVal;
|
|
1682
|
+
obj(): PkgJVal;
|
|
1683
|
+
quoted(): string;
|
|
1684
|
+
static child(obj: PkgJVal, key: string): PkgJVal | undefined;
|
|
1685
|
+
static strOf(obj: PkgJVal, key: string): string;
|
|
1686
|
+
}
|
|
1687
|
+
export declare class PkgImport {
|
|
1688
|
+
constructor();
|
|
1689
|
+
static isPkg(spec: string): boolean;
|
|
1690
|
+
static stripDot(spec: string): string;
|
|
1691
|
+
static cacheRoot(): string;
|
|
1692
|
+
static joinPath(a: string, b: string): string;
|
|
1693
|
+
static foldPath(path: string): string;
|
|
1694
|
+
static splitName(path: string): Array<string>;
|
|
1695
|
+
static parentDir(dir: string): string;
|
|
1696
|
+
static findManifestDir(env: InputEnv, start: string, paths: Array<string>): string;
|
|
1697
|
+
static walkUp(env: InputEnv, start: string): string;
|
|
1698
|
+
static readText(env: InputEnv, dir: string, name: string): Promise<string>;
|
|
1699
|
+
static findChar(s: string, code: number): number;
|
|
1700
|
+
static resolve(env: InputEnv, startDir: string, spec: string, libraryPaths: Array<string>): Promise<PkgHit>;
|
|
1701
|
+
static lockRoot(env: InputEnv, lockText: string, pkgName: string, manDir: string): string;
|
|
1702
|
+
}
|
|
1325
1703
|
export declare class ClassJoinPoint {
|
|
1326
1704
|
class_def?: RangerAppClassDesc;
|
|
1327
1705
|
node?: CodeNode;
|
|
@@ -1332,10 +1710,82 @@ export declare class WalkLater {
|
|
|
1332
1710
|
callArg?: CodeNode;
|
|
1333
1711
|
constructor();
|
|
1334
1712
|
}
|
|
1713
|
+
export declare class RangerFnParts {
|
|
1714
|
+
ok: boolean;
|
|
1715
|
+
nameNode?: CodeNode;
|
|
1716
|
+
fnArgs?: CodeNode;
|
|
1717
|
+
fnBody?: CodeNode;
|
|
1718
|
+
desc?: RangerAppClassDesc;
|
|
1719
|
+
constructor();
|
|
1720
|
+
}
|
|
1335
1721
|
export declare class RangerFlowParser {
|
|
1336
1722
|
hasRootPath: boolean;
|
|
1337
1723
|
rootPath: string;
|
|
1338
1724
|
_debug: boolean;
|
|
1725
|
+
treeChildCall: {
|
|
1726
|
+
[key: string]: string;
|
|
1727
|
+
};
|
|
1728
|
+
treeTextField: {
|
|
1729
|
+
[key: string]: string;
|
|
1730
|
+
};
|
|
1731
|
+
treeTags: {
|
|
1732
|
+
[key: string]: string;
|
|
1733
|
+
};
|
|
1734
|
+
treeTagDefaults: {
|
|
1735
|
+
[key: string]: CodeNode;
|
|
1736
|
+
};
|
|
1737
|
+
treeFactoryNames: {
|
|
1738
|
+
[key: string]: boolean;
|
|
1739
|
+
};
|
|
1740
|
+
treeTmpCount: number;
|
|
1741
|
+
shapeCases: {
|
|
1742
|
+
[key: string]: Array<string>;
|
|
1743
|
+
};
|
|
1744
|
+
shapeGroupCases: {
|
|
1745
|
+
[key: string]: Array<string>;
|
|
1746
|
+
};
|
|
1747
|
+
caseAlias: {
|
|
1748
|
+
[key: string]: string;
|
|
1749
|
+
};
|
|
1750
|
+
groupAlias: {
|
|
1751
|
+
[key: string]: string;
|
|
1752
|
+
};
|
|
1753
|
+
caseShape: {
|
|
1754
|
+
[key: string]: string;
|
|
1755
|
+
};
|
|
1756
|
+
caseDisplay: {
|
|
1757
|
+
[key: string]: string;
|
|
1758
|
+
};
|
|
1759
|
+
caseIsValue: {
|
|
1760
|
+
[key: string]: boolean;
|
|
1761
|
+
};
|
|
1762
|
+
caseFieldNames: {
|
|
1763
|
+
[key: string]: Array<string>;
|
|
1764
|
+
};
|
|
1765
|
+
shapeViews: {
|
|
1766
|
+
[key: string]: ShapeViewDesc;
|
|
1767
|
+
};
|
|
1768
|
+
shapeGroupParent: {
|
|
1769
|
+
[key: string]: string;
|
|
1770
|
+
};
|
|
1771
|
+
shapeGroupFields: {
|
|
1772
|
+
[key: string]: Array<string>;
|
|
1773
|
+
};
|
|
1774
|
+
shapeGroupFieldTypeName: {
|
|
1775
|
+
[key: string]: string;
|
|
1776
|
+
};
|
|
1777
|
+
shapeGroupFieldArrayType: {
|
|
1778
|
+
[key: string]: string;
|
|
1779
|
+
};
|
|
1780
|
+
shapeGroupFieldKeyType: {
|
|
1781
|
+
[key: string]: string;
|
|
1782
|
+
};
|
|
1783
|
+
shapeGroupAllValue: {
|
|
1784
|
+
[key: string]: boolean;
|
|
1785
|
+
};
|
|
1786
|
+
shapeCaseCtorArgs: {
|
|
1787
|
+
[key: string]: string;
|
|
1788
|
+
};
|
|
1339
1789
|
stdCommands?: CodeNode;
|
|
1340
1790
|
lastProcessedNode?: CodeNode;
|
|
1341
1791
|
collectWalkAtEnd: Array<CodeNode>;
|
|
@@ -1361,6 +1811,7 @@ export declare class RangerFlowParser {
|
|
|
1361
1811
|
[key: string]: string;
|
|
1362
1812
|
};
|
|
1363
1813
|
allNewRNodes: Array<CodeNode>;
|
|
1814
|
+
inline_static_depth: number;
|
|
1364
1815
|
infinite_recursion: boolean;
|
|
1365
1816
|
match_types: {
|
|
1366
1817
|
[key: string]: string;
|
|
@@ -1375,7 +1826,7 @@ export declare class RangerFlowParser {
|
|
|
1375
1826
|
getThisName(): string;
|
|
1376
1827
|
GetProperty(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1377
1828
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1378
|
-
|
|
1829
|
+
EnterFnParts(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<RangerFnParts>;
|
|
1379
1830
|
Constructor(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1380
1831
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1381
1832
|
normalizeNewArgList(node: CodeNode): void;
|
|
@@ -1384,6 +1835,10 @@ export declare class RangerFlowParser {
|
|
|
1384
1835
|
transformParams2(list: Array<CodeNode>, fnArgs: Array<CodeNode>, ctx: RangerAppWriterContext): Array<CodeNode>;
|
|
1385
1836
|
CreateCTTI(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1386
1837
|
CreateRTTI(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1838
|
+
walkXmlCreate(xmlNode: CodeNode, regName: string, in_currCnt: number, opBody: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<number>;
|
|
1839
|
+
markAsyncFrom(f: RangerAppFunctionDesc, visited: Array<RangerAppFunctionDesc>): Promise<void>;
|
|
1840
|
+
markAsyncFromVariant(f: RangerAppFunctionDesc, visited: Array<RangerAppFunctionDesc>, ctx: RangerAppWriterContext): Promise<void>;
|
|
1841
|
+
markCalledFromMain(f: RangerAppFunctionDesc, ctx: RangerAppWriterContext): Promise<void>;
|
|
1387
1842
|
SolveAsyncFuncs(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1388
1843
|
matchMethodCall(cl: RangerAppClassDesc, methodName: string, callArgs: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, errNode: CodeNode): Promise<RangerAppFunctionDesc> | undefined;
|
|
1389
1844
|
cmdCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
@@ -1407,9 +1862,15 @@ export declare class RangerFlowParser {
|
|
|
1407
1862
|
testCompile(opFn: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<{
|
|
1408
1863
|
[key: string]: CodeNode;
|
|
1409
1864
|
}>;
|
|
1865
|
+
inlineStaticEligible(m: RangerAppFunctionDesc, fnNode: CodeNode, ctx: RangerAppWriterContext): Promise<boolean>;
|
|
1866
|
+
tryInlineTrivialStatic(node: CodeNode, fnNode: CodeNode, m: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1410
1867
|
TransformOpFn(opFnList: Array<CodeNode>, origNode: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1411
1868
|
cmdArray(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1412
1869
|
EnterLambdaMethod(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1870
|
+
annotationIsTypeArgs(tAnn: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1871
|
+
normalizeTypeArg(ch: CodeNode): void;
|
|
1872
|
+
genericInstanceName(baseName: string, tAnn: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<string>;
|
|
1873
|
+
typeArgKey(spelling: string): string;
|
|
1413
1874
|
CheckVRefTypeAnnotationOf(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1414
1875
|
CheckTypeAnnotationOf(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1415
1876
|
matchNode(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
@@ -1422,7 +1883,75 @@ export declare class RangerFlowParser {
|
|
|
1422
1883
|
finalizeRecordClasses(ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1423
1884
|
expandRecordCtorArgsIfNeeded(cl: RangerAppClassDesc, fnDescr: RangerAppFunctionDesc, params: CodeNode, node: CodeNode): void;
|
|
1424
1885
|
buildRecordConstructor(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1886
|
+
prepareImport(ctx: RangerAppWriterContext, spec: string): Promise<PkgHit>;
|
|
1425
1887
|
mergeImports(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1888
|
+
DesugarTrees(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1889
|
+
reportStrayTrees(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1890
|
+
isTreeFactoryDeclaration(node: CodeNode): boolean;
|
|
1891
|
+
collectTreeFactories(node: CodeNode, atTopLevel: boolean, ctx: RangerAppWriterContext): void;
|
|
1892
|
+
registerTreeFactory(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1893
|
+
isTreeLiteral(node: CodeNode): boolean;
|
|
1894
|
+
expandTreesIn(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1895
|
+
expandTreesInBlock(block: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1896
|
+
lowerTreesIn(node: CodeNode, prelude: Array<CodeNode>, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1897
|
+
rewriteAsVRef(node: CodeNode, name: string): void;
|
|
1898
|
+
lowerTreeElement(el: CodeNode, fname: string, prelude: Array<CodeNode>, ctx: RangerAppWriterContext, wr: CodeWriter): string;
|
|
1899
|
+
isTreeKeyword(node: CodeNode, word: string): boolean;
|
|
1900
|
+
lowerComputedChildren(ch: CodeNode, reg: string, fname: string, prelude: Array<CodeNode>, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1901
|
+
treeCall(at_node: CodeNode, reg: string, method: string, arg: CodeNode): CodeNode;
|
|
1902
|
+
lowerTreeProps(propsNode: CodeNode, reg: string, prelude: Array<CodeNode>, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1903
|
+
treeAssign(at_node: CodeNode, reg: string, field: string, value: CodeNode): CodeNode;
|
|
1904
|
+
lowerTreeChild(ch: CodeNode, reg: string, fname: string, prelude: Array<CodeNode>, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1905
|
+
DesugarShapes(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1906
|
+
isShapeDeclaration(node: CodeNode): boolean;
|
|
1907
|
+
expandShapesIn(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, renames: {
|
|
1908
|
+
[key: string]: string;
|
|
1909
|
+
}): void;
|
|
1910
|
+
expandShapesInScope(node: CodeNode, atTopLevel: boolean, ctx: RangerAppWriterContext, wr: CodeWriter, renames: {
|
|
1911
|
+
[key: string]: string;
|
|
1912
|
+
}): void;
|
|
1913
|
+
registerShapeAlias(target: {
|
|
1914
|
+
[key: string]: string;
|
|
1915
|
+
}, alias: string, clsName: string): void;
|
|
1916
|
+
shapeFieldIsScalar(fieldNode: CodeNode): boolean;
|
|
1917
|
+
shapeFieldName(fieldNode: CodeNode): string;
|
|
1918
|
+
shapeMemberBlock(st: CodeNode): CodeNode;
|
|
1919
|
+
shapeMemberIsField(st: CodeNode): boolean;
|
|
1920
|
+
shapeMemberIsMethod(st: CodeNode): boolean;
|
|
1921
|
+
shapeMethodHasBody(st: CodeNode): boolean;
|
|
1922
|
+
shapeMethodSignatureKey(mNode: CodeNode): string;
|
|
1923
|
+
rewriteMethodFieldRefs(node: CodeNode, fieldNames: Array<string>, selfName: string): void;
|
|
1924
|
+
findOpsClassBlock(root: CodeNode): CodeNode | undefined;
|
|
1925
|
+
attachOpsMethods(opsRoot: CodeNode, viewName: string, methodNodes: Array<CodeNode>, methodStatic: Array<boolean>, fieldNames: Array<string>, ctx: RangerAppWriterContext): void;
|
|
1926
|
+
attachShapeMethods(eqRoot: CodeNode, shapeName: string, opsName: string, methodNodes: Array<CodeNode>, methodNames: Array<string>, methodStatic: Array<boolean>, ctx: RangerAppWriterContext): void;
|
|
1927
|
+
parseOpsClassRoot(src: string, filename: string, shapeNode: CodeNode, ctx: RangerAppWriterContext): CodeNode | undefined;
|
|
1928
|
+
registerShapeView(shapeName: string, viewKind: string, viewName: string, className: string, allowed: Array<string>, parentView: string): void;
|
|
1929
|
+
shapeTypeSpelling(typeName: string, arrayType: string, keyType: string): string;
|
|
1930
|
+
shapeGroupHasField(groupCls: string, fieldName: string): boolean;
|
|
1931
|
+
buildGroupFieldAccessorSrc(shapeName: string, gn: string, gClsName: string, mems: Array<string>, fieldNames: Array<string>, allowSet: boolean): string;
|
|
1932
|
+
rewriteToGroupFieldGet(node: CodeNode, receiver: CodeNode, fieldName: string, groupCls: string, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1933
|
+
rewriteToGroupWiden(node: CodeNode, targetGroupCls: string, sourceGroupCls: string, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1934
|
+
expandShape(shapeNode: CodeNode, parent: CodeNode, shapeIndex: number, ctx: RangerAppWriterContext, wr: CodeWriter, renames: {
|
|
1935
|
+
[key: string]: string;
|
|
1936
|
+
}): void;
|
|
1937
|
+
isMatchStatement(node: CodeNode): boolean;
|
|
1938
|
+
expandMatchesIn(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1939
|
+
expandMatchesInFn(node: CodeNode, enclosing: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1940
|
+
expandGroupKindTests(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1941
|
+
buildCaseKindTest(proto: CodeNode, scrutinee: CodeNode, cls: string): CodeNode;
|
|
1942
|
+
declaredTypeOf(fnNode: CodeNode, name: string): string;
|
|
1943
|
+
declaredTypeInBody(node: CodeNode, name: string): string;
|
|
1944
|
+
matchArmCases(armName: string, node: CodeNode, ctx: RangerAppWriterContext): Array<string>;
|
|
1945
|
+
expandMatch(matchNode: CodeNode, parent: CodeNode, matchIndex: number, enclosing: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1946
|
+
setShapeRef(node: CodeNode, replacement: string): void;
|
|
1947
|
+
rewriteShapeRefs(node: CodeNode, renames: {
|
|
1948
|
+
[key: string]: string;
|
|
1949
|
+
}): void;
|
|
1950
|
+
isClassMemberForm(node: CodeNode): boolean;
|
|
1951
|
+
markParentClass(ee: CodeNode, childName: string, ctx: RangerAppWriterContext): void;
|
|
1952
|
+
WalkCollectTemplates(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1953
|
+
isDocumentableHead(name: string): boolean;
|
|
1954
|
+
DetachDocBlocks(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1426
1955
|
CollectMethods(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1427
1956
|
defineFunctionParam(method: RangerAppFunctionDesc, arg: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1428
1957
|
spliceFunctionBody(startIndex: number, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): CodeNode;
|
|
@@ -1442,6 +1971,7 @@ export declare class RangerFlowParser {
|
|
|
1442
1971
|
resolveProcessPathFromFields(cl: RangerAppClassDesc): void;
|
|
1443
1972
|
validateProcessPaths(processClasses: Array<RangerAppClassDesc>, ctx: RangerAppWriterContext): void;
|
|
1444
1973
|
isValidProcessPath(pathStr: string): boolean;
|
|
1974
|
+
isJustVref(a: CodeNode): boolean;
|
|
1445
1975
|
findLanguageOper(details: CodeNode, ctx: RangerAppWriterContext, opDef: CodeNode): Promise<CodeNode> | undefined;
|
|
1446
1976
|
buildMacro(langOper: CodeNode, args: CodeNode, ctx: RangerAppWriterContext): Promise<CodeNode>;
|
|
1447
1977
|
operandIsNonOptionalForNullCheck(node: CodeNode): boolean;
|
|
@@ -1493,19 +2023,41 @@ export declare class RangerGenericClassWriter {
|
|
|
1493
2023
|
compFlags: {
|
|
1494
2024
|
[key: string]: boolean;
|
|
1495
2025
|
};
|
|
1496
|
-
|
|
2026
|
+
fmtMode: number;
|
|
2027
|
+
constructor();
|
|
2028
|
+
bindingPowerOf(opName: string): number;
|
|
2029
|
+
operandNeedsParens(childBp: number, parentBp: number): boolean;
|
|
2030
|
+
formatterEnabled(ctx: RangerAppWriterContext): boolean;
|
|
2031
|
+
isIdentStartChar(c: number): boolean;
|
|
2032
|
+
isPostfixTopChar(s: string, i: number, c: number, n: number): boolean;
|
|
2033
|
+
isPostfixExpression(s: string): boolean;
|
|
2034
|
+
isWrappedInParens(s: string): boolean;
|
|
2035
|
+
receiverNeedsParens(s: string): boolean;
|
|
2036
|
+
writeCallReceiver(obj: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2037
|
+
unionIsSealable(ucl: RangerAppClassDesc, ctx: RangerAppWriterContext): boolean;
|
|
2038
|
+
unionInterfaceName(unionName: string): string;
|
|
2039
|
+
sealableUnionNames(ctx: RangerAppWriterContext): Array<string>;
|
|
2040
|
+
unionInterfacesOf(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): Array<string>;
|
|
2041
|
+
classInSealableUnion(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): boolean;
|
|
2042
|
+
sealableUnionTypeOr(unionName: string, topType: string, ctx: RangerAppWriterContext): string;
|
|
1497
2043
|
lineEnding(): string;
|
|
2044
|
+
opWritesOwnParens(opName: string, node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1498
2045
|
addSystemImport(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1499
2046
|
EncodeString(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): string;
|
|
1500
2047
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2048
|
+
beforeOperatorStatement(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1501
2049
|
WriteSetterVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1502
2050
|
writeArrayTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1503
2051
|
WriteEnum(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2052
|
+
doubleNeedsPointZero(dd_str: string): boolean;
|
|
1504
2053
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1505
2054
|
getTypeString(type_string: string): string;
|
|
2055
|
+
emptyBlockFiller(): string;
|
|
1506
2056
|
import_lib(lib_name: string, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1507
2057
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1508
2058
|
release_local_vars(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2059
|
+
renderDocExample(fd: RangerAppFunctionDesc, ctx: RangerAppWriterContext, outer: CodeWriter): Promise<string>;
|
|
2060
|
+
trimTrailingBlank(text: string): string;
|
|
1509
2061
|
WalkNode(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1510
2062
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1511
2063
|
writeRawTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1572,7 +2124,13 @@ export declare class RangerJava7ClassWriter extends RangerGenericClassWriter {
|
|
|
1572
2124
|
export declare class RangerSwift3ClassWriter extends RangerGenericClassWriter {
|
|
1573
2125
|
compiler?: LiveCompiler;
|
|
1574
2126
|
header_created: boolean;
|
|
2127
|
+
swift_unions_written: boolean;
|
|
1575
2128
|
constructor();
|
|
2129
|
+
writeSwiftUnionEnums(ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2130
|
+
swiftDeclaredClassOf(nVal: CodeNode): string;
|
|
2131
|
+
swiftUnionHasMember(ucl: RangerAppClassDesc, memberName: string): boolean;
|
|
2132
|
+
swiftWriteUnionValue(targetTypeName: string, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2133
|
+
swiftWriteUnionArg(arg: RangerAppParamDesc, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1576
2134
|
adjustType(tn: string): string;
|
|
1577
2135
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1578
2136
|
getTypeString(type_string: string): string;
|
|
@@ -1587,6 +2145,7 @@ export declare class RangerSwift3ClassWriter extends RangerGenericClassWriter {
|
|
|
1587
2145
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1588
2146
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1589
2147
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2148
|
+
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1590
2149
|
haveSameSig(fn1: RangerAppFunctionDesc, fn2: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
1591
2150
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1592
2151
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1594,8 +2153,20 @@ export declare class RangerSwift3ClassWriter extends RangerGenericClassWriter {
|
|
|
1594
2153
|
export declare class RangerSwift6ClassWriter extends RangerGenericClassWriter {
|
|
1595
2154
|
compiler?: LiveCompiler;
|
|
1596
2155
|
header_created: boolean;
|
|
2156
|
+
swift_unions_written: boolean;
|
|
1597
2157
|
constructor();
|
|
1598
2158
|
adjustType(tn: string): string;
|
|
2159
|
+
isSwiftValueTypeOf(t: number): boolean;
|
|
2160
|
+
isSwiftValueCollection(nn: CodeNode): boolean;
|
|
2161
|
+
isSwiftValueType(nn: CodeNode): boolean;
|
|
2162
|
+
paramNeedsLocalCopy(arg: RangerAppParamDesc): boolean;
|
|
2163
|
+
swiftWriteMutableParamCopies(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2164
|
+
paramNeedsInout(arg: RangerAppParamDesc): boolean;
|
|
2165
|
+
writeSwiftUnionEnums(ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2166
|
+
swiftDeclaredClassOf(nVal: CodeNode): string;
|
|
2167
|
+
swiftUnionHasMember(ucl: RangerAppClassDesc, memberName: string): boolean;
|
|
2168
|
+
swiftWriteUnionValue(targetTypeName: string, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2169
|
+
swiftWriteUnionArg(arg: RangerAppParamDesc, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1599
2170
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1600
2171
|
collectionTypeStringToSwift(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1601
2172
|
getTypeString(type_string: string): string;
|
|
@@ -1607,11 +2178,15 @@ export declare class RangerSwift6ClassWriter extends RangerGenericClassWriter {
|
|
|
1607
2178
|
writeArgsDefWithLocals(fnDesc: RangerAppFunctionDesc, localFnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1608
2179
|
resolveCallReceiverClassName(obj: CodeNode, ctx: RangerAppWriterContext): string;
|
|
1609
2180
|
isSimpleClassCallReceiver(obj: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2181
|
+
receiverIsNullable(obj: CodeNode): boolean;
|
|
2182
|
+
callResultIsDiscarded(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2183
|
+
writeSideEffectOnlyStmt(value: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1610
2184
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1611
2185
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1612
2186
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1613
2187
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1614
2188
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2189
|
+
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1615
2190
|
haveSameSig(fn1: RangerAppFunctionDesc, fn2: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
1616
2191
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1617
2192
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1623,12 +2198,21 @@ export declare class RangerCppClassWriter extends RangerGenericClassWriter {
|
|
|
1623
2198
|
header_created: boolean;
|
|
1624
2199
|
buf_ret_seen: boolean;
|
|
1625
2200
|
buf_ret_all_safe: boolean;
|
|
1626
|
-
|
|
2201
|
+
cpp_single_thread: boolean;
|
|
2202
|
+
constructor();
|
|
2203
|
+
cppPtr(inner: string): string;
|
|
2204
|
+
cppPtrOpen(): string;
|
|
2205
|
+
cppMakeOpen(): string;
|
|
2206
|
+
cppEsft(inner: string): string;
|
|
2207
|
+
readCppPtrFlag(ctx: RangerAppWriterContext): void;
|
|
2208
|
+
writeCppSingleThreadPrelude(wr: CodeWriter): void;
|
|
1627
2209
|
lineEnding(): string;
|
|
1628
2210
|
adjustType(tn: string): string;
|
|
2211
|
+
escapeCppTrigraphs(s: string): string;
|
|
1629
2212
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1630
2213
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1631
2214
|
collectionTypeStringToCpp(type_string: string, ctx: RangerAppWriterContext): string;
|
|
2215
|
+
cppUnionValueCase(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): boolean;
|
|
1632
2216
|
getTypeString2(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1633
2217
|
writePtr(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1634
2218
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1637,21 +2221,33 @@ export declare class RangerCppClassWriter extends RangerGenericClassWriter {
|
|
|
1637
2221
|
cppScanBufferReturns(node: CodeNode): void;
|
|
1638
2222
|
cppBufferReturnByRef(variant: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
1639
2223
|
writeReturnTypeDef(variant: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2224
|
+
cppSegmentIsValueCase(node: CodeNode, idx: number, ctx: RangerAppWriterContext): boolean;
|
|
1640
2225
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1641
2226
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1642
2227
|
disabledVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1643
2228
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2229
|
+
cppWriteCmpOperand(o: CodeNode, otherIsLiteral: boolean, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1644
2230
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1645
2231
|
CreateMethodCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1646
2232
|
CreatePropertyGet(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1647
2233
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1648
2234
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2235
|
+
cppIsWeakField(nn: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2236
|
+
cppProgramHasWeakField(ctx: RangerAppWriterContext): boolean;
|
|
2237
|
+
writeCppWeakHelper(wr: CodeWriter): void;
|
|
1649
2238
|
writeCppHeaderVar(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter, do_initialize: boolean): Promise<void>;
|
|
1650
2239
|
cppReadonlyValueParam(arg: RangerAppParamDesc): boolean;
|
|
2240
|
+
cppReadonlyUnionParam(arg: RangerAppParamDesc, ctx: RangerAppWriterContext): boolean;
|
|
2241
|
+
cppBorrowedObjectParam(fnDesc: RangerAppFunctionDesc, arg: RangerAppParamDesc, ctx: RangerAppWriterContext): boolean;
|
|
2242
|
+
cppNeedsCallTempCopy(fnDesc: RangerAppFunctionDesc, arg: RangerAppParamDesc, n: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1651
2243
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2244
|
+
cppCaptureByReference(vD: RangerAppParamDesc, ctx: RangerAppWriterContext): boolean;
|
|
2245
|
+
cppMutableRefParam(fnDesc: RangerAppFunctionDesc, arg: RangerAppParamDesc, ctx: RangerAppWriterContext): boolean;
|
|
1652
2246
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1653
2247
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1654
2248
|
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2249
|
+
cppUsesThisValue(body: CodeNode): Promise<boolean>;
|
|
2250
|
+
cppNeedsSharedFromThis(node: CodeNode): Promise<boolean>;
|
|
1655
2251
|
writeClassHeader(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1656
2252
|
CreateUnions(parser: RangerFlowParser, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1657
2253
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
@@ -1662,27 +2258,145 @@ export declare class MethodCallList {
|
|
|
1662
2258
|
add(methodName: string): void;
|
|
1663
2259
|
}
|
|
1664
2260
|
export declare class RangerRustClassWriter extends RangerGenericClassWriter {
|
|
2261
|
+
rust_writing_call_receiver: boolean;
|
|
2262
|
+
rust_call_receiver_mut: boolean;
|
|
2263
|
+
rust_receiver_written: boolean;
|
|
2264
|
+
rust_in_trait_decl: boolean;
|
|
2265
|
+
rust_in_weak_unwrap: boolean;
|
|
2266
|
+
rust_lhs_is_receiver: boolean;
|
|
2267
|
+
rust_writing_return_type: boolean;
|
|
2268
|
+
rust_receiverless_method: boolean;
|
|
2269
|
+
rust_receiver_mut_known: boolean;
|
|
2270
|
+
rust_emit_class_name: string;
|
|
2271
|
+
rust_receiver_shared_known: boolean;
|
|
2272
|
+
rust_prop_base_state: number;
|
|
2273
|
+
rust_recv_place_mut: boolean;
|
|
2274
|
+
rust_writing_mut_arg: boolean;
|
|
2275
|
+
rust_path_head_mut: boolean;
|
|
2276
|
+
rust_field_call_mut_ready: boolean;
|
|
2277
|
+
rust_writing_field_type: boolean;
|
|
1665
2278
|
compiler?: LiveCompiler;
|
|
1666
2279
|
thisName: string;
|
|
2280
|
+
rustFnReturnsUnion: string;
|
|
2281
|
+
rustFnReturnNameNode?: CodeNode;
|
|
1667
2282
|
fileHeaderWritten: boolean;
|
|
2283
|
+
rust_in_cell_assign: boolean;
|
|
2284
|
+
rust_last_recv_tmp: string;
|
|
2285
|
+
rust_computing_family_mut: boolean;
|
|
1668
2286
|
constructor();
|
|
1669
2287
|
lineEnding(): string;
|
|
1670
2288
|
adjustType(tn: string): string;
|
|
1671
2289
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2290
|
+
rustStaticStrRead(node: CodeNode): boolean;
|
|
2291
|
+
rustWriteStaticStrValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2292
|
+
rustTryBareStrLitArg(nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): boolean;
|
|
2293
|
+
rustArgIsNameRead(nVal: CodeNode): boolean;
|
|
2294
|
+
rustSliceRefRead(node: CodeNode): boolean;
|
|
2295
|
+
rustStrRefRead(node: CodeNode): boolean;
|
|
2296
|
+
rustLhsHoldsRc(left: CodeNode): boolean;
|
|
2297
|
+
rustValueIsBorrowedHandle(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2298
|
+
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2299
|
+
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2300
|
+
writeRustLambdaType(expression_value: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2301
|
+
rustTraitCoerceName(targetType: string, value: CodeNode, ctx: RangerAppWriterContext): string;
|
|
2302
|
+
rustArgValueTypeName(nVal: CodeNode): string;
|
|
2303
|
+
rustNodeCollectionElemType(coll: CodeNode): string;
|
|
2304
|
+
rustSelfRcTraitName(ctx: RangerAppWriterContext): string;
|
|
2305
|
+
rustTypeIsOwnHandle(type_name: string, ctx: RangerAppWriterContext): boolean;
|
|
2306
|
+
rustSharedTypeString(type_name: string, ctx: RangerAppWriterContext): string;
|
|
2307
|
+
rustSharedWeakTypeString(type_name: string, ctx: RangerAppWriterContext): string;
|
|
2308
|
+
rustIsCollectionTypeString(type_string: string): boolean;
|
|
2309
|
+
rustCollectionTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
2310
|
+
rustElementTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1672
2311
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1673
2312
|
getTypeString(type_string: string): string;
|
|
1674
2313
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2314
|
+
writeRustWeakVRefTail(node: CodeNode, p: RangerAppParamDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2315
|
+
rustMethodInTraitIface(cl: RangerAppClassDesc, name: string, ctx: RangerAppWriterContext): boolean;
|
|
2316
|
+
rustClassMethodKnownShared(cls: RangerAppClassDesc, name: string, ctx: RangerAppWriterContext): boolean;
|
|
2317
|
+
rustReceiverPathClass(fc: CodeNode, ctx: RangerAppWriterContext): RangerAppClassDesc | undefined;
|
|
2318
|
+
rustReceiverKnownShared(fc: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2319
|
+
rustReceiverKnownMut(node: CodeNode, fc: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2320
|
+
rustReceiverMutFor(node: CodeNode, fc: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2321
|
+
rustThisPrefix(ctx: RangerAppWriterContext): string;
|
|
2322
|
+
rustThisPathPrefix(ctx: RangerAppWriterContext): string;
|
|
1675
2323
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2324
|
+
writeRustFnClose(variant: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2325
|
+
writeRustReturnType(variant: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2326
|
+
rustExprReadsThrough(node: CodeNode, name: string): boolean;
|
|
2327
|
+
rustRhsReadsSharedCell(node: CodeNode): boolean;
|
|
2328
|
+
rustCollectInheritedVars(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, seen: {
|
|
2329
|
+
[key: string]: boolean;
|
|
2330
|
+
}, into: Array<RangerAppParamDesc>): void;
|
|
2331
|
+
rustAllStructVars(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): Array<RangerAppParamDesc>;
|
|
2332
|
+
writeStructFieldType(p: RangerAppParamDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2333
|
+
writeStructFieldTypeInner(p: RangerAppParamDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2334
|
+
rustSegThroughTrait(node: CodeNode, idx: number, ctx: RangerAppWriterContext): boolean;
|
|
1676
2335
|
writeStructField(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2336
|
+
rustFieldAccessorName(p: RangerAppParamDesc): string;
|
|
2337
|
+
rustFieldIsPlainString(p: RangerAppParamDesc, ctx: RangerAppWriterContext): boolean;
|
|
2338
|
+
rustFieldIsCopyScalar(p: RangerAppParamDesc, ctx: RangerAppWriterContext): boolean;
|
|
2339
|
+
writeTraitFieldAccessorDecls(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2340
|
+
writeTraitFieldAccessorImpls(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1677
2341
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2342
|
+
rustNewIntoUnion(value: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2343
|
+
rustUnionHasMember(ucl: RangerAppClassDesc, memberName: string): boolean;
|
|
2344
|
+
rustDeclaredClassOf(nVal: CodeNode): string;
|
|
2345
|
+
rustWriteUnionValue(targetTypeName: string, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2346
|
+
rustUnionReturnOf(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): string;
|
|
2347
|
+
rustUnionValueCase(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): boolean;
|
|
2348
|
+
rustArgNeedsUnionWrap(targetTypeName: string, nVal: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2349
|
+
rustWriteUnionArg(arg: RangerAppParamDesc, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2350
|
+
rustClassIsShared(typeName: string, ctx: RangerAppWriterContext): boolean;
|
|
2351
|
+
rustNeedsSelfRc(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
2352
|
+
rustEnclosingMethod(fnDesc: RangerAppFunctionDesc): RangerAppFunctionDesc;
|
|
2353
|
+
rustInitRcState(value: CodeNode, ctx: RangerAppWriterContext): number;
|
|
2354
|
+
rustSelfRcParamType(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): string;
|
|
2355
|
+
rustSelfRcCoerceTo(fc: CodeNode, fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): string;
|
|
2356
|
+
writeSelfRcReceiverArg(node: CodeNode, fc: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): boolean;
|
|
2357
|
+
writeRustReceiver(mutSelf: boolean, wr: CodeWriter): void;
|
|
2358
|
+
writeTraitForwardArgs(variant: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter, lead: boolean): void;
|
|
1678
2359
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2360
|
+
rustNodeContainsCall(node: CodeNode): boolean;
|
|
1679
2361
|
containsSelfReference(node: CodeNode): boolean;
|
|
2362
|
+
rustThisSegIsMethod(segName: string, ctx: RangerAppWriterContext): boolean;
|
|
2363
|
+
rustMethodNeedsReceiver(fnD: RangerAppFunctionDesc, body: CodeNode, useCtx: RangerAppWriterContext, ctx: RangerAppWriterContext): boolean;
|
|
2364
|
+
rustBodyGetsOwnClassHandle(node: CodeNode, useCtx: RangerAppWriterContext, ctx: RangerAppWriterContext): boolean;
|
|
2365
|
+
rustBodyGetsClassHandle(node: CodeNode, clsName: string, cl: RangerAppClassDesc): boolean;
|
|
2366
|
+
fnBodyUsesThisStruct(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1680
2367
|
fnBodyUsesThis(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1681
2368
|
accessesFieldOf(node: CodeNode, varName: string): boolean;
|
|
1682
2369
|
getArgRootVar(node: CodeNode): string;
|
|
1683
2370
|
hasMutRefConflict(node: CodeNode, fnDesc: RangerAppFunctionDesc, argIdx: number, givenArgs: CodeNode): boolean;
|
|
1684
2371
|
collectSelfMethodCalls(node: CodeNode, ctx: RangerAppWriterContext, calls: Array<string>): void;
|
|
2372
|
+
rustFieldCallMutatesThis(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2373
|
+
rustFieldPathCallMutates(fcc: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2374
|
+
rustNodeIsOwnPath(nIn: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2375
|
+
rustArgBorrowsThisMutably(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1685
2376
|
fnBodyDirectlyMutatesThis(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2377
|
+
rustCallTargetIsCollection(callObj: CodeNode): boolean;
|
|
2378
|
+
rustIsMutatingOpName(n: string): boolean;
|
|
2379
|
+
buildInheritedMutationGraph(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, directMutations: {
|
|
2380
|
+
[key: string]: boolean;
|
|
2381
|
+
}, callGraph: {
|
|
2382
|
+
[key: string]: MethodCallList;
|
|
2383
|
+
}): void;
|
|
2384
|
+
alignTraitSelfRcNeeds(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): void;
|
|
2385
|
+
rustTraitRootOf(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): RangerAppClassDesc | undefined;
|
|
2386
|
+
rustCallThroughSharedField(callObj: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2387
|
+
rustCollectPathNames(node: CodeNode, ctx: RangerAppWriterContext): void;
|
|
2388
|
+
rustFillPathFieldNames(ctx: RangerAppWriterContext): void;
|
|
2389
|
+
rustFieldCanBeCell(p: RangerAppParamDesc, ctx: RangerAppWriterContext): boolean;
|
|
2390
|
+
rustCellIsString(p: RangerAppParamDesc): boolean;
|
|
2391
|
+
rustCellIsCollection(p: RangerAppParamDesc): boolean;
|
|
2392
|
+
rustCellIsCopy(p: RangerAppParamDesc): boolean;
|
|
2393
|
+
rustCellFieldDesc(node: CodeNode): RangerAppParamDesc | undefined;
|
|
2394
|
+
rustNodeIsCellField(node: CodeNode): boolean;
|
|
2395
|
+
rustMarkInteriorCells(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): void;
|
|
2396
|
+
rustFillTraitMutations(root: RangerAppClassDesc, ctx: RangerAppWriterContext): void;
|
|
2397
|
+
markTraitIfaceMutations(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, directMutations: {
|
|
2398
|
+
[key: string]: boolean;
|
|
2399
|
+
}): void;
|
|
1686
2400
|
buildClassMutationGraph(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, directMutations: {
|
|
1687
2401
|
[key: string]: boolean;
|
|
1688
2402
|
}, callGraph: {
|
|
@@ -1699,46 +2413,134 @@ export declare class RangerRustClassWriter extends RangerGenericClassWriter {
|
|
|
1699
2413
|
[key: string]: MethodCallList;
|
|
1700
2414
|
}): boolean;
|
|
1701
2415
|
fnBodyMutatesThis(node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2416
|
+
rustExprCallNeedsSelfRc(obj: CodeNode, methodName: string, recvIsThis: boolean, ctx: RangerAppWriterContext): boolean;
|
|
1702
2417
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2418
|
+
rustBareArgNeedsClone(arg: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
1703
2419
|
CreateMethodCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1704
2420
|
isSelfMethodCall(node: CodeNode): boolean;
|
|
2421
|
+
rustCollectNestedSelfCalls(node: CodeNode, into: Array<CodeNode>): void;
|
|
1705
2422
|
findSelfCallInArgs(node: CodeNode): number;
|
|
1706
2423
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1707
2424
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1708
2425
|
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2426
|
+
writeSingletonAccessor(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1709
2427
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
2428
|
+
rustProgramHasMainFlag(ctx: RangerAppWriterContext): boolean;
|
|
2429
|
+
opWritesOwnParens(opName: string, node: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2430
|
+
rustWriteBitOperand(o: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2431
|
+
rustArgIsAlreadyRef(nVal: CodeNode): boolean;
|
|
2432
|
+
rustArgIsBareThis(nValIn: CodeNode): boolean;
|
|
2433
|
+
rustArgIsPlainMutPath(nValIn: CodeNode): boolean;
|
|
2434
|
+
rustWriteMutArgPrefix(nVal: CodeNode, wr: CodeWriter): void;
|
|
2435
|
+
rustArgIsAlreadyMutRef(nVal: CodeNode): boolean;
|
|
2436
|
+
rustWriteCmpOperand(o: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2437
|
+
rustWriteCastOperandF64(o: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2438
|
+
rustExprIsOptional(inNode: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2439
|
+
rustNodeIsLambda(node: CodeNode): boolean;
|
|
2440
|
+
CreatePropertyGet(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2441
|
+
rustUnwrapParens(node: CodeNode): CodeNode;
|
|
2442
|
+
rustCollectConcatOperands(node: CodeNode, out: Array<CodeNode>): void;
|
|
2443
|
+
rustFmtInline(o: CodeNode): boolean;
|
|
2444
|
+
rustStripToString(o: CodeNode): CodeNode;
|
|
2445
|
+
writeRustFormatOps(ops: Array<CodeNode>, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2446
|
+
rustHoistFieldReceiver(real: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2447
|
+
rustExtractSelfCallConflicts(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2448
|
+
rustTailBorrowsLocal(node: CodeNode): boolean;
|
|
2449
|
+
walkRustFnBody(fnB: CodeNode, sCtx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2450
|
+
rustPlainScalarPath(n: CodeNode): boolean;
|
|
2451
|
+
rustTryCompoundAssign(left: CodeNode, right: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2452
|
+
rustArgNeedsCellWrap(arg: RangerAppParamDesc, nVal: CodeNode, ctx: RangerAppWriterContext): boolean;
|
|
2453
|
+
rustTraitCoerceRoot(right: CodeNode, fieldTypeName: string, ctx: RangerAppWriterContext): string;
|
|
2454
|
+
rustWalkOperand(n: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2455
|
+
rustClassBlocksClone(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, depth: number): boolean;
|
|
2456
|
+
rustIsIndexedWriteOp(n: string): boolean;
|
|
2457
|
+
rustExprMentionsName(node: CodeNode, name: string): boolean;
|
|
2458
|
+
rustArgIsOutParam(node: CodeNode, idx: number): boolean;
|
|
2459
|
+
rustIsSelfCallNode(n: CodeNode): boolean;
|
|
2460
|
+
beforeOperatorStatement(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1710
2461
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1711
2462
|
}
|
|
1712
2463
|
export declare class RangerKotlinClassWriter extends RangerGenericClassWriter {
|
|
1713
2464
|
compiler?: LiveCompiler;
|
|
2465
|
+
kotlin_unions_written: boolean;
|
|
2466
|
+
kotlin_package_written: boolean;
|
|
1714
2467
|
constructor();
|
|
2468
|
+
writeKotlinUnionInterfaces(ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1715
2469
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2470
|
+
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1716
2471
|
adjustType(tn: string): string;
|
|
1717
2472
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1718
2473
|
collectionTypeStringToKotlin(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1719
2474
|
getTypeString(type_string: string): string;
|
|
2475
|
+
writeLambdaType(expression_value: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2476
|
+
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2477
|
+
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2478
|
+
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2479
|
+
EncodeString(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): string;
|
|
2480
|
+
receiverIsNullable(obj: CodeNode): boolean;
|
|
2481
|
+
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2482
|
+
namesStaticMember(cl: RangerAppClassDesc, node: CodeNode): boolean;
|
|
2483
|
+
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2484
|
+
paramEmitName(arg: RangerAppParamDesc, ctx: RangerAppWriterContext): string;
|
|
2485
|
+
paramIsMutated(arg: RangerAppParamDesc): boolean;
|
|
2486
|
+
kotlinWriteMutableParamCopies(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2487
|
+
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2488
|
+
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2489
|
+
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2490
|
+
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
2491
|
+
}
|
|
2492
|
+
export declare class RangerDartClassWriter extends RangerGenericClassWriter {
|
|
2493
|
+
compiler?: LiveCompiler;
|
|
2494
|
+
wrote_header: boolean;
|
|
2495
|
+
dart_unions_written: boolean;
|
|
2496
|
+
constructor();
|
|
2497
|
+
writeDartUnionInterfaces(ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2498
|
+
EncodeString(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): string;
|
|
2499
|
+
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2500
|
+
adjustType(tn: string): string;
|
|
2501
|
+
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
2502
|
+
collectionTypeStringToDart(type_string: string, ctx: RangerAppWriterContext): string;
|
|
2503
|
+
getTypeString(type_string: string): string;
|
|
1720
2504
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2505
|
+
namesStaticMember(cl: RangerAppClassDesc, node: CodeNode): boolean;
|
|
1721
2506
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1722
2507
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1723
2508
|
paramEmitName(arg: RangerAppParamDesc, ctx: RangerAppWriterContext): string;
|
|
1724
2509
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2510
|
+
receiverIsNullable(obj: CodeNode): boolean;
|
|
2511
|
+
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2512
|
+
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1725
2513
|
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1726
2514
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2515
|
+
writePubspec(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1727
2516
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1728
2517
|
}
|
|
1729
2518
|
export declare class RangerCSharpClassWriter extends RangerGenericClassWriter {
|
|
1730
2519
|
compiler?: LiveCompiler;
|
|
2520
|
+
csharp_unions_written: boolean;
|
|
2521
|
+
csharp_namespace_written: boolean;
|
|
2522
|
+
csLambdaArgCounter: number;
|
|
1731
2523
|
constructor();
|
|
1732
2524
|
adjustType(tn: string): string;
|
|
2525
|
+
writeCSharpUnionInterfaces(ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1733
2526
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
2527
|
+
collectionTypeStringToCS(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1734
2528
|
getTypeString(type_string: string): string;
|
|
1735
2529
|
writeLambdaType(expression_value: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2530
|
+
writeNullableMark(node: CodeNode, wr: CodeWriter): void;
|
|
1736
2531
|
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1737
2532
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2533
|
+
csNodeContainsCall(node: CodeNode): boolean;
|
|
1738
2534
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2535
|
+
renameShadowedLambdaArg(arg: CodeNode, ctx: RangerAppWriterContext): void;
|
|
1739
2536
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1740
2537
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1741
2538
|
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2539
|
+
csCollectInherited(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, vars: {
|
|
2540
|
+
[key: string]: boolean;
|
|
2541
|
+
}, methods: {
|
|
2542
|
+
[key: string]: number;
|
|
2543
|
+
}): void;
|
|
1742
2544
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1743
2545
|
}
|
|
1744
2546
|
export declare class RangerScalaClassWriter extends RangerGenericClassWriter {
|
|
@@ -1765,9 +2567,18 @@ export declare class RangerGolangClassWriter extends RangerGenericClassWriter {
|
|
|
1765
2567
|
write_raw_type: boolean;
|
|
1766
2568
|
did_write_nullable: boolean;
|
|
1767
2569
|
did_write_sseclient: boolean;
|
|
2570
|
+
go_unions_written: boolean;
|
|
1768
2571
|
httpServerWriter: RangerGolangHttpServerWriter;
|
|
1769
2572
|
constructor();
|
|
2573
|
+
writeGoUnionStructs(ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2574
|
+
goDeclaredClassOf(nVal: CodeNode): string;
|
|
2575
|
+
goUnionHasMember(ucl: RangerAppClassDesc, memberName: string): boolean;
|
|
2576
|
+
goWriteUnionValue(targetTypeName: string, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2577
|
+
goWriteUnionArg(arg: RangerAppParamDesc, nVal: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
1770
2578
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2579
|
+
isCollectionTypeString(type_string: string): boolean;
|
|
2580
|
+
collectionTypeStringToGo(type_string: string, ctx: RangerAppWriterContext): string;
|
|
2581
|
+
goElementTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1771
2582
|
getObjectTypeString(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1772
2583
|
getTypeString2(type_string: string, ctx: RangerAppWriterContext): string;
|
|
1773
2584
|
writeRawTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1777,16 +2588,19 @@ export declare class RangerGolangClassWriter extends RangerGenericClassWriter {
|
|
|
1777
2588
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1778
2589
|
WriteSetterVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1779
2590
|
goExtractAssign(value: CodeNode, p: RangerAppParamDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2591
|
+
goAncestors(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): Array<string>;
|
|
1780
2592
|
writeStructField(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1781
2593
|
CreateCallExpression(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1782
2594
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1783
2595
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2596
|
+
writeFnCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1784
2597
|
writeNewCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1785
2598
|
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1786
2599
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1787
2600
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1788
2601
|
CustomOperator(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1789
2602
|
writeInterface(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2603
|
+
writeSingletonAccessor(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1790
2604
|
writeClass(node: CodeNode, ctx: RangerAppWriterContext, orig_wr: CodeWriter): Promise<void>;
|
|
1791
2605
|
}
|
|
1792
2606
|
export declare class RangerGolangHttpServerWriter {
|
|
@@ -1832,17 +2646,30 @@ export declare class RangerPythonClassWriter extends RangerGenericClassWriter {
|
|
|
1832
2646
|
compiler?: LiveCompiler;
|
|
1833
2647
|
thisName: string;
|
|
1834
2648
|
wrote_header: boolean;
|
|
2649
|
+
pyHoistWriters: Array<CodeWriter>;
|
|
2650
|
+
pyLambdaCounter: number;
|
|
1835
2651
|
constructor();
|
|
2652
|
+
emptyBlockFiller(): string;
|
|
1836
2653
|
adjustType(tn: string): string;
|
|
1837
2654
|
EncodeString(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): string;
|
|
1838
2655
|
WriteScalarValue(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1839
2656
|
WriteVRef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2657
|
+
pyNodeContainsCall(node: CodeNode): boolean;
|
|
2658
|
+
pyWalkBody(body: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1840
2659
|
writeVarInitDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1841
2660
|
writeVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1842
2661
|
CreateMethodCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1843
2662
|
CreatePropertyGet(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1844
2663
|
CreateLambdaCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2664
|
+
pyEmittedName(n: CodeNode): string;
|
|
2665
|
+
pyCollectAssigned(node: CodeNode, assigned: {
|
|
2666
|
+
[key: string]: boolean;
|
|
2667
|
+
}, declared: {
|
|
2668
|
+
[key: string]: boolean;
|
|
2669
|
+
}): void;
|
|
1845
2670
|
CreateLambda(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2671
|
+
getPythonTypeName(node: CodeNode, ctx: RangerAppWriterContext): string;
|
|
2672
|
+
writeTypeDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
1846
2673
|
writeClassVarDef(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1847
2674
|
writeArgsDef(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
1848
2675
|
writeArrayLiteral(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
@@ -1913,9 +2740,12 @@ export declare class LowIRUtil {
|
|
|
1913
2740
|
constructor();
|
|
1914
2741
|
static typeFromRanger(typeName: string): string;
|
|
1915
2742
|
static isSupportedPrimitive(typeName: string): boolean;
|
|
2743
|
+
static looksLikeUtf8Bytes(text: string): boolean;
|
|
2744
|
+
static utf8Bytes(text: string): Array<number>;
|
|
1916
2745
|
static isStringType(typeName: string): boolean;
|
|
1917
2746
|
static isArrayTypeName(typeName: string): boolean;
|
|
1918
2747
|
static isBufferTypeName(typeName: string): boolean;
|
|
2748
|
+
static isJsonTypeName(typeName: string): boolean;
|
|
1919
2749
|
static isSupportedParam(typeName: string): boolean;
|
|
1920
2750
|
static fieldIrType(typeName: string): string;
|
|
1921
2751
|
static mangleMethod(className: string, methodName: string): string;
|
|
@@ -1969,6 +2799,11 @@ export declare class LowIRField {
|
|
|
1969
2799
|
name: string;
|
|
1970
2800
|
irType: string;
|
|
1971
2801
|
isPtrArray: boolean;
|
|
2802
|
+
isStringMap: boolean;
|
|
2803
|
+
isIntMap: boolean;
|
|
2804
|
+
isIntMapStr: boolean;
|
|
2805
|
+
isStringMapInt: boolean;
|
|
2806
|
+
isStringMapStr: boolean;
|
|
1972
2807
|
isBool: boolean;
|
|
1973
2808
|
isString: boolean;
|
|
1974
2809
|
isBuffer: boolean;
|
|
@@ -2021,6 +2856,8 @@ export declare class LowIRModule {
|
|
|
2021
2856
|
singletonClasses: Array<string>;
|
|
2022
2857
|
lambdaTableFuncs: Array<string>;
|
|
2023
2858
|
lambdaSigs: Array<string>;
|
|
2859
|
+
usesErrorMsg: boolean;
|
|
2860
|
+
bigStackMain: boolean;
|
|
2024
2861
|
constructor();
|
|
2025
2862
|
}
|
|
2026
2863
|
export declare class LowIRSession {
|
|
@@ -2037,33 +2874,40 @@ export declare class LowIRBuilder {
|
|
|
2037
2874
|
blockCounter: number;
|
|
2038
2875
|
blocks: Array<LowIRBlock>;
|
|
2039
2876
|
currentBlock?: LowIRBlock;
|
|
2877
|
+
destTypes: {
|
|
2878
|
+
[key: string]: string;
|
|
2879
|
+
};
|
|
2040
2880
|
constructor(module: LowIRModule);
|
|
2041
2881
|
freshTemp(prefix: string): string;
|
|
2042
2882
|
freshLabel(prefix: string): string;
|
|
2043
2883
|
reset(): void;
|
|
2044
2884
|
startBlock(label: string): string;
|
|
2045
2885
|
emit(instr: LowIRInstr): LowIRInstr;
|
|
2886
|
+
emittedType(value: string): string;
|
|
2046
2887
|
emitToEntry(instr: LowIRInstr): LowIRInstr;
|
|
2047
2888
|
emitConst(irType: string, value: string): string;
|
|
2048
2889
|
emitBin(kind: string, irType: string, lhs: string, rhs: string): string;
|
|
2049
2890
|
emitIcmp(pred: string, lhs: string, rhs: string): string;
|
|
2050
|
-
emitIcmpTyped(pred: string, operandType: string,
|
|
2891
|
+
emitIcmpTyped(pred: string, operandType: string, lhsIn: string, rhsIn: string): string;
|
|
2051
2892
|
emitPtrToInt(ptr: string): string;
|
|
2052
2893
|
emitCall(fnName: string, retType: string, args: Array<string>, argTypes: Array<string>): string;
|
|
2053
2894
|
emitComment(text: string): void;
|
|
2054
|
-
|
|
2895
|
+
coerceCallArgs(args: Array<string>, argTypes: Array<string>): Array<string>;
|
|
2896
|
+
emitCallWithSig(fnName: string, retType: string, callSig: string, rawArgs: Array<string>, argTypes: Array<string>): string;
|
|
2055
2897
|
emitAllocaStruct(className: string, slotName: string, fieldCount: number): string;
|
|
2056
2898
|
emitGep(className: string, structPtr: string, fieldIndex: number): string;
|
|
2057
2899
|
emitAlloca(irType: string, slotName: string): string;
|
|
2058
2900
|
emitZeroInitToEntry(irType: string, slotName: string): void;
|
|
2901
|
+
emitNullInitToEntry(irType: string, slotName: string): void;
|
|
2059
2902
|
emitLoad(irType: string, slotName: string): string;
|
|
2060
|
-
emitStore(irType: string,
|
|
2903
|
+
emitStore(irType: string, valueIn: string, slotName: string): void;
|
|
2061
2904
|
emitHeapAlloc(byteCount: string): string;
|
|
2062
|
-
emitIntToI8Ptr(addr: string,
|
|
2905
|
+
emitIntToI8Ptr(addr: string, addrTypeIn: string): string;
|
|
2063
2906
|
emitIntToStructPtr(className: string, addr: string): string;
|
|
2064
|
-
emitCast(castOp: string, destType: string,
|
|
2907
|
+
emitCast(castOp: string, destType: string, srcTypeIn: string, value: string): string;
|
|
2065
2908
|
emitZextI1ToI32(v: string): string;
|
|
2066
2909
|
emitZextI32ToPtr(v: string): string;
|
|
2910
|
+
addrWidthOf(ptr: string): string;
|
|
2067
2911
|
emitPtrLoad(ptr: string): string;
|
|
2068
2912
|
emitPtrLoadTyped(ptr: string, valueType: string): string;
|
|
2069
2913
|
emitPtrStore(ptr: string, value: string): void;
|
|
@@ -2075,14 +2919,18 @@ export declare class LowIRBuilder {
|
|
|
2075
2919
|
emitGlobalGet(name: string): string;
|
|
2076
2920
|
emitGlobalSet(name: string, value: string): void;
|
|
2077
2921
|
emitFuncRef(name: string): string;
|
|
2078
|
-
emitCallIndirect(retType: string, callSig: string,
|
|
2922
|
+
emitCallIndirect(retType: string, callSig: string, rawArgs: Array<string>, argTypes: Array<string>, selector: string): string;
|
|
2079
2923
|
emitI32At(base: string, byteOff: number): string;
|
|
2080
2924
|
emitStoreI32At(base: string, byteOff: number, value: string): void;
|
|
2925
|
+
emitStoreTypedAt(base: string, byteOff: number, value: string, valueType: string): void;
|
|
2926
|
+
emitLoadTypedAt(base: string, byteOff: number, valueType: string): string;
|
|
2081
2927
|
emitLoadI32At(base: string, byteOff: number): string;
|
|
2082
2928
|
emitStrPtr(globalName: string, byteLen: number): string;
|
|
2083
2929
|
emitTypeDescPtr(className: string): string;
|
|
2084
2930
|
terminateRet(retType: string, value: string): void;
|
|
2085
2931
|
terminateBr(target: string): void;
|
|
2932
|
+
coerceTo(v: string, want: string): string;
|
|
2933
|
+
asI1(v: string): string;
|
|
2086
2934
|
terminateBrIf(cond: string, ifTrue: string, ifFalse: string): void;
|
|
2087
2935
|
terminateUnreachable(): void;
|
|
2088
2936
|
finishFunction(name: string, retType: string, params: Array<LowIRParam>, exportFn: boolean, isMain: boolean): string;
|
|
@@ -2120,6 +2968,7 @@ export declare class LowIRRuntimeGen {
|
|
|
2120
2968
|
static ptrBytes(module: LowIRModule): number;
|
|
2121
2969
|
static descMetaOff(module: LowIRModule): number;
|
|
2122
2970
|
static ensurePtrArrayRuntime(module: LowIRModule): void;
|
|
2971
|
+
static buildRtPtrArrayReserve(module: LowIRModule): void;
|
|
2123
2972
|
static buildRtPtrArrayNew(module: LowIRModule): void;
|
|
2124
2973
|
static buildRtPtrArrayLen(module: LowIRModule): void;
|
|
2125
2974
|
static buildRtPtrArrayGet(module: LowIRModule): void;
|
|
@@ -2151,6 +3000,17 @@ export declare class LowIRLowerContext {
|
|
|
2151
3000
|
slots: {
|
|
2152
3001
|
[key: string]: string;
|
|
2153
3002
|
};
|
|
3003
|
+
paramNames: Array<string>;
|
|
3004
|
+
capturedNames: Array<string>;
|
|
3005
|
+
shadowStack: Array<string>;
|
|
3006
|
+
shadowCounter: number;
|
|
3007
|
+
forceFreshSlots: Array<string>;
|
|
3008
|
+
reslotNames: Array<string>;
|
|
3009
|
+
reslotPrevSlots: Array<string>;
|
|
3010
|
+
reslotPrevTypes: Array<string>;
|
|
3011
|
+
reslotOwnedStr: Array<number>;
|
|
3012
|
+
reslotOwnedObj: Array<number>;
|
|
3013
|
+
reslotOwnedColl: Array<number>;
|
|
2154
3014
|
slotTypes: {
|
|
2155
3015
|
[key: string]: string;
|
|
2156
3016
|
};
|
|
@@ -2163,6 +3023,12 @@ export declare class LowIRLowerContext {
|
|
|
2163
3023
|
ptrArrayElemTypes: {
|
|
2164
3024
|
[key: string]: string;
|
|
2165
3025
|
};
|
|
3026
|
+
smapValueTypes: {
|
|
3027
|
+
[key: string]: string;
|
|
3028
|
+
};
|
|
3029
|
+
imapValueTypes: {
|
|
3030
|
+
[key: string]: string;
|
|
3031
|
+
};
|
|
2166
3032
|
ownedObjectLocals: Array<string>;
|
|
2167
3033
|
ownedCollectionLocals: Array<string>;
|
|
2168
3034
|
ownedStringLocals: Array<string>;
|
|
@@ -2174,6 +3040,9 @@ export declare class LowIRLowerContext {
|
|
|
2174
3040
|
boxedLocals: {
|
|
2175
3041
|
[key: string]: number;
|
|
2176
3042
|
};
|
|
3043
|
+
boxedTypes: {
|
|
3044
|
+
[key: string]: string;
|
|
3045
|
+
};
|
|
2177
3046
|
escapedLocals: {
|
|
2178
3047
|
[key: string]: string;
|
|
2179
3048
|
};
|
|
@@ -2181,6 +3050,12 @@ export declare class LowIRLowerContext {
|
|
|
2181
3050
|
llvmRetType: string;
|
|
2182
3051
|
className: string;
|
|
2183
3052
|
selfPtr: string;
|
|
3053
|
+
breakLabel: string;
|
|
3054
|
+
continueLabel: string;
|
|
3055
|
+
catchLabel: string;
|
|
3056
|
+
loopOwnedMark: number;
|
|
3057
|
+
loopOwnedStrMark: number;
|
|
3058
|
+
loopOwnedCollMark: number;
|
|
2184
3059
|
constructor();
|
|
2185
3060
|
}
|
|
2186
3061
|
export declare class LambdaCaptureInfo {
|
|
@@ -2188,10 +3063,17 @@ export declare class LambdaCaptureInfo {
|
|
|
2188
3063
|
irTypes: Array<string>;
|
|
2189
3064
|
kinds: Array<number>;
|
|
2190
3065
|
objClasses: Array<string>;
|
|
3066
|
+
boxTypes: Array<string>;
|
|
3067
|
+
collKinds: Array<string>;
|
|
3068
|
+
elemTypes: Array<string>;
|
|
3069
|
+
smapValTypes: Array<string>;
|
|
2191
3070
|
offsets: Array<number>;
|
|
2192
3071
|
totalBytes: number;
|
|
2193
3072
|
hasOwned: boolean;
|
|
2194
3073
|
tdName: string;
|
|
3074
|
+
capturesSelf: boolean;
|
|
3075
|
+
selfOffset: number;
|
|
3076
|
+
selfClass: string;
|
|
2195
3077
|
constructor();
|
|
2196
3078
|
}
|
|
2197
3079
|
export declare class LowIRBuilderPass {
|
|
@@ -2200,6 +3082,7 @@ export declare class LowIRBuilderPass {
|
|
|
2200
3082
|
usedArrayRuntime: boolean;
|
|
2201
3083
|
usedPtrArrayRuntime: boolean;
|
|
2202
3084
|
usedMemRuntime: boolean;
|
|
3085
|
+
exprRecvPtr: string;
|
|
2203
3086
|
lambdaSigMap: {
|
|
2204
3087
|
[key: string]: string;
|
|
2205
3088
|
};
|
|
@@ -2207,13 +3090,31 @@ export declare class LowIRBuilderPass {
|
|
|
2207
3090
|
[key: string]: RangerAppFunctionDesc;
|
|
2208
3091
|
};
|
|
2209
3092
|
lambdaNames: Array<string>;
|
|
3093
|
+
lambdaDepths: {
|
|
3094
|
+
[key: string]: number;
|
|
3095
|
+
};
|
|
2210
3096
|
lambdaCounter: number;
|
|
2211
3097
|
lambdaCaptures: {
|
|
2212
3098
|
[key: string]: LambdaCaptureInfo;
|
|
2213
3099
|
};
|
|
3100
|
+
virtualKeys: Array<string>;
|
|
3101
|
+
virtualIsKey: {
|
|
3102
|
+
[key: string]: boolean;
|
|
3103
|
+
};
|
|
3104
|
+
virtualCases: {
|
|
3105
|
+
[key: string]: Array<string>;
|
|
3106
|
+
};
|
|
3107
|
+
virtualImplOf: {
|
|
3108
|
+
[key: string]: string;
|
|
3109
|
+
};
|
|
3110
|
+
virtualDescOf: {
|
|
3111
|
+
[key: string]: RangerAppFunctionDesc;
|
|
3112
|
+
};
|
|
3113
|
+
appRoot?: RangerAppWriterContext;
|
|
2214
3114
|
constructor();
|
|
2215
3115
|
isLambdaTypeNode(node: CodeNode): boolean;
|
|
2216
3116
|
canLowerFunction(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
3117
|
+
isKeywordMarkerParam(p: RangerAppParamDesc): boolean;
|
|
2217
3118
|
canLowerMethod(fnDesc: RangerAppFunctionDesc): boolean;
|
|
2218
3119
|
canLowerInstanceMethod(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
2219
3120
|
isMainEntry(fnDesc: RangerAppFunctionDesc, ctx: RangerAppWriterContext): boolean;
|
|
@@ -2225,11 +3126,14 @@ export declare class LowIRBuilderPass {
|
|
|
2225
3126
|
ensureMemExtern(target: LowIRTarget): void;
|
|
2226
3127
|
memEnabled(lctx: LowIRLowerContext): boolean;
|
|
2227
3128
|
objRcEnabled(lctx: LowIRLowerContext): boolean;
|
|
3129
|
+
strRcEnabled(lctx: LowIRLowerContext): boolean;
|
|
2228
3130
|
wasmStrEnabled(lctx: LowIRLowerContext): boolean;
|
|
2229
3131
|
isLowerableParamType(typeName: string): boolean;
|
|
3132
|
+
isEnumTypeName(typeName: string): boolean;
|
|
2230
3133
|
llvmTypeForRanger(typeName: string, ptrType: string): string;
|
|
2231
3134
|
varTypeName(nameNode: CodeNode): string;
|
|
2232
3135
|
exprIsObjectPtr(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3136
|
+
isRefCountedObjectType(typeName: string): boolean;
|
|
2233
3137
|
isObjectTypeName(typeName: string): boolean;
|
|
2234
3138
|
exprIsString(node: CodeNode): boolean;
|
|
2235
3139
|
exprMightBeString(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
@@ -2260,10 +3164,15 @@ export declare class LowIRBuilderPass {
|
|
|
2260
3164
|
lowerShellArgCnt(lctx: LowIRLowerContext): string;
|
|
2261
3165
|
lowerShellArg(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2262
3166
|
lowerReadFile(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3167
|
+
lowerCreateDir(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3168
|
+
lowerWriteFile(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3169
|
+
lowerNullify(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2263
3170
|
lowerBufferAlloc(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3171
|
+
emitPtrArrayLenOrBufferLen(bufVal: string, lctx: LowIRLowerContext): string;
|
|
2264
3172
|
lowerBufferLength(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2265
3173
|
lowerBufferGet(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2266
3174
|
lowerBufferSet(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3175
|
+
lowerBufferFill(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2267
3176
|
lowerBufferReadFile(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2268
3177
|
lowerBufferWriteFile(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2269
3178
|
lowerIntBufferAlloc(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
@@ -2272,7 +3181,10 @@ export declare class LowIRBuilderPass {
|
|
|
2272
3181
|
exprIsF64(node: CodeNode): boolean;
|
|
2273
3182
|
promoteToF64(node: CodeNode, val: string, lctx: LowIRLowerContext): string;
|
|
2274
3183
|
lowerToDouble(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3184
|
+
emitDoubleToString(value: string, lctx: LowIRLowerContext): string;
|
|
3185
|
+
emitLibmCall(fnName: string, value: string, lctx: LowIRLowerContext): string;
|
|
2275
3186
|
lowerToInt(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3187
|
+
lowerFloor(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2276
3188
|
lowerStr2Double(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2277
3189
|
lowerStr2Int(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2278
3190
|
lowerIntBufferFill(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
@@ -2284,19 +3196,89 @@ export declare class LowIRBuilderPass {
|
|
|
2284
3196
|
lowerPtrIsNull(ptr: string, lctx: LowIRLowerContext): string;
|
|
2285
3197
|
lowerPtrIsNotNull(ptr: string, lctx: LowIRLowerContext): string;
|
|
2286
3198
|
loadArrayDescExpr(arrNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
3199
|
+
exprIsPtrSizedRead(rawNode: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3200
|
+
pushValueNeedsWiden(itemNode: CodeNode, value: string, lctx: LowIRLowerContext): boolean;
|
|
2287
3201
|
pushItemNeedsWiden(itemNode: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2288
3202
|
arrayElemTypeName(arrNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
3203
|
+
nodeIsArrayExpr(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3204
|
+
lowerArrayIndexOf(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3205
|
+
isArrayLiteralValue(nameNode: CodeNode, val: CodeNode): boolean;
|
|
3206
|
+
isArrayLiteralShape(val: CodeNode): boolean;
|
|
3207
|
+
arrayElemTypeOfTypeName(typeName: string): string;
|
|
3208
|
+
arrayLiteralElemType(nameNode: CodeNode, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3209
|
+
lowerArrayLiteral(nameNode: CodeNode, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3210
|
+
lowerArrayLiteralTyped(elemType: string, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2289
3211
|
lowerPush(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3212
|
+
lowerForMap(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2290
3213
|
lowerFor(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2291
3214
|
emitStrcmpEq(lhs: string, rhs: string, ctx: LowIRLowerContext): string;
|
|
3215
|
+
propertyReadClass(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3216
|
+
isPropertyReadNode(node: CodeNode): boolean;
|
|
3217
|
+
lowerPropertyRead(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3218
|
+
isLibmUnaryOp(op: string): boolean;
|
|
3219
|
+
isLibmBinaryOp(op: string): boolean;
|
|
3220
|
+
lowerLibmUnary(fnName: string, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3221
|
+
lowerLibmBinary(fnName: string, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2292
3222
|
lowerToString(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2293
3223
|
lowerStrFromCode(node: CodeNode, fnName: string, lctx: LowIRLowerContext): string;
|
|
3224
|
+
lowerStrlenOn(textNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
3225
|
+
unwrapUnwrapOper(node: CodeNode): CodeNode;
|
|
2294
3226
|
lowerStrlen(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2295
3227
|
isIntArrayTypeNode(node: CodeNode): boolean;
|
|
3228
|
+
isIntKeyValueMapTypeNode(node: CodeNode): boolean;
|
|
3229
|
+
ensureIMapExterns(): void;
|
|
3230
|
+
widenToI64(val: string, keyNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
3231
|
+
emitIMapCall(fnName: string, retType: string, desc: string, rest: Array<string>, restTypes: Array<string>, lctx: LowIRLowerContext): string;
|
|
3232
|
+
imapDescFromVref(vref: string, lctx: LowIRLowerContext): string;
|
|
3233
|
+
imapValueKind(vref: string, lctx: LowIRLowerContext): string;
|
|
3234
|
+
imapValueOwnKind(typeName: string): number;
|
|
2296
3235
|
isIntIntMapTypeNode(node: CodeNode): boolean;
|
|
3236
|
+
ensureSMapExterns(): void;
|
|
3237
|
+
emitSMapNew(lctx: LowIRLowerContext): string;
|
|
3238
|
+
emitSMapNewKind(valKind: number, lctx: LowIRLowerContext): string;
|
|
3239
|
+
smapValueOwnKind(valueTypeName: string): number;
|
|
3240
|
+
emitSMapCall(fnName: string, retType: string, descIn: string, rest: Array<string>, restTypes: Array<string>, lctx: LowIRLowerContext): string;
|
|
3241
|
+
lowerSMapKeys(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3242
|
+
lowerEnumRef(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3243
|
+
jsonTypeNameOfNode(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3244
|
+
nodeIsJson(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3245
|
+
jsonValueKind(valNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
3246
|
+
ensureJsonExtern(fnName: string, retType: string, params: Array<string>): void;
|
|
3247
|
+
emitAnsiConst(code: string, lctx: LowIRLowerContext): string;
|
|
3248
|
+
tryLowerAnsi(opName: string, lctx: LowIRLowerContext): string;
|
|
3249
|
+
emitJsonCall(fnName: string, retType: string, args: Array<string>, argTypes: Array<string>, cParams: Array<string>, lctx: LowIRLowerContext): string;
|
|
3250
|
+
lowerJsonNew(fnName: string, lctx: LowIRLowerContext): string;
|
|
3251
|
+
lowerJsonGet(node: CodeNode, fnName: string, retIr: string, cRet: string, lctx: LowIRLowerContext): string;
|
|
3252
|
+
lowerJsonSet(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3253
|
+
lowerJsonPush(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3254
|
+
lowerJson1(node: CodeNode, fnName: string, cRet: string, lctx: LowIRLowerContext): string;
|
|
3255
|
+
lowerJsonGetValue(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3256
|
+
jsonCaseKindFor(typeName: string): number;
|
|
3257
|
+
lowerJsonCase(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3258
|
+
lowerArraySort(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3259
|
+
lowerArrayInsert(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3260
|
+
emitArrayRemoveCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3261
|
+
lowerArrayRemove(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3262
|
+
lowerArrayRemoveLast(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3263
|
+
lowerArrayClear(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3264
|
+
lowerArrayExtract(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3265
|
+
lowerTernary(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3266
|
+
lowerArrayReverse(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3267
|
+
toI1(v: string, lctx: LowIRLowerContext): string;
|
|
3268
|
+
lowerStr2Fn(node: CodeNode, fnName: string, retType: string, lctx: LowIRLowerContext): string;
|
|
3269
|
+
lowerStr3Fn(node: CodeNode, fnName: string, lctx: LowIRLowerContext): string;
|
|
3270
|
+
lowerStr2IntFn(node: CodeNode, fnName: string, retType: string, lctx: LowIRLowerContext): string;
|
|
3271
|
+
lowerStr1IntFn(node: CodeNode, fnName: string, retType: string, lctx: LowIRLowerContext): string;
|
|
3272
|
+
lowerStr0Fn(fnName: string, lctx: LowIRLowerContext): string;
|
|
3273
|
+
lowerStr1Fn(node: CodeNode, fnName: string, lctx: LowIRLowerContext): string;
|
|
3274
|
+
isStringKeyMapTypeNode(node: CodeNode): boolean;
|
|
2297
3275
|
isObjectPtrArrayTypeNode(node: CodeNode): boolean;
|
|
3276
|
+
isPlainValueArrayTypeNode(node: CodeNode): boolean;
|
|
3277
|
+
isDoubleArrayTypeNode(node: CodeNode): boolean;
|
|
3278
|
+
arrayElemIsDouble(arrNode: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2298
3279
|
isStringArrayTypeNode(node: CodeNode): boolean;
|
|
2299
3280
|
emitPtrArrayNewEmpty(lctx: LowIRLowerContext, elemKind: number): string;
|
|
3281
|
+
isOwnedCollectionLocal(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2300
3282
|
bindPtrArraySlot(varName: string, desc: string, lctx: LowIRLowerContext, owned: boolean): void;
|
|
2301
3283
|
wasmCollectionRcEnabled(lctx: LowIRLowerContext): boolean;
|
|
2302
3284
|
collectionKind(varName: string, lctx: LowIRLowerContext): string;
|
|
@@ -2321,14 +3303,30 @@ export declare class LowIRBuilderPass {
|
|
|
2321
3303
|
lowerCollectionLen(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2322
3304
|
lowerCollectionHas(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2323
3305
|
lowerCollectionSet(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3306
|
+
collectStructVars(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): Array<RangerAppParamDesc>;
|
|
3307
|
+
collectStructVarsInto(cl: RangerAppClassDesc, ctx: RangerAppWriterContext, out: Array<RangerAppParamDesc>, seen: {
|
|
3308
|
+
[key: string]: boolean;
|
|
3309
|
+
}, depth: number): void;
|
|
2324
3310
|
lowerStruct(cl: RangerAppClassDesc, ctx: RangerAppWriterContext): void;
|
|
2325
3311
|
lowerTypeDesc(st: LowIRStruct, target: LowIRTarget): void;
|
|
2326
3312
|
fieldByteOffset(className: string, fieldIndex: number, module: LowIRModule): number;
|
|
3313
|
+
shadowBind(varName: string, irType: string, value: string, lctx: LowIRLowerContext): string;
|
|
3314
|
+
restoreShadow(varName: string, prev: string, lctx: LowIRLowerContext): void;
|
|
3315
|
+
takeForceFresh(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2327
3316
|
bindSlot(varName: string, irType: string, value: string, lctx: LowIRLowerContext): void;
|
|
2328
3317
|
loadSlot(varName: string, irType: string, lctx: LowIRLowerContext): string;
|
|
3318
|
+
loadSlotRaw(varName: string, irType: string, lctx: LowIRLowerContext): string;
|
|
3319
|
+
isParamName(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2329
3320
|
fieldIrTypeFor(className: string, fieldName: string): string;
|
|
2330
3321
|
fieldIsPtrArraySlot(className: string, fieldName: string): boolean;
|
|
2331
3322
|
fieldIsObjectSlot(className: string, fieldName: string): boolean;
|
|
3323
|
+
strKeyPtr(keyNode: CodeNode, key: string, lctx: LowIRLowerContext): string;
|
|
3324
|
+
smapDescFromVref(vref: string, lctx: LowIRLowerContext): string;
|
|
3325
|
+
isStringMapVref(vref: string, lctx: LowIRLowerContext): boolean;
|
|
3326
|
+
smapValueKind(vref: string, lctx: LowIRLowerContext): string;
|
|
3327
|
+
smapValueIsInt(vref: string, lctx: LowIRLowerContext): boolean;
|
|
3328
|
+
fieldIsIntMapSlot(className: string, fieldName: string): boolean;
|
|
3329
|
+
fieldIsStringMapSlot(className: string, fieldName: string): boolean;
|
|
2332
3330
|
fieldIsStringSlot(className: string, fieldName: string): boolean;
|
|
2333
3331
|
fieldIsBufferSlot(className: string, fieldName: string): boolean;
|
|
2334
3332
|
fieldIsBoolSlot(className: string, fieldName: string): boolean;
|
|
@@ -2342,6 +3340,12 @@ export declare class LowIRBuilderPass {
|
|
|
2342
3340
|
emitPtrArrayElemSet(desc: string, idx: string, val: string, arrNode: CodeNode, lctx: LowIRLowerContext): void;
|
|
2343
3341
|
emitFieldLoadOn(className: string, structPtr: string, fieldName: string, lctx: LowIRLowerContext): string;
|
|
2344
3342
|
emitReleaseFieldValue(className: string, fieldName: string, rawVal: string, lctx: LowIRLowerContext): void;
|
|
3343
|
+
exprCarriesFreshRef(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3344
|
+
exprIsBorrowedPtrArrayRef(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3345
|
+
retainAliasedArray(valNode: CodeNode, desc: string, lctx: LowIRLowerContext): void;
|
|
3346
|
+
isBorrowedArrayExpr(valNode: CodeNode): boolean;
|
|
3347
|
+
emitSMapRetain(desc: string, lctx: LowIRLowerContext): void;
|
|
3348
|
+
emitPtrArrayRetain(desc: string, lctx: LowIRLowerContext): void;
|
|
2345
3349
|
emitFieldStoreOn(className: string, structPtr: string, fieldName: string, value: string, lctx: LowIRLowerContext): void;
|
|
2346
3350
|
emitFieldStoreOnEx(className: string, structPtr: string, fieldName: string, value: string, srcIsFresh: boolean, lctx: LowIRLowerContext): void;
|
|
2347
3351
|
emitObjRetainPtr(ptr: string, lctx: LowIRLowerContext): void;
|
|
@@ -2364,26 +3368,43 @@ export declare class LowIRBuilderPass {
|
|
|
2364
3368
|
initArrayFieldsInConstructor(className: string, lctx: LowIRLowerContext): void;
|
|
2365
3369
|
structByteSize(className: string, module: LowIRModule): number;
|
|
2366
3370
|
classHasOwnedFields(className: string): boolean;
|
|
2367
|
-
|
|
3371
|
+
newArgListOf(argsNode: CodeNode): CodeNode;
|
|
3372
|
+
lowerNewObject(className: string, argsNodeIn: CodeNode, lctx: LowIRLowerContext): string;
|
|
2368
3373
|
findFieldIndex(className: string, fieldName: string, module: LowIRModule): number;
|
|
3374
|
+
resolvesToField(fieldName: string, lctx: LowIRLowerContext): boolean;
|
|
3375
|
+
isRealConstructor(fnDesc: RangerAppFunctionDesc, className: string, appCtx: RangerAppWriterContext): boolean;
|
|
2369
3376
|
isClassField(fieldName: string, className: string, module: LowIRModule): boolean;
|
|
2370
3377
|
structFieldCount(className: string, module: LowIRModule): number;
|
|
2371
3378
|
lowerFunction(fnDesc: RangerAppFunctionDesc, className: string, appCtx: RangerAppWriterContext, exportFn: boolean, isMain: boolean, isInstance: boolean): void;
|
|
2372
3379
|
lowerSingletonAccessor(cl: RangerAppClassDesc, appCtx: RangerAppWriterContext): void;
|
|
2373
3380
|
collectLambdas(appCtx: RangerAppWriterContext): void;
|
|
2374
3381
|
collectMethodLambdas(m: RangerAppFunctionDesc, pt: string): void;
|
|
3382
|
+
collectMethodLambdasAt(m: RangerAppFunctionDesc, pt: string, depth: number): void;
|
|
2375
3383
|
lambdaCallSig(lam: RangerAppFunctionDesc, pt: string): string;
|
|
2376
3384
|
addLambdaSig(sig: string): void;
|
|
2377
3385
|
lowerLambdaBodies(appCtx: RangerAppWriterContext): void;
|
|
2378
3386
|
lowerLambdaFunction(lam: RangerAppFunctionDesc, fnName: string, appCtx: RangerAppWriterContext): void;
|
|
2379
3387
|
lambdaTableIndex(name: string): number;
|
|
2380
3388
|
nodeAssignsToName(node: CodeNode, name: string): boolean;
|
|
3389
|
+
boxedCellType(varName: string, lctx: LowIRLowerContext): string;
|
|
3390
|
+
emitBoxCell(lctx: LowIRLowerContext): string;
|
|
3391
|
+
boxInitValue(irType: string, value: string, lctx: LowIRLowerContext): string;
|
|
3392
|
+
bindBoxedLocal(varName: string, irType: string, value: string, lctx: LowIRLowerContext): void;
|
|
3393
|
+
isBoxableIrType(irType: string): boolean;
|
|
3394
|
+
boxedStorageType(logicalType: string): string;
|
|
3395
|
+
widenForBoxCell(value: string, logicalType: string, lctx: LowIRLowerContext): string;
|
|
3396
|
+
emitBoxCellSized(lctx: LowIRLowerContext, byteSize: number): string;
|
|
2381
3397
|
computeBoxedCandidates(fnDesc: RangerAppFunctionDesc, lctx: LowIRLowerContext): void;
|
|
2382
3398
|
collectBoxedCandidates(m: RangerAppFunctionDesc, lctx: LowIRLowerContext): void;
|
|
3399
|
+
irTypeBytes(irType: string, lctx: LowIRLowerContext): number;
|
|
3400
|
+
lambdaOwnerClass(lam: RangerAppFunctionDesc, depth: number): string;
|
|
3401
|
+
lambdaCaptureNames(node: CodeNode, lam: RangerAppFunctionDesc): Array<string>;
|
|
3402
|
+
nestedCaptureNames(lam: RangerAppFunctionDesc, depth: number): Array<string>;
|
|
2383
3403
|
computeLambdaCaptures(node: CodeNode, lam: RangerAppFunctionDesc, lctx: LowIRLowerContext): LambdaCaptureInfo;
|
|
2384
3404
|
lowerLambdaValue(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2385
3405
|
lowerLambdaCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2386
3406
|
isOwnedObjectLocal(varName: string, lctx: LowIRLowerContext): boolean;
|
|
3407
|
+
slotHoldsObject(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2387
3408
|
releaseOwnedLocal(varName: string, lctx: LowIRLowerContext): void;
|
|
2388
3409
|
isOwnedStringLocal(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2389
3410
|
registerFreshStringTemp(tmp: string, lctx: LowIRLowerContext): void;
|
|
@@ -2396,15 +3417,25 @@ export declare class LowIRBuilderPass {
|
|
|
2396
3417
|
releaseOwnedString(varName: string, lctx: LowIRLowerContext): void;
|
|
2397
3418
|
releaseOwnedCollectionLocal(varName: string, lctx: LowIRLowerContext): void;
|
|
2398
3419
|
emitOwnedStringInit(varName: string, valNode: CodeNode, strPtr: string, lctx: LowIRLowerContext): string;
|
|
3420
|
+
isCapturedName(varName: string, lctx: LowIRLowerContext): boolean;
|
|
2399
3421
|
emitOwnedStringReassign(varName: string, valNode: CodeNode, strPtr: string, lctx: LowIRLowerContext): string;
|
|
2400
3422
|
strictOwnershipEnabled(lctx: LowIRLowerContext): boolean;
|
|
2401
3423
|
emitOwnershipSummary(lctx: LowIRLowerContext): void;
|
|
2402
3424
|
emitReleaseOwnedLocals(lctx: LowIRLowerContext): void;
|
|
3425
|
+
withoutName(names: Array<string>, varName: string): Array<string>;
|
|
3426
|
+
popReslots(mark: number, lctx: LowIRLowerContext): void;
|
|
2403
3427
|
lowerBlock(block: CodeNode, lctx: LowIRLowerContext): void;
|
|
3428
|
+
blockClosed(lctx: LowIRLowerContext): boolean;
|
|
3429
|
+
lowerStmtList(stmts: Array<CodeNode>, lctx: LowIRLowerContext): void;
|
|
3430
|
+
lowerBlockBody(block: CodeNode, lctx: LowIRLowerContext): void;
|
|
2404
3431
|
isAssignNode(node: CodeNode): boolean;
|
|
2405
3432
|
lowerStmt(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2406
3433
|
lowerStmtDispatch(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3434
|
+
declaredIrTypeOf(nameNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
3435
|
+
noteRedeclaration(varName: string, nameNode: CodeNode, lctx: LowIRLowerContext): void;
|
|
2407
3436
|
lowerVarDef(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3437
|
+
lowerVarDefBody(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3438
|
+
exprIsI64Operator(node: CodeNode): boolean;
|
|
2408
3439
|
assignTargetFieldClass(varName: string, lctx: LowIRLowerContext): string;
|
|
2409
3440
|
lowerAssign(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2410
3441
|
lowerReturn(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
@@ -2413,9 +3444,26 @@ export declare class LowIRBuilderPass {
|
|
|
2413
3444
|
unwrapCondExpr(node: CodeNode): CodeNode;
|
|
2414
3445
|
exprProducesI1(node: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
2415
3446
|
condVref(node: CodeNode): string;
|
|
3447
|
+
lowerCondOperand(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2416
3448
|
lowerCond(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3449
|
+
emitSwitchCaseTest(subj: string, subjNode: CodeNode, caseNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
3450
|
+
emitStrOrDefault(value: string, fallback: string, lctx: LowIRLowerContext): string;
|
|
3451
|
+
lowerThrow(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3452
|
+
emptyStrList(): Array<string>;
|
|
3453
|
+
lowerTry(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3454
|
+
guardUnwrapInTry(value: string, lctx: LowIRLowerContext): void;
|
|
3455
|
+
lowerSwitch(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3456
|
+
shapeCaseClassName(itemNode: CodeNode): string;
|
|
3457
|
+
moduleHasTypeDesc(className: string): boolean;
|
|
3458
|
+
emitShapeKindTest(val: string, caseClass: string, lctx: LowIRLowerContext): string;
|
|
3459
|
+
lowerShapeIs(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3460
|
+
lowerShapeCase(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
2417
3461
|
lowerIf(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3462
|
+
emitLoopBodyReleases(lctx: LowIRLowerContext): void;
|
|
3463
|
+
lowerLoopJump(target: string, lctx: LowIRLowerContext): void;
|
|
2418
3464
|
lowerWhile(node: CodeNode, lctx: LowIRLowerContext): void;
|
|
3465
|
+
releaseAndClearOwnedLocal(varName: string, lctx: LowIRLowerContext): void;
|
|
3466
|
+
releaseAndClearOwnedCollection(varName: string, lctx: LowIRLowerContext): void;
|
|
2419
3467
|
releaseLoopBodyOwned(ownedBefore: number, ownedStrBefore: number, ownedCollBefore: number, lctx: LowIRLowerContext): void;
|
|
2420
3468
|
lowerExpr(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2421
3469
|
operatorReturnsString(op: string): boolean;
|
|
@@ -2425,20 +3473,40 @@ export declare class LowIRBuilderPass {
|
|
|
2425
3473
|
lowerCompareI32(aNode: CodeNode, bNode: CodeNode, pred: string, lctx: LowIRLowerContext): string;
|
|
2426
3474
|
lowerArithF64OrI32(intKind: string, fpKind: string, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2427
3475
|
lowerBinaryOp(opName: string, node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3476
|
+
lowerShortCircuit(node: CodeNode, isAnd: boolean, lctx: LowIRLowerContext): string;
|
|
2428
3477
|
tryLowerIntrinsic(fnName: string, argsNode: CodeNode, lctx: LowIRLowerContext): string;
|
|
2429
3478
|
finishObjectCall(rv: string): string;
|
|
2430
3479
|
lowerCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3480
|
+
exprRecvClassName(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2431
3481
|
tryLowerObjectCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
2432
3482
|
fieldReceiverClass(recvName: string, lctx: LowIRLowerContext): string;
|
|
2433
3483
|
callArgsNode(node: CodeNode): CodeNode;
|
|
2434
3484
|
resolveMethodName(node: CodeNode, defaultName: string): string;
|
|
2435
3485
|
argIrType(arg: CodeNode, lctx: LowIRLowerContext): string;
|
|
3486
|
+
lowerCallArgValue(arg: CodeNode, paramIndex: number, fnDesc: RangerAppFunctionDesc, lctx: LowIRLowerContext): string;
|
|
2436
3487
|
paramIrTypeFromDesc(paramIndex: number, fnDesc: RangerAppFunctionDesc, lctx: LowIRLowerContext): string;
|
|
3488
|
+
coerceArg(value: string, wantType: string, lctx: LowIRLowerContext): string;
|
|
3489
|
+
methodOwnerClass(className: string, methodName: string, lctx: LowIRLowerContext): string;
|
|
3490
|
+
methodOwnerClassIn(className: string, methodName: string, appCtx: RangerAppWriterContext, depth: number): string;
|
|
3491
|
+
virtualKeyOf(className: string, methodName: string): string;
|
|
3492
|
+
topmostDeclaringClass(className: string, methodName: string, appCtx: RangerAppWriterContext, depth: number): string;
|
|
3493
|
+
classIsLowered(cl: RangerAppClassDesc): boolean;
|
|
3494
|
+
collectVirtualMethods(appCtx: RangerAppWriterContext): void;
|
|
3495
|
+
classInheritsFrom(className: string, baseName: string, appCtx: RangerAppWriterContext, depth: number): boolean;
|
|
3496
|
+
virtualDispatcherName(className: string, methodName: string): string;
|
|
3497
|
+
hasVirtualDispatcher(className: string, methodName: string): boolean;
|
|
3498
|
+
emitVirtualDispatchers(appCtx: RangerAppWriterContext): void;
|
|
3499
|
+
emitOneVirtualDispatcher(top: string, meth: string, fnDesc: RangerAppFunctionDesc, cases: Array<string>, appCtx: RangerAppWriterContext): void;
|
|
3500
|
+
emitDispatchTailCall(builder: LowIRBuilder, cls: string, meth: string, retType: string, argNames: Array<string>, argTypes: Array<string>): void;
|
|
2437
3501
|
lowerInstanceCallOn(node: CodeNode, receiverName: string, recvNode: CodeNode, methodName: string, lctx: LowIRLowerContext): string;
|
|
3502
|
+
registerCallObjectTemp(node: CodeNode, tmp: string, lctx: LowIRLowerContext): void;
|
|
2438
3503
|
lowerInstanceCall(node: CodeNode, lctx: LowIRLowerContext): string;
|
|
3504
|
+
calleeReceiverIsUnknown(callee: CodeNode, lctx: LowIRLowerContext): boolean;
|
|
3505
|
+
moduleHasFunction(fnName: string): boolean;
|
|
2439
3506
|
resolveCalleeName(callee: CodeNode): string;
|
|
2440
3507
|
}
|
|
2441
3508
|
export declare class LLVMIRWriter {
|
|
3509
|
+
instrLineLen: number;
|
|
2442
3510
|
varargNames: Array<string>;
|
|
2443
3511
|
varargSigs: Array<string>;
|
|
2444
3512
|
constructor();
|
|
@@ -2450,11 +3518,14 @@ export declare class LLVMIRWriter {
|
|
|
2450
3518
|
hexByte(b: number): string;
|
|
2451
3519
|
llvmEscapeCString(text: string): string;
|
|
2452
3520
|
writeModule(module: LowIRModule, wr: CodeWriter): void;
|
|
3521
|
+
writeBigStackMain(wr: CodeWriter): void;
|
|
3522
|
+
writeLambdaTable(module: LowIRModule, wr: CodeWriter): void;
|
|
2453
3523
|
writeTypeDescs(module: LowIRModule, wr: CodeWriter): void;
|
|
2454
3524
|
writeOneTypeDesc(td: LowIRTypeDesc, wr: CodeWriter): void;
|
|
2455
3525
|
writeStruct(st: LowIRStruct, wr: CodeWriter): void;
|
|
2456
3526
|
writeFunction(fn: LowIRFunction, wr: CodeWriter): void;
|
|
2457
3527
|
writeInstr(ins: LowIRInstr, wr: CodeWriter): void;
|
|
3528
|
+
writeInstrBody(ins: LowIRInstr, wr: CodeWriter): void;
|
|
2458
3529
|
writeTerminator(bb: LowIRBlock, wr: CodeWriter): void;
|
|
2459
3530
|
}
|
|
2460
3531
|
export declare class WATWriter {
|
|
@@ -2570,7 +3641,9 @@ export declare class LiveCompiler {
|
|
|
2570
3641
|
localCall(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<boolean>;
|
|
2571
3642
|
finishWalkNode(wr: CodeWriter): void;
|
|
2572
3643
|
WalkNode(node: CodeNode, in_ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
3644
|
+
typeNameToIdentifier(ss: string): string;
|
|
2573
3645
|
walkCommandList(cmd: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
3646
|
+
isMutatingOpName(n: string): boolean;
|
|
2574
3647
|
walkCommand(cmd: CodeNode, node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): Promise<void>;
|
|
2575
3648
|
compile(node: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): void;
|
|
2576
3649
|
findParamDesc(obj: CodeNode, ctx: RangerAppWriterContext, wr: CodeWriter): RangerAppParamDesc | undefined;
|
|
@@ -2648,6 +3721,12 @@ export declare class StaticAnalyzer {
|
|
|
2648
3721
|
mutatingOps: {
|
|
2649
3722
|
[key: string]: boolean;
|
|
2650
3723
|
};
|
|
3724
|
+
own_call_params: Array<RangerAppParamDesc>;
|
|
3725
|
+
own_call_callees: Array<RangerAppFunctionDesc>;
|
|
3726
|
+
own_call_indexes: Array<number>;
|
|
3727
|
+
rss_edge_src: Array<RangerAppParamDesc>;
|
|
3728
|
+
rss_edge_dst: Array<RangerAppParamDesc>;
|
|
3729
|
+
rss_in_place: Array<RangerAppParamDesc>;
|
|
2651
3730
|
constructor();
|
|
2652
3731
|
initMutatingOps(): void;
|
|
2653
3732
|
isMutatingOperator(opName: string): boolean;
|
|
@@ -2655,6 +3734,8 @@ export declare class StaticAnalyzer {
|
|
|
2655
3734
|
getRootVarName(node: CodeNode): string;
|
|
2656
3735
|
isMemberAccess(node: CodeNode): boolean;
|
|
2657
3736
|
getMemberPath(node: CodeNode): string;
|
|
3737
|
+
isValuePassedType(t: number): boolean;
|
|
3738
|
+
isValuePassedCollection(typeNode: CodeNode): boolean;
|
|
2658
3739
|
markVarAsMutated(varName: string, fnCtx: RangerAppWriterContext): void;
|
|
2659
3740
|
analyzeVarDef(node: CodeNode): void;
|
|
2660
3741
|
walkForFieldAssignments(node: CodeNode, fnCtx: RangerAppWriterContext): void;
|
|
@@ -2678,6 +3759,7 @@ export declare class StaticAnalyzer {
|
|
|
2678
3759
|
analyzeTransitiveMutBorrow(fn: RangerAppFunctionDesc, changedParams: Array<string>): void;
|
|
2679
3760
|
analyzeClassTransitiveMutBorrow(cl: RangerAppClassDesc, changedParams: Array<string>): void;
|
|
2680
3761
|
checkDirectSelfMutation(fn: RangerAppFunctionDesc): boolean;
|
|
3762
|
+
writeTargetIsSelf(target: CodeNode): boolean;
|
|
2681
3763
|
nodeDirectlyMutatesSelf(node: CodeNode): boolean;
|
|
2682
3764
|
analyzeMethodMutation(fn: RangerAppFunctionDesc): boolean;
|
|
2683
3765
|
checkTransitiveMutation(node: CodeNode, fn: RangerAppFunctionDesc): boolean;
|
|
@@ -2692,11 +3774,58 @@ export declare class StaticAnalyzer {
|
|
|
2692
3774
|
isPrimitiveTypeName(name: string): boolean;
|
|
2693
3775
|
isHeapOwnedParam(p: RangerAppParamDesc): boolean;
|
|
2694
3776
|
recordEscape(valueName: string, ownerPath: string, via: string, fnCtx: RangerAppWriterContext): void;
|
|
2695
|
-
|
|
3777
|
+
escapeValueName(node: CodeNode): string;
|
|
3778
|
+
aliasRootOf(name: string, aliasNames: Array<string>, aliasRoots: Array<string>): string;
|
|
3779
|
+
recordEscapeAliased(valueName: string, ownerPath: string, via: string, fnCtx: RangerAppWriterContext, aliasNames: Array<string>, aliasRoots: Array<string>): void;
|
|
3780
|
+
callArgParam(arg: CodeNode, fnCtx: RangerAppWriterContext, aliasNames: Array<string>, aliasRoots: Array<string>): RangerAppParamDesc;
|
|
3781
|
+
markCallArgsResolved(argsNode: CodeNode, callee: RangerAppFunctionDesc, fnCtx: RangerAppWriterContext, aliasNames: Array<string>, aliasRoots: Array<string>): void;
|
|
3782
|
+
markCallArgsUnresolved(argsNode: CodeNode, fnCtx: RangerAppWriterContext, aliasNames: Array<string>, aliasRoots: Array<string>): void;
|
|
3783
|
+
collectCallArgEscapes(node: CodeNode, fnCtx: RangerAppWriterContext, aliasNames: Array<string>, aliasRoots: Array<string>): void;
|
|
3784
|
+
walkForEscapes(node: CodeNode, fnCtx: RangerAppWriterContext, aliasNames: Array<string>, aliasRoots: Array<string>): void;
|
|
2696
3785
|
ownerSuffix(param: RangerAppParamDesc): string;
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
3786
|
+
fnIsPure(fn: RangerAppFunctionDesc): boolean;
|
|
3787
|
+
classifyOwnership(fn: RangerAppFunctionDesc): void;
|
|
3788
|
+
resolveCallEscapes(): void;
|
|
3789
|
+
reportOwnership(fn: RangerAppFunctionDesc): void;
|
|
3790
|
+
reportOwnershipClass(cl: RangerAppClassDesc): void;
|
|
3791
|
+
analyzeOwnership(fn: RangerAppFunctionDesc): void;
|
|
3792
|
+
analyzeOwnershipClass(cl: RangerAppClassDesc): void;
|
|
3793
|
+
unionMemberIsScalarOnly(typeName: string): boolean;
|
|
3794
|
+
markClassShared(typeName: string, reason: string): void;
|
|
3795
|
+
classNameOfDesc(p: RangerAppParamDesc): string;
|
|
3796
|
+
sharedClassNameOf(name: string, fnCtx: RangerAppWriterContext): string;
|
|
3797
|
+
nodeClassNameOf(node: CodeNode, fnCtx: RangerAppWriterContext): string;
|
|
3798
|
+
collectMutatedNames(node: CodeNode, names: Array<string>): void;
|
|
3799
|
+
computeSharingMutations(): void;
|
|
3800
|
+
markSharingMutations(fn: RangerAppFunctionDesc): boolean;
|
|
3801
|
+
nameIn(name: string, names: Array<string>): boolean;
|
|
3802
|
+
varIsMutated(name: string, fnCtx: RangerAppWriterContext, mutated: Array<string>): boolean;
|
|
3803
|
+
readsStoredObject(node: CodeNode): boolean;
|
|
3804
|
+
walkForSharing(node: CodeNode, fnCtx: RangerAppWriterContext, fnName: string, mutated: Array<string>): void;
|
|
3805
|
+
markIdenticalOperandsShared(node: CodeNode, fnName: string): void;
|
|
3806
|
+
analyzeClassSharingFn(fn: RangerAppFunctionDesc): void;
|
|
3807
|
+
analyzeClassSharing(): void;
|
|
3808
|
+
reportClassSharing(): void;
|
|
3809
|
+
sharedClassOfDesc(p: RangerAppParamDesc): string;
|
|
3810
|
+
markDescRcWrap(p: RangerAppParamDesc): void;
|
|
3811
|
+
walkForSharedLocals(node: CodeNode): void;
|
|
3812
|
+
fnUsesThisValue(fn: RangerAppFunctionDesc): Promise<boolean>;
|
|
3813
|
+
fnSelfCallsNeedy(fn: RangerAppFunctionDesc): Promise<boolean>;
|
|
3814
|
+
computeSelfRcNeeds(): Promise<void>;
|
|
3815
|
+
markLambdaParamsRec(fn: RangerAppFunctionDesc): void;
|
|
3816
|
+
applySharedClassRcWrap(): void;
|
|
3817
|
+
rustParamHasRefSemantics(param: RangerAppParamDesc): boolean;
|
|
3818
|
+
rustBorrowedObjectParam(cl: RangerAppClassDesc, param: RangerAppParamDesc): boolean;
|
|
3819
|
+
rssPlainStringDesc(p: RangerAppParamDesc): boolean;
|
|
3820
|
+
rssResolveDesc(node: CodeNode): RangerAppParamDesc;
|
|
3821
|
+
rssSourceKind(value: CodeNode): number;
|
|
3822
|
+
rssRecordAssign(target: RangerAppParamDesc, value: CodeNode): void;
|
|
3823
|
+
rssLocalCandidate(p: RangerAppParamDesc): boolean;
|
|
3824
|
+
rssWalkBody(node: CodeNode): void;
|
|
3825
|
+
rssWalkFn(fn: RangerAppFunctionDesc): void;
|
|
3826
|
+
analyzeRustStaticStrings(): void;
|
|
3827
|
+
applyOwnershipToRustBorrowsFn(cl: RangerAppClassDesc, fn: RangerAppFunctionDesc): void;
|
|
3828
|
+
applyOwnershipToRustBorrows(): void;
|
|
2700
3829
|
analyzeOwnershipAll(strict: boolean): void;
|
|
2701
3830
|
analyzeAll(): void;
|
|
2702
3831
|
}
|
|
@@ -2744,4 +3873,3 @@ export declare class CompilerInterface {
|
|
|
2744
3873
|
constructor();
|
|
2745
3874
|
static create_env(): InputEnv;
|
|
2746
3875
|
}
|
|
2747
|
-
export {};
|