@agoric/xsnap 0.14.3-dev-b047af2.0 → 0.14.3-dev-2a16ddd.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.
Files changed (125) hide show
  1. package/package.json +8 -15
  2. package/src/build.js +4 -61
  3. package/moddable/modules/data/base64/base64.js +0 -28
  4. package/moddable/modules/data/base64/manifest.json +0 -11
  5. package/moddable/modules/data/base64/modBase64.c +0 -188
  6. package/moddable/modules/data/binaryMessage/BinaryMessage.js +0 -106
  7. package/moddable/modules/data/crc/crc.c +0 -205
  8. package/moddable/modules/data/crc/crc.js +0 -36
  9. package/moddable/modules/data/crc/manifest.json +0 -8
  10. package/moddable/modules/data/hex/hex.js +0 -28
  11. package/moddable/modules/data/hex/manifest.json +0 -11
  12. package/moddable/modules/data/hex/modHex.c +0 -139
  13. package/moddable/modules/data/logical/logical.js +0 -32
  14. package/moddable/modules/data/logical/modLogical.c +0 -98
  15. package/moddable/modules/data/qrcode/manifest.json +0 -9
  16. package/moddable/modules/data/qrcode/qrcode.c +0 -93
  17. package/moddable/modules/data/qrcode/qrcode.js +0 -23
  18. package/moddable/modules/data/qrcode/qrcodegen.c +0 -1025
  19. package/moddable/modules/data/qrcode/qrcodegen.h +0 -267
  20. package/moddable/modules/data/text/decoder/manifest.json +0 -8
  21. package/moddable/modules/data/text/decoder/textdecoder.c +0 -480
  22. package/moddable/modules/data/text/decoder/textdecoder.js +0 -27
  23. package/moddable/modules/data/text/encoder/manifest.json +0 -8
  24. package/moddable/modules/data/text/encoder/textencoder.c +0 -232
  25. package/moddable/modules/data/text/encoder/textencoder.js +0 -24
  26. package/moddable/modules/data/tinyint/tinyint.c +0 -150
  27. package/moddable/modules/data/tinyint/tinyint.js +0 -53
  28. package/moddable/modules/data/url/manifest.json +0 -17
  29. package/moddable/modules/data/url/url.c +0 -1959
  30. package/moddable/modules/data/url/url.js +0 -210
  31. package/moddable/modules/data/wavreader/manifest.json +0 -8
  32. package/moddable/modules/data/wavreader/wavreader.js +0 -128
  33. package/moddable/modules/data/zlib/deflate.c +0 -161
  34. package/moddable/modules/data/zlib/deflate.js +0 -63
  35. package/moddable/modules/data/zlib/inflate.c +0 -145
  36. package/moddable/modules/data/zlib/inflate.js +0 -66
  37. package/moddable/modules/data/zlib/manifest_deflate.json +0 -9
  38. package/moddable/modules/data/zlib/manifest_inflate.json +0 -9
  39. package/moddable/modules/data/zlib/miniz.c +0 -4924
  40. package/moddable/xs/includes/xs.d.ts +0 -73
  41. package/moddable/xs/includes/xs.h +0 -1533
  42. package/moddable/xs/includes/xsmc.h +0 -206
  43. package/moddable/xs/makefiles/lin/makefile +0 -33
  44. package/moddable/xs/makefiles/lin/xsc.mk +0 -118
  45. package/moddable/xs/makefiles/lin/xsid.mk +0 -90
  46. package/moddable/xs/makefiles/lin/xsl.mk +0 -168
  47. package/moddable/xs/makefiles/lin/xst.mk +0 -201
  48. package/moddable/xs/makefiles/mac/makefile +0 -33
  49. package/moddable/xs/makefiles/mac/xsc.mk +0 -130
  50. package/moddable/xs/makefiles/mac/xsid.mk +0 -102
  51. package/moddable/xs/makefiles/mac/xsl.mk +0 -177
  52. package/moddable/xs/makefiles/mac/xst.mk +0 -203
  53. package/moddable/xs/makefiles/mac/xst_no_asan.txt +0 -52
  54. package/moddable/xs/makefiles/win/build.bat +0 -26
  55. package/moddable/xs/makefiles/win/xsc.mak +0 -142
  56. package/moddable/xs/makefiles/win/xsid.mak +0 -113
  57. package/moddable/xs/makefiles/win/xsl.mak +0 -186
  58. package/moddable/xs/makefiles/win/xst.mak +0 -195
  59. package/moddable/xs/platforms/lin_xs.h +0 -99
  60. package/moddable/xs/platforms/mac_xs.h +0 -97
  61. package/moddable/xs/platforms/wasm_xs.h +0 -79
  62. package/moddable/xs/platforms/win_xs.h +0 -104
  63. package/moddable/xs/platforms/xsHost.h +0 -63
  64. package/moddable/xs/platforms/xsPlatform.h +0 -618
  65. package/moddable/xs/sources/xsAPI.c +0 -2555
  66. package/moddable/xs/sources/xsAll.c +0 -294
  67. package/moddable/xs/sources/xsAll.h +0 -2741
  68. package/moddable/xs/sources/xsArguments.c +0 -222
  69. package/moddable/xs/sources/xsArray.c +0 -2657
  70. package/moddable/xs/sources/xsAtomics.c +0 -844
  71. package/moddable/xs/sources/xsBigInt.c +0 -1859
  72. package/moddable/xs/sources/xsBoolean.c +0 -109
  73. package/moddable/xs/sources/xsCode.c +0 -4493
  74. package/moddable/xs/sources/xsCommon.c +0 -1710
  75. package/moddable/xs/sources/xsCommon.h +0 -1142
  76. package/moddable/xs/sources/xsDataView.c +0 -2890
  77. package/moddable/xs/sources/xsDate.c +0 -1541
  78. package/moddable/xs/sources/xsDebug.c +0 -2710
  79. package/moddable/xs/sources/xsDefaults.c +0 -134
  80. package/moddable/xs/sources/xsError.c +0 -353
  81. package/moddable/xs/sources/xsFunction.c +0 -776
  82. package/moddable/xs/sources/xsGenerator.c +0 -865
  83. package/moddable/xs/sources/xsGlobal.c +0 -839
  84. package/moddable/xs/sources/xsJSON.c +0 -1091
  85. package/moddable/xs/sources/xsLexical.c +0 -1969
  86. package/moddable/xs/sources/xsLockdown.c +0 -933
  87. package/moddable/xs/sources/xsMapSet.c +0 -1649
  88. package/moddable/xs/sources/xsMarshall.c +0 -1020
  89. package/moddable/xs/sources/xsMath.c +0 -624
  90. package/moddable/xs/sources/xsMemory.c +0 -1941
  91. package/moddable/xs/sources/xsModule.c +0 -3101
  92. package/moddable/xs/sources/xsNumber.c +0 -560
  93. package/moddable/xs/sources/xsObject.c +0 -1102
  94. package/moddable/xs/sources/xsPlatforms.c +0 -480
  95. package/moddable/xs/sources/xsProfile.c +0 -577
  96. package/moddable/xs/sources/xsPromise.c +0 -1199
  97. package/moddable/xs/sources/xsProperty.c +0 -636
  98. package/moddable/xs/sources/xsProxy.c +0 -1014
  99. package/moddable/xs/sources/xsRegExp.c +0 -1168
  100. package/moddable/xs/sources/xsRun.c +0 -4889
  101. package/moddable/xs/sources/xsScope.c +0 -1293
  102. package/moddable/xs/sources/xsScript.c +0 -288
  103. package/moddable/xs/sources/xsScript.h +0 -1186
  104. package/moddable/xs/sources/xsSnapshot.c +0 -2161
  105. package/moddable/xs/sources/xsSnapshot.h +0 -51
  106. package/moddable/xs/sources/xsSourceMap.c +0 -218
  107. package/moddable/xs/sources/xsString.c +0 -3332
  108. package/moddable/xs/sources/xsSymbol.c +0 -503
  109. package/moddable/xs/sources/xsSyntaxical.c +0 -4193
  110. package/moddable/xs/sources/xsTree.c +0 -1893
  111. package/moddable/xs/sources/xsType.c +0 -1488
  112. package/moddable/xs/sources/xsdtoa.c +0 -6672
  113. package/moddable/xs/sources/xsmc.c +0 -340
  114. package/moddable/xs/sources/xsre.c +0 -7578
  115. package/xsnap-native/xsnap/makefiles/lin/makefile +0 -10
  116. package/xsnap-native/xsnap/makefiles/lin/xsnap-worker.mk +0 -153
  117. package/xsnap-native/xsnap/makefiles/lin/xsnap.mk +0 -144
  118. package/xsnap-native/xsnap/makefiles/mac/makefile +0 -10
  119. package/xsnap-native/xsnap/makefiles/mac/xsnap-worker.mk +0 -162
  120. package/xsnap-native/xsnap/makefiles/mac/xsnap.mk +0 -153
  121. package/xsnap-native/xsnap/sources/xsnap-worker.c +0 -996
  122. package/xsnap-native/xsnap/sources/xsnap.c +0 -716
  123. package/xsnap-native/xsnap/sources/xsnap.h +0 -142
  124. package/xsnap-native/xsnap/sources/xsnapPlatform.c +0 -1496
  125. package/xsnap-native/xsnap/sources/xsnapPlatform.h +0 -105
