@scriptc/compiler 0.0.1 → 0.0.3
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/dist/backend/emission/emit-exprs.js +2 -0
- package/dist/backend/emission/emit-exprs.js.map +1 -1
- package/dist/backend/llvm/emitter.js +19 -4
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/coverage/report.d.ts +1 -0
- package/dist/coverage/report.js +12 -0
- package/dist/coverage/report.js.map +1 -1
- package/dist/coverage/surface-manifest.d.ts +22 -0
- package/dist/coverage/surface-manifest.js +295 -0
- package/dist/coverage/surface-manifest.js.map +1 -0
- package/dist/diagnostics/diagnostic.d.ts +16 -0
- package/dist/diagnostics/diagnostic.js +24 -0
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +10 -5
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +3 -0
- package/dist/frontend/lowering/lower-containers.js +64 -0
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.js +14 -2
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +8 -3
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +3 -3
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.js +2 -2
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lowerer.js +4 -3
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/program.js +104 -21
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/shared.d.ts +7 -0
- package/dist/frontend/shared.js +9 -0
- package/dist/frontend/shared.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +1 -1
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/validate.js +1 -0
- package/dist/ir/validate.js.map +1 -1
- package/package.json +6 -4
- package/surface-manifest.json +2052 -0
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* - Lexical scoping is resolved here: locals get function-unique ids
|
|
13
13
|
* ("x.0", "x.1" for shadowing); the IR is scope-flat.
|
|
14
14
|
*/
|
|
15
|
+
import { isRelativeSpecifier } from "../shared.js";
|
|
15
16
|
import * as ts from "../ts7/adapter.js";
|
|
16
17
|
import { anyOpRequiresDynamicDiag, blockedBindingUseDiag, checkerPanicDiag, isCheckerPanic, genericSignatureTypeDiag, indexSignatureTypeDiag, noLoweringDiag, recordShapeMismatchDiag, requiresDynamicApiDiag, requiresDynamicPackageDiag, requiresDynamicTypeDiag, unionMismatchDiag, unsupportedDiag, unsupportedTypeDiag, } from "../../diagnostics/diagnostic.js";
|
|
17
18
|
import { arrayOf, BOOL, canAdaptDynFuncTo, canConvertToDyn, canCrossIslandBoundary, canExitIslandToType, canMarshalTypedFuncIntoIsland, DYN, F64, isJsonSafeType, isUndefinedArmedUnion, isUnitType, JSVAL, RUNTIME_ERROR_CLASSES, STRING, typeEquals, UNDEFINED_T, VOID } from "../../ir/nodes.js";
|
|
@@ -1017,7 +1018,7 @@ export class Lowerer {
|
|
|
1017
1018
|
return null;
|
|
1018
1019
|
}
|
|
1019
1020
|
const spec = importDecl.moduleSpecifier.text;
|
|
1020
|
-
if (!
|
|
1021
|
+
if (!isRelativeSpecifier(spec))
|
|
1021
1022
|
return null;
|
|
1022
1023
|
const dep = resolveImport(this.program, importDecl.getSourceFile(), spec);
|
|
1023
1024
|
if (!dep || !isJsSourceFile(dep) || isNodeEsmFile(dep))
|
|
@@ -1049,7 +1050,7 @@ export class Lowerer {
|
|
|
1049
1050
|
return false;
|
|
1050
1051
|
}
|
|
1051
1052
|
const spec = requireSpecOf(decl.initializer);
|
|
1052
|
-
if (spec === null || !(spec
|
|
1053
|
+
if (spec === null || !isRelativeSpecifier(spec))
|
|
1053
1054
|
return false;
|
|
1054
1055
|
}
|
|
1055
1056
|
// SINGLE-VALUE exporters (`module.exports = Countdown` / `= double` /
|
|
@@ -1153,7 +1154,7 @@ export class Lowerer {
|
|
|
1153
1154
|
* specifier is not a relative program module (builtins load nothing;
|
|
1154
1155
|
* anything else kept its preflight fence). */
|
|
1155
1156
|
requireInitStmt(spec, node) {
|
|
1156
|
-
if (!
|
|
1157
|
+
if (!isRelativeSpecifier(spec))
|
|
1157
1158
|
return null;
|
|
1158
1159
|
const dep = resolveImport(this.program, node.getSourceFile(), spec);
|
|
1159
1160
|
if (!dep || dep.fileName.endsWith(".json"))
|