@shd101wyy/yo 0.1.30 → 0.1.31
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/out/cjs/index.cjs +633 -474
- package/out/cjs/yo-cli.cjs +910 -751
- package/out/cjs/yo-lsp.cjs +849 -690
- package/out/esm/index.mjs +752 -593
- package/out/types/src/codegen/index.d.ts +1 -1
- package/out/types/src/compiler-utils.d.ts +1 -1
- package/out/types/src/evaluator/utils/closure.d.ts +2 -1
- package/out/types/src/evaluator/utils.d.ts +3 -0
- package/out/types/src/evaluator/values/impl.d.ts +14 -0
- package/out/types/src/tests/thread-safety-codegen.test.d.ts +1 -0
- package/out/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/std/build.yo +5 -2
- package/std/imm/list.yo +1 -1
- package/std/imm/sorted_map.yo +1 -1
- package/std/libc/stdatomic.yo +250 -1
- package/std/prelude.yo +45 -2
- package/std/string/rune.yo +4 -0
- package/std/sync/atomic.yo +557 -0
- package/std/sync/channel.yo +57 -42
- package/std/sync/cond.yo +7 -3
- package/std/sync/mutex.yo +75 -15
- package/std/sync/once.yo +25 -19
- package/std/sync/rwlock.yo +18 -15
- package/std/sync/waitgroup.yo +25 -16
|
@@ -31,7 +31,7 @@ export declare class CodeGenerator {
|
|
|
31
31
|
release?: boolean;
|
|
32
32
|
optimize?: "0" | "1" | "2" | "3";
|
|
33
33
|
allocator?: "mimalloc" | "libc";
|
|
34
|
-
sanitize?: "address" | "leak";
|
|
34
|
+
sanitize?: "address" | "leak" | "thread";
|
|
35
35
|
debugSymbols?: boolean;
|
|
36
36
|
strip?: boolean;
|
|
37
37
|
static?: boolean;
|
|
@@ -8,7 +8,7 @@ export interface CompilerInfo {
|
|
|
8
8
|
}
|
|
9
9
|
export declare function getCompilerInfo(compiler: string): CompilerInfo;
|
|
10
10
|
export interface SanitizerOptions {
|
|
11
|
-
sanitize: "address" | "leak";
|
|
11
|
+
sanitize: "address" | "leak" | "thread";
|
|
12
12
|
compilerInfo: CompilerInfo;
|
|
13
13
|
}
|
|
14
14
|
export interface SanitizerFlags {
|
|
@@ -11,11 +11,12 @@ export declare function consumeCapturedVariables({ capturedVariables, env, closu
|
|
|
11
11
|
closureToken: Token;
|
|
12
12
|
}): Environment;
|
|
13
13
|
export declare function buildPathCollectionFromCapturedVariables(capturedVariables: Map<string, CapturedVariableInfo>): string[][];
|
|
14
|
-
export declare function validateCaptureTraitRequirements({ wrapperType, captureType, env, errorToken, }: {
|
|
14
|
+
export declare function validateCaptureTraitRequirements({ wrapperType, captureType, env, errorToken, capturedVariablesWithValues, }: {
|
|
15
15
|
wrapperType: SomeType;
|
|
16
16
|
captureType: StructType;
|
|
17
17
|
env: Environment;
|
|
18
18
|
errorToken: Token;
|
|
19
|
+
capturedVariablesWithValues?: Map<string, FunctionCapturedVariableInfo>;
|
|
19
20
|
}): void;
|
|
20
21
|
export declare function createCaptureTypeAndValue({ expectedCaptureType, capturedVariablesWithValues, env, closureToken, context, }: {
|
|
21
22
|
expectedCaptureType: StructType | undefined;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { type Environment, type Variable } from "../env";
|
|
2
2
|
import { type Expr } from "../expr";
|
|
3
|
+
import type { Type } from "../types/definitions";
|
|
4
|
+
export declare function getRootExprOfFieldAccess(expr: Expr): Expr;
|
|
5
|
+
export declare function getAtomicObjectRootType(rootExpr: Expr, env: Environment): Type | undefined;
|
|
3
6
|
export declare function isValidVariableName(expr: Expr): boolean;
|
|
4
7
|
export declare function findRcValueOwnerRelationship(rhs: Expr, env: Environment, _modulePath: string): Variable | undefined;
|
|
@@ -3,6 +3,19 @@ import { type Expr, type FnCallExpr } from "../../expr";
|
|
|
3
3
|
import type { FunctionType, SomeType, TraitField, TraitType, Type } from "../../types/definitions";
|
|
4
4
|
import { type TraitValue, type UnknownValue, type Value } from "../../value";
|
|
5
5
|
import type { EvaluatorContext } from "../context";
|
|
6
|
+
interface NegativeGenericImpl {
|
|
7
|
+
forallParameters: ForallParameter[];
|
|
8
|
+
whereConstraints: {
|
|
9
|
+
someType: SomeType;
|
|
10
|
+
traitType: TraitType;
|
|
11
|
+
traitExpr?: Expr;
|
|
12
|
+
}[];
|
|
13
|
+
receiverTypePattern: Type;
|
|
14
|
+
traitType: TraitType;
|
|
15
|
+
sourceModulePath?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function hasNegativeImpl(typeId: string, traitTypeId: string): boolean;
|
|
18
|
+
export declare function findMatchingNegativeGenericImpl(concreteType: Type, traitType: TraitType, env: Environment): NegativeGenericImpl | undefined;
|
|
6
19
|
export type ForallParameter = {
|
|
7
20
|
kind: "type";
|
|
8
21
|
name: string;
|
|
@@ -90,3 +103,4 @@ export declare function evaluateImplBlock({ expr, env, context, }: {
|
|
|
90
103
|
env: Environment;
|
|
91
104
|
context: EvaluatorContext;
|
|
92
105
|
}): FnCallExpr;
|
|
106
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|