@agoric/xsnap 0.14.3-u14.0 → 0.14.3-u16.1
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/README.md +3 -3
- package/api.js +4 -2
- package/build.env +1 -1
- package/moddable/modules/data/base64/base64.js +28 -0
- package/moddable/modules/data/base64/manifest.json +11 -0
- package/moddable/modules/data/base64/modBase64.c +188 -0
- package/moddable/modules/data/binaryMessage/BinaryMessage.js +106 -0
- package/moddable/modules/data/crc/crc.c +205 -0
- package/moddable/modules/data/crc/crc.js +36 -0
- package/moddable/modules/data/crc/manifest.json +8 -0
- package/moddable/modules/data/hex/hex.js +28 -0
- package/moddable/modules/data/hex/manifest.json +11 -0
- package/moddable/modules/data/hex/modHex.c +139 -0
- package/moddable/modules/data/logical/logical.js +32 -0
- package/moddable/modules/data/logical/modLogical.c +98 -0
- package/moddable/modules/data/qrcode/manifest.json +9 -0
- package/moddable/modules/data/qrcode/qrcode.c +93 -0
- package/moddable/modules/data/qrcode/qrcode.js +23 -0
- package/moddable/modules/data/qrcode/qrcodegen.c +1025 -0
- package/moddable/modules/data/qrcode/qrcodegen.h +267 -0
- package/moddable/modules/data/text/decoder/manifest.json +8 -0
- package/moddable/modules/data/text/decoder/textdecoder.c +480 -0
- package/moddable/modules/data/text/decoder/textdecoder.js +27 -0
- package/moddable/modules/data/text/encoder/manifest.json +8 -0
- package/moddable/modules/data/text/encoder/textencoder.c +232 -0
- package/moddable/modules/data/text/encoder/textencoder.js +24 -0
- package/moddable/modules/data/tinyint/tinyint.c +150 -0
- package/moddable/modules/data/tinyint/tinyint.js +53 -0
- package/moddable/modules/data/url/manifest.json +17 -0
- package/moddable/modules/data/url/url.c +1959 -0
- package/moddable/modules/data/url/url.js +210 -0
- package/moddable/modules/data/wavreader/manifest.json +8 -0
- package/moddable/modules/data/wavreader/wavreader.js +128 -0
- package/moddable/modules/data/zlib/deflate.c +161 -0
- package/moddable/modules/data/zlib/deflate.js +63 -0
- package/moddable/modules/data/zlib/inflate.c +145 -0
- package/moddable/modules/data/zlib/inflate.js +66 -0
- package/moddable/modules/data/zlib/manifest_deflate.json +9 -0
- package/moddable/modules/data/zlib/manifest_inflate.json +9 -0
- package/moddable/modules/data/zlib/miniz.c +4924 -0
- package/moddable/xs/includes/xs.d.ts +73 -0
- package/moddable/xs/includes/xs.h +1533 -0
- package/moddable/xs/includes/xsmc.h +206 -0
- package/moddable/xs/makefiles/lin/makefile +33 -0
- package/moddable/xs/makefiles/lin/xsc.mk +118 -0
- package/moddable/xs/makefiles/lin/xsid.mk +90 -0
- package/moddable/xs/makefiles/lin/xsl.mk +168 -0
- package/moddable/xs/makefiles/lin/xst.mk +201 -0
- package/moddable/xs/makefiles/mac/makefile +33 -0
- package/moddable/xs/makefiles/mac/xsc.mk +130 -0
- package/moddable/xs/makefiles/mac/xsid.mk +102 -0
- package/moddable/xs/makefiles/mac/xsl.mk +177 -0
- package/moddable/xs/makefiles/mac/xst.mk +203 -0
- package/moddable/xs/makefiles/mac/xst_no_asan.txt +52 -0
- package/moddable/xs/makefiles/win/build.bat +26 -0
- package/moddable/xs/makefiles/win/xsc.mak +142 -0
- package/moddable/xs/makefiles/win/xsid.mak +113 -0
- package/moddable/xs/makefiles/win/xsl.mak +186 -0
- package/moddable/xs/makefiles/win/xst.mak +195 -0
- package/moddable/xs/platforms/lin_xs.h +99 -0
- package/moddable/xs/platforms/mac_xs.h +97 -0
- package/moddable/xs/platforms/wasm_xs.h +79 -0
- package/moddable/xs/platforms/win_xs.h +104 -0
- package/moddable/xs/platforms/xsHost.h +63 -0
- package/moddable/xs/platforms/xsPlatform.h +618 -0
- package/moddable/xs/sources/xsAPI.c +2555 -0
- package/moddable/xs/sources/xsAll.c +294 -0
- package/moddable/xs/sources/xsAll.h +2741 -0
- package/moddable/xs/sources/xsArguments.c +222 -0
- package/moddable/xs/sources/xsArray.c +2657 -0
- package/moddable/xs/sources/xsAtomics.c +844 -0
- package/moddable/xs/sources/xsBigInt.c +1859 -0
- package/moddable/xs/sources/xsBoolean.c +109 -0
- package/moddable/xs/sources/xsCode.c +4493 -0
- package/moddable/xs/sources/xsCommon.c +1710 -0
- package/moddable/xs/sources/xsCommon.h +1142 -0
- package/moddable/xs/sources/xsDataView.c +2890 -0
- package/moddable/xs/sources/xsDate.c +1541 -0
- package/moddable/xs/sources/xsDebug.c +2710 -0
- package/moddable/xs/sources/xsDefaults.c +134 -0
- package/moddable/xs/sources/xsError.c +353 -0
- package/moddable/xs/sources/xsFunction.c +776 -0
- package/moddable/xs/sources/xsGenerator.c +865 -0
- package/moddable/xs/sources/xsGlobal.c +839 -0
- package/moddable/xs/sources/xsJSON.c +1091 -0
- package/moddable/xs/sources/xsLexical.c +1969 -0
- package/moddable/xs/sources/xsLockdown.c +933 -0
- package/moddable/xs/sources/xsMapSet.c +1649 -0
- package/moddable/xs/sources/xsMarshall.c +1020 -0
- package/moddable/xs/sources/xsMath.c +624 -0
- package/moddable/xs/sources/xsMemory.c +1941 -0
- package/moddable/xs/sources/xsModule.c +3101 -0
- package/moddable/xs/sources/xsNumber.c +560 -0
- package/moddable/xs/sources/xsObject.c +1102 -0
- package/moddable/xs/sources/xsPlatforms.c +480 -0
- package/moddable/xs/sources/xsProfile.c +577 -0
- package/moddable/xs/sources/xsPromise.c +1199 -0
- package/moddable/xs/sources/xsProperty.c +636 -0
- package/moddable/xs/sources/xsProxy.c +1014 -0
- package/moddable/xs/sources/xsRegExp.c +1168 -0
- package/moddable/xs/sources/xsRun.c +4889 -0
- package/moddable/xs/sources/xsScope.c +1293 -0
- package/moddable/xs/sources/xsScript.c +288 -0
- package/moddable/xs/sources/xsScript.h +1186 -0
- package/moddable/xs/sources/xsSnapshot.c +2161 -0
- package/moddable/xs/sources/xsSnapshot.h +51 -0
- package/moddable/xs/sources/xsSourceMap.c +218 -0
- package/moddable/xs/sources/xsString.c +3332 -0
- package/moddable/xs/sources/xsSymbol.c +503 -0
- package/moddable/xs/sources/xsSyntaxical.c +4193 -0
- package/moddable/xs/sources/xsTree.c +1893 -0
- package/moddable/xs/sources/xsType.c +1488 -0
- package/moddable/xs/sources/xsdtoa.c +6672 -0
- package/moddable/xs/sources/xsmc.c +340 -0
- package/moddable/xs/sources/xsre.c +7578 -0
- package/package.json +37 -20
- package/scripts/get_xsnap_version.sh +14 -0
- package/scripts/test-package.sh +21 -0
- package/src/avaAssertXS.js +6 -2
- package/src/avaHandler.cjs +2 -5
- package/src/avaXS.js +7 -8
- package/src/build.js +161 -28
- package/src/replay.js +0 -3
- package/src/xsnap.js +105 -91
- package/src/xsrepl.js +2 -3
- package/xsnap-native/xsnap/makefiles/lin/makefile +10 -0
- package/xsnap-native/xsnap/makefiles/lin/xsnap-worker.mk +156 -0
- package/xsnap-native/xsnap/makefiles/lin/xsnap.mk +144 -0
- package/xsnap-native/xsnap/makefiles/mac/makefile +10 -0
- package/xsnap-native/xsnap/makefiles/mac/xsnap-worker.mk +165 -0
- package/xsnap-native/xsnap/makefiles/mac/xsnap.mk +153 -0
- package/xsnap-native/xsnap/sources/xsnap-worker.c +1008 -0
- package/xsnap-native/xsnap/sources/xsnap.c +717 -0
- package/xsnap-native/xsnap/sources/xsnap.h +142 -0
- package/xsnap-native/xsnap/sources/xsnapPlatform.c +1501 -0
- package/xsnap-native/xsnap/sources/xsnapPlatform.h +105 -0
- package/CHANGELOG.md +0 -654
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2016-2023 Moddable Tech, Inc.
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the Moddable SDK Tools.
|
|
5
|
+
#
|
|
6
|
+
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU General Public License
|
|
17
|
+
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
# This file incorporates work covered by the following copyright and
|
|
20
|
+
# permission notice:
|
|
21
|
+
#
|
|
22
|
+
# Copyright (C) 2010-2016 Marvell International Ltd.
|
|
23
|
+
# Copyright (C) 2002-2010 Kinoma, Inc.
|
|
24
|
+
#
|
|
25
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
# you may not use this file except in compliance with the License.
|
|
27
|
+
# You may obtain a copy of the License at
|
|
28
|
+
#
|
|
29
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
#
|
|
31
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
# See the License for the specific language governing permissions and
|
|
35
|
+
# limitations under the License.
|
|
36
|
+
#
|
|
37
|
+
|
|
38
|
+
!IFNDEF GOAL
|
|
39
|
+
GOAL = debug
|
|
40
|
+
!ENDIF
|
|
41
|
+
NAME = xsl
|
|
42
|
+
|
|
43
|
+
!IFNDEF XS_DIR
|
|
44
|
+
XS_DIR = ..\..
|
|
45
|
+
!ENDIF
|
|
46
|
+
|
|
47
|
+
!IFNDEF BUILD_DIR
|
|
48
|
+
BUILD_DIR = ..\..\..\build
|
|
49
|
+
!ENDIF
|
|
50
|
+
|
|
51
|
+
XSC = $(BUILD_DIR)\bin\win\$(GOAL)\xsc
|
|
52
|
+
|
|
53
|
+
BIN_DIR = $(BUILD_DIR)\bin\win\$(GOAL)
|
|
54
|
+
INC_DIR = $(XS_DIR)\includes
|
|
55
|
+
PLT_DIR = $(XS_DIR)\platforms
|
|
56
|
+
SRC_DIR = $(XS_DIR)\sources
|
|
57
|
+
TLS_DIR = $(XS_DIR)\tools
|
|
58
|
+
TMP_DIR = $(BUILD_DIR)\tmp\win\$(GOAL)\$(NAME)
|
|
59
|
+
|
|
60
|
+
C_OPTIONS = \
|
|
61
|
+
/c \
|
|
62
|
+
/D _CONSOLE \
|
|
63
|
+
/D WIN32 \
|
|
64
|
+
/D _CRT_SECURE_NO_DEPRECATE \
|
|
65
|
+
/D INCLUDE_XSPLATFORM \
|
|
66
|
+
/D XSPLATFORM=\"xslOpt.h\" \
|
|
67
|
+
/D mxLink=1 \
|
|
68
|
+
/D mxRun=1 \
|
|
69
|
+
/D mxNoFunctionLength=1 \
|
|
70
|
+
/D mxNoFunctionName=1 \
|
|
71
|
+
/D mxHostFunctionPrimitive=1 \
|
|
72
|
+
/D mxFewGlobalsTable=1 \
|
|
73
|
+
/I$(INC_DIR) \
|
|
74
|
+
/I$(PLT_DIR) \
|
|
75
|
+
/I$(SRC_DIR) \
|
|
76
|
+
/I$(TLS_DIR) \
|
|
77
|
+
/I$(TMP_DIR) \
|
|
78
|
+
/nologo \
|
|
79
|
+
/MP
|
|
80
|
+
!IF "$(GOAL)"=="debug"
|
|
81
|
+
C_OPTIONS = $(C_OPTIONS) \
|
|
82
|
+
/D _DEBUG \
|
|
83
|
+
/D mxDebug \
|
|
84
|
+
/Fp$(TMP_DIR_DBG)\ \
|
|
85
|
+
/Od \
|
|
86
|
+
/W3 \
|
|
87
|
+
/Z7
|
|
88
|
+
!ELSE
|
|
89
|
+
C_OPTIONS = $(C_OPTIONS) \
|
|
90
|
+
/D NDEBUG \
|
|
91
|
+
/Fp$(TMP_DIR_RLS)\ \
|
|
92
|
+
/O2 \
|
|
93
|
+
/W0
|
|
94
|
+
!ENDIF
|
|
95
|
+
|
|
96
|
+
LIBRARIES = ws2_32.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib user32.lib
|
|
97
|
+
|
|
98
|
+
LINK_OPTIONS = /incremental:no /nologo /subsystem:console
|
|
99
|
+
!IF "$(GOAL)"=="debug"
|
|
100
|
+
LINK_OPTIONS = $(LINK_OPTIONS) /debug
|
|
101
|
+
!ENDIF
|
|
102
|
+
|
|
103
|
+
OBJECTS = \
|
|
104
|
+
$(TMP_DIR)\xsAll.obj \
|
|
105
|
+
$(TMP_DIR)\xsAPI.obj \
|
|
106
|
+
$(TMP_DIR)\xsArguments.obj \
|
|
107
|
+
$(TMP_DIR)\xsArray.obj \
|
|
108
|
+
$(TMP_DIR)\xsAtomics.obj \
|
|
109
|
+
$(TMP_DIR)\xsBigInt.obj \
|
|
110
|
+
$(TMP_DIR)\xsBoolean.obj \
|
|
111
|
+
$(TMP_DIR)\xsCode.obj \
|
|
112
|
+
$(TMP_DIR)\xsCommon.obj \
|
|
113
|
+
$(TMP_DIR)\xsDataView.obj \
|
|
114
|
+
$(TMP_DIR)\xsDate.obj \
|
|
115
|
+
$(TMP_DIR)\xsDebug.obj \
|
|
116
|
+
$(TMP_DIR)\xsDefaults.obj \
|
|
117
|
+
$(TMP_DIR)\xsError.obj \
|
|
118
|
+
$(TMP_DIR)\xsFunction.obj \
|
|
119
|
+
$(TMP_DIR)\xsGenerator.obj \
|
|
120
|
+
$(TMP_DIR)\xsGlobal.obj \
|
|
121
|
+
$(TMP_DIR)\xsJSON.obj \
|
|
122
|
+
$(TMP_DIR)\xsLexical.obj \
|
|
123
|
+
$(TMP_DIR)\xsMapSet.obj \
|
|
124
|
+
$(TMP_DIR)\xsMarshall.obj \
|
|
125
|
+
$(TMP_DIR)\xsMath.obj \
|
|
126
|
+
$(TMP_DIR)\xsMemory.obj \
|
|
127
|
+
$(TMP_DIR)\xsModule.obj \
|
|
128
|
+
$(TMP_DIR)\xsNumber.obj \
|
|
129
|
+
$(TMP_DIR)\xsObject.obj \
|
|
130
|
+
$(TMP_DIR)\xsPlatforms.obj \
|
|
131
|
+
$(TMP_DIR)\xsPromise.obj \
|
|
132
|
+
$(TMP_DIR)\xsProperty.obj \
|
|
133
|
+
$(TMP_DIR)\xsProxy.obj \
|
|
134
|
+
$(TMP_DIR)\xsRegExp.obj \
|
|
135
|
+
$(TMP_DIR)\xsRun.obj \
|
|
136
|
+
$(TMP_DIR)\xsScope.obj \
|
|
137
|
+
$(TMP_DIR)\xsScript.obj \
|
|
138
|
+
$(TMP_DIR)\xsSourceMap.obj \
|
|
139
|
+
$(TMP_DIR)\xsString.obj \
|
|
140
|
+
$(TMP_DIR)\xsSymbol.obj \
|
|
141
|
+
$(TMP_DIR)\xsSyntaxical.obj \
|
|
142
|
+
$(TMP_DIR)\xsTree.obj \
|
|
143
|
+
$(TMP_DIR)\xsType.obj \
|
|
144
|
+
$(TMP_DIR)\xsdtoa.obj \
|
|
145
|
+
$(TMP_DIR)\xsre.obj \
|
|
146
|
+
$(TMP_DIR)\xslBase.obj \
|
|
147
|
+
$(TMP_DIR)\xslOpt.obj \
|
|
148
|
+
$(TMP_DIR)\xslSlot.obj \
|
|
149
|
+
$(TMP_DIR)\xslStrip.obj \
|
|
150
|
+
$(TMP_DIR)\xsl.obj
|
|
151
|
+
|
|
152
|
+
build : $(TMP_DIR) $(BIN_DIR) $(BIN_DIR)\$(NAME).exe
|
|
153
|
+
|
|
154
|
+
$(TMP_DIR) :
|
|
155
|
+
if not exist $(TMP_DIR)\$(NULL) mkdir $(TMP_DIR)
|
|
156
|
+
|
|
157
|
+
$(BIN_DIR) :
|
|
158
|
+
if not exist $(BIN_DIR)\$(NULL) mkdir $(BIN_DIR)
|
|
159
|
+
|
|
160
|
+
$(BIN_DIR)\$(NAME).exe : $(OBJECTS)
|
|
161
|
+
link \
|
|
162
|
+
$(LINK_OPTIONS) \
|
|
163
|
+
$(LIBRARIES) \
|
|
164
|
+
$(OBJECTS) \
|
|
165
|
+
/implib:$(TMP_DIR)\$(NAME).lib \
|
|
166
|
+
/out:$(BIN_DIR)\$(NAME).exe
|
|
167
|
+
|
|
168
|
+
$(OBJECTS) : $(PLT_DIR)\xsPlatform.h
|
|
169
|
+
$(OBJECTS) : $(SRC_DIR)\xsCommon.h
|
|
170
|
+
$(OBJECTS) : $(SRC_DIR)\xsAll.h
|
|
171
|
+
$(OBJECTS) : $(TLS_DIR)\xsl.h
|
|
172
|
+
$(OBJECTS) : $(TLS_DIR)\xslOpt.h
|
|
173
|
+
|
|
174
|
+
{$(SRC_DIR)\}.c{$(TMP_DIR)\}.obj::
|
|
175
|
+
cd $(TMP_DIR)
|
|
176
|
+
cl $< $(C_OPTIONS)
|
|
177
|
+
{$(TLS_DIR)\}.c{$(TMP_DIR)\}.obj::
|
|
178
|
+
cd $(TMP_DIR)
|
|
179
|
+
cl $< $(C_OPTIONS)
|
|
180
|
+
|
|
181
|
+
clean :
|
|
182
|
+
del /Q $(BUILD_DIR)\bin\win\debug\$(NAME).exe
|
|
183
|
+
del /Q $(BUILD_DIR)\bin\win\release\$(NAME).exe
|
|
184
|
+
del /Q $(BUILD_DIR)\tmp\win\debug\$(NAME)
|
|
185
|
+
del /Q $(BUILD_DIR)\tmp\win\release\$(NAME)
|
|
186
|
+
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2016-2023 Moddable Tech, Inc.
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the Moddable SDK Tools.
|
|
5
|
+
#
|
|
6
|
+
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU General Public License
|
|
17
|
+
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
!IFNDEF GOAL
|
|
21
|
+
GOAL = debug
|
|
22
|
+
!ENDIF
|
|
23
|
+
NAME = xst
|
|
24
|
+
|
|
25
|
+
!IFNDEF XS_DIR
|
|
26
|
+
XS_DIR = ..\..
|
|
27
|
+
!ENDIF
|
|
28
|
+
|
|
29
|
+
!IFNDEF BUILD_DIR
|
|
30
|
+
BUILD_DIR = ..\..\..\build
|
|
31
|
+
!ENDIF
|
|
32
|
+
|
|
33
|
+
BIN_DIR = $(BUILD_DIR)\bin\win\$(GOAL)
|
|
34
|
+
INC_DIR = $(XS_DIR)\includes
|
|
35
|
+
PLT_DIR = $(XS_DIR)\platforms
|
|
36
|
+
SRC_DIR = $(XS_DIR)\sources
|
|
37
|
+
TLS_DIR = $(XS_DIR)\tools
|
|
38
|
+
TMP_DIR = $(BUILD_DIR)\tmp\win\$(GOAL)\$(NAME)
|
|
39
|
+
|
|
40
|
+
C_OPTIONS = \
|
|
41
|
+
/c \
|
|
42
|
+
/D _CONSOLE \
|
|
43
|
+
/D WIN32 \
|
|
44
|
+
/D _CRT_SECURE_NO_DEPRECATE \
|
|
45
|
+
/D YAML_DECLARE_STATIC \
|
|
46
|
+
/D INCLUDE_XSPLATFORM \
|
|
47
|
+
/D XSPLATFORM=\"xst.h\" \
|
|
48
|
+
/D mxDebug=1 \
|
|
49
|
+
/D mxDeepQual=1 \
|
|
50
|
+
/D mxLockdown=1 \
|
|
51
|
+
/D mxNoConsole=1 \
|
|
52
|
+
/D mxParse=1 \
|
|
53
|
+
/D mxProfile=1 \
|
|
54
|
+
/D mxRun=1 \
|
|
55
|
+
/D mxSloppy=1 \
|
|
56
|
+
/D mxSnapshot=1 \
|
|
57
|
+
/D mxRegExpUnicodePropertyEscapes=1 \
|
|
58
|
+
/D mxStringNormalize=1 \
|
|
59
|
+
/D mxMinusZero=1 \
|
|
60
|
+
/I$(INC_DIR) \
|
|
61
|
+
/I$(PLT_DIR) \
|
|
62
|
+
/I$(SRC_DIR) \
|
|
63
|
+
/I$(TLS_DIR) \
|
|
64
|
+
/I$(TLS_DIR)\yaml \
|
|
65
|
+
/nologo \
|
|
66
|
+
/MP
|
|
67
|
+
!IF "$(GOAL)"=="debug"
|
|
68
|
+
C_OPTIONS = $(C_OPTIONS) \
|
|
69
|
+
/D _DEBUG \
|
|
70
|
+
/Fp$(TMP_DIR_DBG)\ \
|
|
71
|
+
/Od \
|
|
72
|
+
/W3 \
|
|
73
|
+
/Z7
|
|
74
|
+
!ELSE
|
|
75
|
+
C_OPTIONS = $(C_OPTIONS) \
|
|
76
|
+
/D mxMultipleThreads=1 \
|
|
77
|
+
/D NDEBUG \
|
|
78
|
+
/Fp$(TMP_DIR_RLS)\ \
|
|
79
|
+
/O2 \
|
|
80
|
+
/W0
|
|
81
|
+
!ENDIF
|
|
82
|
+
|
|
83
|
+
LIBRARIES = ws2_32.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib user32.lib
|
|
84
|
+
|
|
85
|
+
LINK_OPTIONS = /incremental:no /nologo /subsystem:console
|
|
86
|
+
!IF "$(GOAL)"=="debug"
|
|
87
|
+
LINK_OPTIONS = $(LINK_OPTIONS) /debug
|
|
88
|
+
!ENDIF
|
|
89
|
+
|
|
90
|
+
OBJECTS = \
|
|
91
|
+
$(TMP_DIR)\xsAll.obj \
|
|
92
|
+
$(TMP_DIR)\xsAPI.obj \
|
|
93
|
+
$(TMP_DIR)\xsArguments.obj \
|
|
94
|
+
$(TMP_DIR)\xsArray.obj \
|
|
95
|
+
$(TMP_DIR)\xsAtomics.obj \
|
|
96
|
+
$(TMP_DIR)\xsBigInt.obj \
|
|
97
|
+
$(TMP_DIR)\xsBoolean.obj \
|
|
98
|
+
$(TMP_DIR)\xsCode.obj \
|
|
99
|
+
$(TMP_DIR)\xsCommon.obj \
|
|
100
|
+
$(TMP_DIR)\xsDataView.obj \
|
|
101
|
+
$(TMP_DIR)\xsDate.obj \
|
|
102
|
+
$(TMP_DIR)\xsDebug.obj \
|
|
103
|
+
$(TMP_DIR)\xsDefaults.obj \
|
|
104
|
+
$(TMP_DIR)\xsError.obj \
|
|
105
|
+
$(TMP_DIR)\xsFunction.obj \
|
|
106
|
+
$(TMP_DIR)\xsGenerator.obj \
|
|
107
|
+
$(TMP_DIR)\xsGlobal.obj \
|
|
108
|
+
$(TMP_DIR)\xsJSON.obj \
|
|
109
|
+
$(TMP_DIR)\xsLexical.obj \
|
|
110
|
+
$(TMP_DIR)\xsLockdown.obj \
|
|
111
|
+
$(TMP_DIR)\xsMapSet.obj \
|
|
112
|
+
$(TMP_DIR)\xsMarshall.obj \
|
|
113
|
+
$(TMP_DIR)\xsMath.obj \
|
|
114
|
+
$(TMP_DIR)\xsMemory.obj \
|
|
115
|
+
$(TMP_DIR)\xsModule.obj \
|
|
116
|
+
$(TMP_DIR)\xsNumber.obj \
|
|
117
|
+
$(TMP_DIR)\xsObject.obj \
|
|
118
|
+
$(TMP_DIR)\xsPlatforms.obj \
|
|
119
|
+
$(TMP_DIR)\xsProfile.obj \
|
|
120
|
+
$(TMP_DIR)\xsPromise.obj \
|
|
121
|
+
$(TMP_DIR)\xsProperty.obj \
|
|
122
|
+
$(TMP_DIR)\xsProxy.obj \
|
|
123
|
+
$(TMP_DIR)\xsRegExp.obj \
|
|
124
|
+
$(TMP_DIR)\xsRun.obj \
|
|
125
|
+
$(TMP_DIR)\xsScope.obj \
|
|
126
|
+
$(TMP_DIR)\xsScript.obj \
|
|
127
|
+
$(TMP_DIR)\xsSourceMap.obj \
|
|
128
|
+
$(TMP_DIR)\xsString.obj \
|
|
129
|
+
$(TMP_DIR)\xsSymbol.obj \
|
|
130
|
+
$(TMP_DIR)\xsSyntaxical.obj \
|
|
131
|
+
$(TMP_DIR)\xsTree.obj \
|
|
132
|
+
$(TMP_DIR)\xsType.obj \
|
|
133
|
+
$(TMP_DIR)\xsdtoa.obj \
|
|
134
|
+
$(TMP_DIR)\xsre.obj \
|
|
135
|
+
$(TMP_DIR)\api.obj \
|
|
136
|
+
$(TMP_DIR)\dumper.obj \
|
|
137
|
+
$(TMP_DIR)\emitter.obj \
|
|
138
|
+
$(TMP_DIR)\loader.obj \
|
|
139
|
+
$(TMP_DIR)\parser.obj \
|
|
140
|
+
$(TMP_DIR)\reader.obj \
|
|
141
|
+
$(TMP_DIR)\scanner.obj \
|
|
142
|
+
$(TMP_DIR)\writer.obj \
|
|
143
|
+
$(TMP_DIR)\xsmc.obj \
|
|
144
|
+
$(TMP_DIR)\textdecoder.obj \
|
|
145
|
+
$(TMP_DIR)\textencoder.obj \
|
|
146
|
+
$(TMP_DIR)\modBase64.obj \
|
|
147
|
+
$(TMP_DIR)\xst.obj
|
|
148
|
+
|
|
149
|
+
build : $(TMP_DIR) $(BIN_DIR) $(BIN_DIR)\$(NAME).exe
|
|
150
|
+
|
|
151
|
+
$(TMP_DIR) :
|
|
152
|
+
if not exist $(TMP_DIR)\$(NULL) mkdir $(TMP_DIR)
|
|
153
|
+
|
|
154
|
+
$(BIN_DIR) :
|
|
155
|
+
if not exist $(BIN_DIR)\$(NULL) mkdir $(BIN_DIR)
|
|
156
|
+
|
|
157
|
+
$(BIN_DIR)\$(NAME).exe : $(OBJECTS)
|
|
158
|
+
link \
|
|
159
|
+
$(LINK_OPTIONS) \
|
|
160
|
+
$(LIBRARIES) \
|
|
161
|
+
$(OBJECTS) \
|
|
162
|
+
/implib:$(TMP_DIR)\$(NAME).lib \
|
|
163
|
+
/out:$(BIN_DIR)\$(NAME).exe
|
|
164
|
+
|
|
165
|
+
$(OBJECTS) : $(TLS_DIR)\xst.h
|
|
166
|
+
$(OBJECTS) : $(PLT_DIR)\xsPlatform.h
|
|
167
|
+
$(OBJECTS) : $(SRC_DIR)\xsCommon.h
|
|
168
|
+
$(OBJECTS) : $(SRC_DIR)\xsAll.h
|
|
169
|
+
$(OBJECTS) : $(SRC_DIR)\xsScript.h
|
|
170
|
+
|
|
171
|
+
{$(SRC_DIR)\}.c{$(TMP_DIR)\}.obj::
|
|
172
|
+
cd $(TMP_DIR)
|
|
173
|
+
cl $< $(C_OPTIONS)
|
|
174
|
+
{$(TLS_DIR)\}.c{$(TMP_DIR)\}.obj::
|
|
175
|
+
cd $(TMP_DIR)
|
|
176
|
+
cl $< $(C_OPTIONS)
|
|
177
|
+
{$(TLS_DIR)\yaml\}.c{$(TMP_DIR)\}.obj::
|
|
178
|
+
cd $(TMP_DIR)
|
|
179
|
+
cl $< $(C_OPTIONS)
|
|
180
|
+
{$(MODDABLE)\modules\data\text\decoder\}.c{$(TMP_DIR)\}.obj:
|
|
181
|
+
cd $(TMP_DIR)
|
|
182
|
+
cl $< $(C_OPTIONS)
|
|
183
|
+
{$(MODDABLE)\modules\data\text\encoder\}.c{$(TMP_DIR)\}.obj:
|
|
184
|
+
cd $(TMP_DIR)
|
|
185
|
+
cl $< $(C_OPTIONS)
|
|
186
|
+
{$(MODDABLE)\modules\data\base64\}.c{$(TMP_DIR)\}.obj:
|
|
187
|
+
cd $(TMP_DIR)
|
|
188
|
+
cl $< $(C_OPTIONS)
|
|
189
|
+
|
|
190
|
+
clean :
|
|
191
|
+
del /Q $(BUILD_DIR)\bin\win\debug\$(NAME).exe
|
|
192
|
+
del /Q $(BUILD_DIR)\bin\win\release\$(NAME).exe
|
|
193
|
+
del /Q $(BUILD_DIR)\tmp\win\debug\$(NAME)
|
|
194
|
+
del /Q $(BUILD_DIR)\tmp\win\release\$(NAME)
|
|
195
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2017 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Runtime.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Runtime is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Runtime is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU Lesser General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
* along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
* This file incorporates work covered by the following copyright and
|
|
20
|
+
* permission notice:
|
|
21
|
+
*
|
|
22
|
+
* Copyright (C) 2010-2016 Marvell International Ltd.
|
|
23
|
+
* Copyright (C) 2002-2010 Kinoma, Inc.
|
|
24
|
+
*
|
|
25
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
* you may not use this file except in compliance with the License.
|
|
27
|
+
* You may obtain a copy of the License at
|
|
28
|
+
*
|
|
29
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
*
|
|
31
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
* See the License for the specific language governing permissions and
|
|
35
|
+
* limitations under the License.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
#ifndef __LINUX_XS__
|
|
39
|
+
#define __LINUX_XS__
|
|
40
|
+
|
|
41
|
+
#undef mxLinux
|
|
42
|
+
#define mxLinux 1
|
|
43
|
+
|
|
44
|
+
#include <ctype.h>
|
|
45
|
+
#include <float.h>
|
|
46
|
+
#include <math.h>
|
|
47
|
+
#include <setjmp.h>
|
|
48
|
+
#include <stdarg.h>
|
|
49
|
+
#include <stdint.h>
|
|
50
|
+
#include <stdio.h>
|
|
51
|
+
#include <stdlib.h>
|
|
52
|
+
#include <string.h>
|
|
53
|
+
#include <time.h>
|
|
54
|
+
|
|
55
|
+
#include <arpa/inet.h>
|
|
56
|
+
#include <errno.h>
|
|
57
|
+
#include <gio/gio.h>
|
|
58
|
+
#include <pthread.h>
|
|
59
|
+
#include <unistd.h>
|
|
60
|
+
#include <stdbool.h>
|
|
61
|
+
|
|
62
|
+
#define mxUseGCCAtomics 1
|
|
63
|
+
#define mxUsePOSIXThreads 1
|
|
64
|
+
|
|
65
|
+
#define mxUseDefaultBuildKeys 1
|
|
66
|
+
#define mxUseDefaultChunkAllocation 1
|
|
67
|
+
#define mxUseDefaultSlotAllocation 1
|
|
68
|
+
#define mxUseDefaultFindModule 1
|
|
69
|
+
#define mxUseDefaultLoadModule 1
|
|
70
|
+
#define mxUseDefaultParseScript 1
|
|
71
|
+
#define mxUseDefaultSharedChunks 1
|
|
72
|
+
|
|
73
|
+
typedef struct sxWorkerJob txWorkerJob;
|
|
74
|
+
typedef void (*txWorkerCallback)(void* machine, void* job);
|
|
75
|
+
|
|
76
|
+
struct sxWorkerJob {
|
|
77
|
+
txWorkerJob* next;
|
|
78
|
+
txWorkerCallback callback;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
extern void fxQueueWorkerJob(void* machine, void* job);
|
|
82
|
+
|
|
83
|
+
#define mxMachinePlatform \
|
|
84
|
+
void* host; \
|
|
85
|
+
GSocket* socket; \
|
|
86
|
+
GSource* source; \
|
|
87
|
+
void* waiterCondition; \
|
|
88
|
+
void* waiterData; \
|
|
89
|
+
void* waiterLink; \
|
|
90
|
+
GMainContext* workerContext; \
|
|
91
|
+
GMutex workerMutex; \
|
|
92
|
+
txWorkerJob* workerQueue; \
|
|
93
|
+
void* demarshall;
|
|
94
|
+
|
|
95
|
+
#ifdef mxDebug
|
|
96
|
+
#define MODDEF_XS_TEST 1
|
|
97
|
+
#endif
|
|
98
|
+
|
|
99
|
+
#endif /* __LINUX_XS__ */
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2017 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Runtime.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Runtime is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Runtime is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU Lesser General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
* along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
* This file incorporates work covered by the following copyright and
|
|
20
|
+
* permission notice:
|
|
21
|
+
*
|
|
22
|
+
* Copyright (C) 2010-2016 Marvell International Ltd.
|
|
23
|
+
* Copyright (C) 2002-2010 Kinoma, Inc.
|
|
24
|
+
*
|
|
25
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
* you may not use this file except in compliance with the License.
|
|
27
|
+
* You may obtain a copy of the License at
|
|
28
|
+
*
|
|
29
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
*
|
|
31
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
* See the License for the specific language governing permissions and
|
|
35
|
+
* limitations under the License.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
#ifndef __MAC_XS__
|
|
39
|
+
#define __MAC_XS__
|
|
40
|
+
|
|
41
|
+
#undef mxMacOSX
|
|
42
|
+
#define mxMacOSX 1
|
|
43
|
+
|
|
44
|
+
#include <ctype.h>
|
|
45
|
+
#include <float.h>
|
|
46
|
+
#include <math.h>
|
|
47
|
+
#include <setjmp.h>
|
|
48
|
+
#include <stdarg.h>
|
|
49
|
+
#include <stdint.h>
|
|
50
|
+
#include <stdio.h>
|
|
51
|
+
#include <stdlib.h>
|
|
52
|
+
#include <string.h>
|
|
53
|
+
#include <time.h>
|
|
54
|
+
|
|
55
|
+
#include <pthread.h>
|
|
56
|
+
#include <CoreServices/CoreServices.h>
|
|
57
|
+
|
|
58
|
+
#define mxUseGCCAtomics 1
|
|
59
|
+
#define mxUsePOSIXThreads 1
|
|
60
|
+
|
|
61
|
+
#define mxUseDefaultBuildKeys 1
|
|
62
|
+
#define mxUseDefaultChunkAllocation 1
|
|
63
|
+
#define mxUseDefaultSlotAllocation 1
|
|
64
|
+
#define mxUseDefaultFindModule 1
|
|
65
|
+
#define mxUseDefaultLoadModule 1
|
|
66
|
+
#define mxUseDefaultParseScript 1
|
|
67
|
+
#define mxUseDefaultSharedChunks 1
|
|
68
|
+
|
|
69
|
+
typedef struct sxWorkerJob txWorkerJob;
|
|
70
|
+
typedef void (*txWorkerCallback)(void* machine, void* job);
|
|
71
|
+
|
|
72
|
+
struct sxWorkerJob {
|
|
73
|
+
txWorkerJob* next;
|
|
74
|
+
txWorkerCallback callback;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
extern void fxQueueWorkerJob(void* machine, void* job);
|
|
78
|
+
|
|
79
|
+
#define mxMachinePlatform \
|
|
80
|
+
CFSocketRef connection; \
|
|
81
|
+
CFRunLoopSourceRef connectionSource; \
|
|
82
|
+
void* host; \
|
|
83
|
+
CFRunLoopSourceRef promiseSource; \
|
|
84
|
+
void* waiterCondition; \
|
|
85
|
+
void* waiterData; \
|
|
86
|
+
void* waiterLink; \
|
|
87
|
+
pthread_mutex_t workerMutex; \
|
|
88
|
+
CFRunLoopRef workerLoop; \
|
|
89
|
+
txWorkerJob* workerQueue; \
|
|
90
|
+
CFRunLoopSourceRef workerSource; \
|
|
91
|
+
void* demarshall;
|
|
92
|
+
|
|
93
|
+
#ifdef mxDebug
|
|
94
|
+
#define MODDEF_XS_TEST 1
|
|
95
|
+
#endif
|
|
96
|
+
|
|
97
|
+
#endif /* __MAC_XS__ */
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2017 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Runtime.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Runtime is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Runtime is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU Lesser General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
* along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
* This file incorporates work covered by the following copyright and
|
|
20
|
+
* permission notice:
|
|
21
|
+
*
|
|
22
|
+
* Copyright (C) 2010-2016 Marvell International Ltd.
|
|
23
|
+
* Copyright (C) 2002-2010 Kinoma, Inc.
|
|
24
|
+
*
|
|
25
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
* you may not use this file except in compliance with the License.
|
|
27
|
+
* You may obtain a copy of the License at
|
|
28
|
+
*
|
|
29
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
*
|
|
31
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
* See the License for the specific language governing permissions and
|
|
35
|
+
* limitations under the License.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
#ifndef __WASM_XS__
|
|
39
|
+
#define __WASM_XS__
|
|
40
|
+
|
|
41
|
+
#undef mxWasm
|
|
42
|
+
#define mxWasm 1
|
|
43
|
+
|
|
44
|
+
#include <ctype.h>
|
|
45
|
+
#include <float.h>
|
|
46
|
+
#include <math.h>
|
|
47
|
+
#include <setjmp.h>
|
|
48
|
+
#include <stdarg.h>
|
|
49
|
+
#include <stddef.h>
|
|
50
|
+
#include <stdint.h>
|
|
51
|
+
#include <stdio.h>
|
|
52
|
+
#include <stdlib.h>
|
|
53
|
+
#include <string.h>
|
|
54
|
+
#include <time.h>
|
|
55
|
+
|
|
56
|
+
#include <arpa/inet.h>
|
|
57
|
+
#include <errno.h>
|
|
58
|
+
#include <netinet/in.h>
|
|
59
|
+
#include <pthread.h>
|
|
60
|
+
#include <unistd.h>
|
|
61
|
+
|
|
62
|
+
#define mxUseGCCAtomics 1
|
|
63
|
+
#define mxUsePOSIXThreads 1
|
|
64
|
+
|
|
65
|
+
#define mxUseDefaultBuildKeys 1
|
|
66
|
+
#define mxUseDefaultChunkAllocation 1
|
|
67
|
+
#define mxUseDefaultSlotAllocation 1
|
|
68
|
+
#define mxUseDefaultFindModule 1
|
|
69
|
+
#define mxUseDefaultLoadModule 1
|
|
70
|
+
#define mxUseDefaultParseScript 1
|
|
71
|
+
#define mxUseDefaultSharedChunks 1
|
|
72
|
+
|
|
73
|
+
#define mxMachinePlatform \
|
|
74
|
+
void* host; \
|
|
75
|
+
void* waiterCondition; \
|
|
76
|
+
void* waiterData; \
|
|
77
|
+
void* waiterLink;
|
|
78
|
+
|
|
79
|
+
#endif /* __WASM_XS__ */
|