@@ -1,142 +0,0 @@
1
- #ifndef __XSNAP__
2
- #define __XSNAP__
3
-
4
- #include "xs.h"
5
-
6
- typedef struct xsSnapshotRecord xsSnapshot;
7
-
8
- struct xsSnapshotRecord {
9
- char* signature;
10
- int signatureLength;
11
- xsCallback* callbacks;
12
- int callbacksLength;
13
- int (*read)(void* stream, void* address, size_t size);
14
- int (*write)(void* stream, void* address, size_t size);
15
- void* stream;
16
- int error;
17
- void* firstChunk;
18
- void* firstProjection;
19
- void* firstSlot;
20
- int slotSize;
21
- void* slots;
22
- };
23
-
24
- #define xsInitializeSharedCluster() \
25
- fxInitializeSharedCluster()
26
- #define xsTerminateSharedCluster() \
27
- fxTerminateSharedCluster()
28
-
29
- #ifdef mxMetering
30
-
31
- #define xsBeginMetering(_THE, _CALLBACK, _STEP) \
32
- do { \
33
- xsJump __HOST_JUMP__; \
34
- __HOST_JUMP__.nextJump = (_THE)->firstJump; \
35
- __HOST_JUMP__.stack = (_THE)->stack; \
36
- __HOST_JUMP__.scope = (_THE)->scope; \
37
- __HOST_JUMP__.frame = (_THE)->frame; \
38
- __HOST_JUMP__.environment = NULL; \
39
- __HOST_JUMP__.code = (_THE)->code; \
40
- __HOST_JUMP__.flag = 0; \
41
- (_THE)->firstJump = &__HOST_JUMP__; \
42
- if (setjmp(__HOST_JUMP__.buffer) == 0) { \
43
- fxBeginMetering(_THE, _CALLBACK, _STEP)
44
-
45
- #define xsEndMetering(_THE) \
46
- fxEndMetering(_THE); \
47
- } \
48
- (_THE)->stack = __HOST_JUMP__.stack, \
49
- (_THE)->scope = __HOST_JUMP__.scope, \
50
- (_THE)->frame = __HOST_JUMP__.frame, \
51
- (_THE)->code = __HOST_JUMP__.code, \
52
- (_THE)->firstJump = __HOST_JUMP__.nextJump; \
53
- break; \
54
- } while(1)
55
-
56
- #define xsGetCurrentMeter(_THE) \
57
- fxGetCurrentMeter(_THE)
58
- #define xsSetCurrentMeter(_THE, _VALUE) \
59
- fxSetCurrentMeter(_THE, _VALUE)
60
-
61
- #else
62
- #define xsBeginMetering(_THE, _CALLBACK, _STEP)
63
- #define xsEndMetering(_THE)
64
- #define xsPatchHostFunction(_FUNCTION,_PATCH)
65
- #define xsMeterHostFunction(_COUNT) (void)(_COUNT)
66
- #define xsGetCurrentMeter(_THE) 0
67
- #define xsSetCurrentMeter(_THE, _VALUE)
68
- #endif
69
-
70
- #define xsReadSnapshot(_SNAPSHOT, _NAME, _CONTEXT) \
71
- fxReadSnapshot(_SNAPSHOT, _NAME, _CONTEXT)
72
- #define xsWriteSnapshot(_THE, _SNAPSHOT) \
73
- fxWriteSnapshot(_THE, _SNAPSHOT)
74
-
75
- #define xsRunDebugger(_THE) \
76
- fxRunDebugger(_THE)
77
- #define xsRunModuleFile(_PATH) \
78
- fxRunModuleFile(the, _PATH)
79
- #define xsRunProgramFile(_PATH) \
80
- fxRunProgramFile(the, _PATH)
81
- #define xsRunLoop(_THE) \
82
- fxRunLoop(_THE)
83
-
84
- #define xsClearTimer() \
85
- fxClearTimer(the)
86
- #define xsSetTimer(_INTERVAL, _REPEAT) \
87
- fxSetTimer(the, _INTERVAL, _REPEAT)
88
-
89
- #define xsVersion(_BUFFER, _SIZE) \
90
- fxVersion(_BUFFER, _SIZE)
91
-
92
- #ifdef mxInstrument
93
- #define xsDescribeInstrumentation(_THE,_COUNT,_NAMES,_UNITS) \
94
- fxDescribeInstrumentation(_THE,_COUNT,_NAMES,_UNITS)
95
- #define xsSampleInstrumentation(_THE,_COUNT,_VALUES) \
96
- fxSampleInstrumentation(_THE,_COUNT,_VALUES)
97
- #endif
98
-
99
- #ifdef __cplusplus
100
- extern "C" {
101
- #endif
102
-
103
- extern void fxInitializeSharedCluster();
104
- extern void fxTerminateSharedCluster();
105
-
106
- #ifdef mxMetering
107
- mxImport void fxBeginMetering(xsMachine* the, xsBooleanValue (*callback)(xsMachine*, xsUnsignedValue), xsUnsignedValue interval);
108
- mxImport void fxEndMetering(xsMachine* the);
109
- mxImport void fxMeterHostFunction(xsMachine* the, xsUnsignedValue count);
110
- mxImport void fxPatchHostFunction(xsMachine* the, xsCallback patch);
111
- mxImport xsUnsignedValue fxGetCurrentMeter(xsMachine* the);
112
- mxImport void fxSetCurrentMeter(xsMachine* the, xsUnsignedValue value);
113
- #endif
114
-
115
- mxImport xsMachine* fxReadSnapshot(xsSnapshot* snapshot, xsStringValue theName, void* theContext);
116
- mxImport int fxWriteSnapshot(xsMachine* the, xsSnapshot* snapshot);
117
-
118
- mxImport void fxRunDebugger(xsMachine* the);
119
- mxImport void fxRunModuleFile(xsMachine* the, xsStringValue path);
120
- mxImport void fxRunProgramFile(xsMachine* the, xsStringValue path);
121
- mxImport void fxRunLoop(xsMachine* the);
122
-
123
- mxImport void fxClearTimer(xsMachine* the);
124
- mxImport void fxSetTimer(xsMachine* the, xsNumberValue interval, xsBooleanValue repeat);
125
-
126
- #ifdef mxInstrument
127
- mxImport void fxDescribeInstrumentation(xsMachine* the, xsIntegerValue count, xsStringValue* names, xsStringValue* units);
128
- mxImport void fxSampleInstrumentation(xsMachine* the, xsIntegerValue count, xsIntegerValue* values);
129
- #endif
130
-
131
- mxImport void fxVersion(xsStringValue theBuffer, xsUnsignedValue theSize);
132
-
133
- mxImport void fx_lockdown(xsMachine* the);
134
- mxImport void fx_harden(xsMachine* the);
135
- mxImport void fx_petrify(xsMachine* the);
136
- mxImport void fx_mutabilities(xsMachine* the);
137
-
138
- #ifdef __cplusplus
139
- }
140
- #endif
141
-
142
- #endif /* __XSNAP__ */