@idlizer/arktscgen 2.1.10-arktscgen-7 → 2.1.10-arktscgen-9
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/build/libarkts-copy/generator/options.json5 +88 -97
- package/build/libarkts-copy/native/meson.build +56 -3
- package/build/libarkts-copy/native/mingw.cross +2 -5
- package/build/libarkts-copy/native/src/bridges.cpp +1 -269
- package/build/libarkts-copy/native/src/common.cpp +49 -67
- package/build/libarkts-copy/native/src/common.h +0 -15
- package/build/libarkts-copy/package.json +4 -8
- package/build/libarkts-copy/src/Es2pandaNativeModule.ts +0 -56
- package/build/libarkts-copy/src/arkts-api/index.ts +0 -1
- package/build/libarkts-copy/src/arkts-api/node-utilities/OpaqueTypeNode.ts +1 -1
- package/build/libarkts-copy/src/arkts-api/peers/Context.ts +25 -58
- package/build/libarkts-copy/src/arkts-api/peers/ExternalSource.ts +8 -13
- package/build/libarkts-copy/src/arkts-api/plugins.ts +2 -2
- package/build/libarkts-copy/src/arkts-api/static/global.ts +8 -1
- package/build/libarkts-copy/src/arkts-api/utilities/extensions.ts +9 -12
- package/build/libarkts-copy/src/arkts-api/utilities/private.ts +3 -0
- package/build/libarkts-copy/src/arkts-api/utilities/public.ts +8 -5
- package/build/libarkts-copy/src/index.ts +0 -1
- package/build/libarkts-copy/src/plugin-utils.ts +2 -1
- package/build/libarkts-copy/src/reexport-for-generated.ts +2 -1
- package/lib/index.js +305 -198
- package/package.json +3 -4
- package/templates/Es2pandaNativeModule.ts +1 -0
- package/templates/peer.ts +1 -0
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"es2panda_Config",
|
|
27
27
|
"es2panda_Context",
|
|
28
28
|
"es2panda_GlobalContext",
|
|
29
|
+
"es2panda_ExternalSource",
|
|
29
30
|
],
|
|
30
31
|
"full": [
|
|
31
|
-
"es2panda_ExternalSource",
|
|
32
32
|
"es2panda_OverloadInfo",
|
|
33
33
|
|
|
34
34
|
'NodeTransformer',
|
|
@@ -41,8 +41,14 @@
|
|
|
41
41
|
'PropertyProcessor',
|
|
42
42
|
'PropertyTraverser',
|
|
43
43
|
|
|
44
|
-
'checker
|
|
45
|
-
'
|
|
44
|
+
'checker.ETSFunctionType', // conflict with ir
|
|
45
|
+
'checker.ETSUnionType',
|
|
46
|
+
'checker.ETSNullType',
|
|
47
|
+
'checker.ETSUndefinedType',
|
|
48
|
+
'checker.TypeParameter', // invalid args for a bridge
|
|
49
|
+
|
|
50
|
+
// ETSParser has no classInstance(receiver) argument,
|
|
51
|
+
// may be fixed in generator.
|
|
46
52
|
'parser.*',
|
|
47
53
|
'util.*',
|
|
48
54
|
'gen.*',
|
|
@@ -51,21 +57,47 @@
|
|
|
51
57
|
|
|
52
58
|
'parser.Program!',
|
|
53
59
|
'es2panda.ArkTsConfig!',
|
|
54
|
-
// Do not support node type
|
|
55
|
-
//'varbinder.FunctionDecl!',
|
|
56
|
-
//'varbinder.InterfaceDecl!',
|
|
57
|
-
// MemberExpression has checker.ETSFunctionType ExtensionAccessorTypeConst(es2panda_Context context);
|
|
58
|
-
//'checker.ETSFunctionType!',
|
|
59
|
-
//'ir.ETSFunctionType',
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
"varbinder.EnumVariable", // use typedef to union
|
|
62
|
+
"varbinder.ETSBinder", // char**
|
|
63
|
+
"varbinder.AnnotationUsage", // duplicate bridge
|
|
64
|
+
// These classes are descendants of AstNode
|
|
65
|
+
// and has a astTypeNode hint parameter in ctor
|
|
66
|
+
// because they are in another namespace (classes
|
|
67
|
+
// that have descendants do not have this parameter).
|
|
68
|
+
// Changing this behaviour in generator may cause regression.
|
|
69
|
+
"varbinder.InterfaceDecl",
|
|
70
|
+
"varbinder.FunctionDecl",
|
|
71
|
+
"varbinder.RecordTable",
|
|
72
|
+
|
|
73
|
+
// C api needs AstNode descendant but it isn't.
|
|
74
|
+
// TypedAstNode is.
|
|
63
75
|
'ir.Typed',
|
|
76
|
+
// These are empty.
|
|
77
|
+
'ir.Annotated',
|
|
64
78
|
'ir.VectorIterationGuard',
|
|
65
79
|
|
|
66
80
|
'VoidPtr',
|
|
67
81
|
],
|
|
68
82
|
"partial": [
|
|
83
|
+
{
|
|
84
|
+
interface: "TypeNode",
|
|
85
|
+
methods: [
|
|
86
|
+
"GetType", // overlap base
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
interface: "Scope",
|
|
91
|
+
methods: [
|
|
92
|
+
"MergeBindings", // char**
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
interface: "ModuleScope",
|
|
97
|
+
methods: [
|
|
98
|
+
"LocalExportsConst" // char**
|
|
99
|
+
]
|
|
100
|
+
},
|
|
69
101
|
{
|
|
70
102
|
interface: "es2panda_Impl",
|
|
71
103
|
methods: [
|
|
@@ -74,9 +106,7 @@
|
|
|
74
106
|
|
|
75
107
|
// Handwritten bridges
|
|
76
108
|
"ConfigGetOptions", // handwritten class
|
|
77
|
-
"ExternalSourceName", // handwritten class and used in panda API
|
|
78
109
|
"SourcePositionCol", // not in idl
|
|
79
|
-
"ExternalSourcePrograms", // Wrong args
|
|
80
110
|
"LogDiagnostic", // not in idl
|
|
81
111
|
"CreateDiagnosticKind",
|
|
82
112
|
"GetSemanticErrors",
|
|
@@ -84,24 +114,16 @@
|
|
|
84
114
|
"GetPluginErrors",
|
|
85
115
|
"GetWarnings",
|
|
86
116
|
"NumberLiteralStrConst",
|
|
87
|
-
"MemInitialize",
|
|
88
|
-
"MemFinalize",
|
|
89
117
|
],
|
|
90
118
|
},
|
|
91
119
|
{
|
|
92
120
|
interface: "MethodDefinition",
|
|
93
121
|
methods: [
|
|
94
|
-
"GetOverloadInfo", //
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
interface: "Decl", // handwritten bridge
|
|
99
|
-
methods: [
|
|
100
|
-
"Node"
|
|
122
|
+
"GetOverloadInfo", // returns es2panda_OverloadInfo which is data class
|
|
101
123
|
]
|
|
102
124
|
},
|
|
103
125
|
{
|
|
104
|
-
interface: "ETSParser", // handwritten bridge
|
|
126
|
+
interface: "ETSParser", // handwritten bridge, fully ignored above.
|
|
105
127
|
methods: [
|
|
106
128
|
"BuildImportDeclaration",
|
|
107
129
|
"CreateExpression",
|
|
@@ -109,37 +131,6 @@
|
|
|
109
131
|
"GetImportPathManager",
|
|
110
132
|
]
|
|
111
133
|
},
|
|
112
|
-
{
|
|
113
|
-
interface: "Program", // handwritten bridge
|
|
114
|
-
methods: [
|
|
115
|
-
"DirectExternalSources",
|
|
116
|
-
"ExternalSources",
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
interface: "Scope", // handwritten bridge
|
|
121
|
-
methods: [
|
|
122
|
-
"SetParent",
|
|
123
|
-
]
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
interface: "Signature", // handwritten bridge
|
|
127
|
-
methods: [
|
|
128
|
-
"Function",
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
interface: "TSInterfaceBody", // handwritten bridge
|
|
133
|
-
methods: [
|
|
134
|
-
"BodyPtr",
|
|
135
|
-
]
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
interface: "AnnotationDeclaration",
|
|
139
|
-
methods: [
|
|
140
|
-
"PropertiesPtrConst" // interfaces create-to-param matching
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
134
|
{
|
|
144
135
|
interface: "NumberLiteral",
|
|
145
136
|
methods: [
|
|
@@ -149,33 +140,16 @@
|
|
|
149
140
|
"SetFloat"
|
|
150
141
|
]
|
|
151
142
|
},
|
|
152
|
-
{
|
|
153
|
-
interface: "AnnotationUsage",
|
|
154
|
-
methods: [
|
|
155
|
-
"PropertiesPtrConst" // interfaces create-to-param matching
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
interface: "TSInterfaceBody",
|
|
160
|
-
methods: [
|
|
161
|
-
"BodyPtr" // interfaces create-to-param matching
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
interface: "Signature",
|
|
166
|
-
methods: [
|
|
167
|
-
"ProtectionFlagConst" // u8
|
|
168
|
-
]
|
|
169
|
-
},
|
|
170
143
|
{
|
|
171
144
|
interface: "ETSReExportDeclaration",
|
|
172
145
|
methods: [
|
|
173
|
-
"Create", //
|
|
174
|
-
"Update", //
|
|
175
|
-
"GetUserPathsConst" // sequence<String>
|
|
146
|
+
"Create", // char**
|
|
147
|
+
"Update", // char**
|
|
148
|
+
"GetUserPathsConst" // returns sequence<String>
|
|
176
149
|
]
|
|
177
150
|
},
|
|
178
151
|
{
|
|
152
|
+
// Unclear why it's ignored
|
|
179
153
|
interface: "CharLiteral",
|
|
180
154
|
methods: [
|
|
181
155
|
"Create1", // KShort,
|
|
@@ -183,47 +157,61 @@
|
|
|
183
157
|
"CharConst", // KShort
|
|
184
158
|
]
|
|
185
159
|
},
|
|
186
|
-
{
|
|
187
|
-
interface: "ForUpdateStatement",
|
|
188
|
-
methods: [
|
|
189
|
-
"Update" // forbidden naming
|
|
190
|
-
]
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
interface: "CallExpression",
|
|
194
|
-
methods: [
|
|
195
|
-
"Update" // differs from handwritten
|
|
196
|
-
]
|
|
197
|
-
},
|
|
198
160
|
{
|
|
199
161
|
interface: "TryStatement",
|
|
200
162
|
methods: [
|
|
201
|
-
"AddFinalizerInsertion" //
|
|
202
|
-
]
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
interface: "MemberExpression",
|
|
206
|
-
methods: [
|
|
207
|
-
"SetExtensionAccessorType" // ETSFunction type ambiguity
|
|
163
|
+
"AddFinalizerInsertion" // non-const to const return conversion
|
|
208
164
|
]
|
|
209
165
|
},
|
|
210
166
|
{
|
|
211
167
|
interface: "ArkTsConfig",
|
|
212
168
|
methods: [
|
|
213
|
-
"EntriesConst",
|
|
214
169
|
"FilesConst",
|
|
215
|
-
"Parse",
|
|
216
170
|
]
|
|
217
171
|
},
|
|
218
172
|
{
|
|
219
173
|
interface: "ClassDefinition",
|
|
220
174
|
methods: [
|
|
221
|
-
"SetBody", // handwritten
|
|
175
|
+
"SetBody", // handwritten, no such method in idl.
|
|
176
|
+
// probably, an optimized version.
|
|
222
177
|
]
|
|
223
178
|
},
|
|
224
179
|
]
|
|
225
180
|
},
|
|
226
181
|
nonNullable: [
|
|
182
|
+
{
|
|
183
|
+
name: "es2panda_Impl",
|
|
184
|
+
methods: [
|
|
185
|
+
{
|
|
186
|
+
name: "CreateContextFromString",
|
|
187
|
+
types: ["returnType"],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: "CreateContextFromFile",
|
|
191
|
+
types: ["returnType"],
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: "CreateCacheContextFromFile",
|
|
195
|
+
types: ["returnType"],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "CreateContextGenerateAbcForExternalSourceFiles",
|
|
199
|
+
types: ["returnType"],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "CreateContextFromStringWithHistory",
|
|
203
|
+
types: ["returnType"],
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: "ContextProgram",
|
|
207
|
+
types: ["returnType"],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "CreateGlobalContext",
|
|
211
|
+
types: ["returnType"],
|
|
212
|
+
},
|
|
213
|
+
],
|
|
214
|
+
},
|
|
227
215
|
{
|
|
228
216
|
name: "ArrowFunctionExpression",
|
|
229
217
|
methods: [
|
|
@@ -601,6 +589,9 @@
|
|
|
601
589
|
{
|
|
602
590
|
name: "annotations",
|
|
603
591
|
},
|
|
592
|
+
{
|
|
593
|
+
name: "modifierFlags",
|
|
594
|
+
},
|
|
604
595
|
],
|
|
605
596
|
},
|
|
606
597
|
],
|
|
@@ -40,12 +40,66 @@ cflags = [
|
|
|
40
40
|
'-DKOALA_NAPI',
|
|
41
41
|
]
|
|
42
42
|
|
|
43
|
+
ldflags = []
|
|
44
|
+
|
|
43
45
|
if (host_machine.system() == 'windows')
|
|
44
46
|
cflags += ['-DKOALA_WINDOWS']
|
|
45
47
|
# apply node.exe symbol loading hook
|
|
46
48
|
sources += [
|
|
47
49
|
get_option('interop_src_dir') / 'napi/win-dynamic-node.cpp'
|
|
48
50
|
]
|
|
51
|
+
|
|
52
|
+
cflags += [
|
|
53
|
+
'-nostdinc++',
|
|
54
|
+
'-I/home/huawei/Projects/idlize/external/arkoala-arkts/tools/compiler/llvm-toolchain/include/c++/v1',
|
|
55
|
+
'-I/home/huawei/Projects/idlize/external/arkoala-arkts/tools/compiler/llvm-toolchain/include/x86_64-unknown-linux-gnu/c++/v1',
|
|
56
|
+
'-std=c++17',
|
|
57
|
+
'-Wall',
|
|
58
|
+
'-Werror',
|
|
59
|
+
'-Wno-unused-variable',
|
|
60
|
+
'-Wno-unused-command-line-argument',
|
|
61
|
+
'-fPIC',
|
|
62
|
+
'-Wno-error=deprecated-copy',
|
|
63
|
+
'-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang',
|
|
64
|
+
'-ftrivial-auto-var-init=zero',
|
|
65
|
+
'-fcolor-diagnostics',
|
|
66
|
+
'-fmerge-all-constants',
|
|
67
|
+
'-Xclang',
|
|
68
|
+
'-mllvm',
|
|
69
|
+
'-Xclang',
|
|
70
|
+
'-instcombine-lower-dbg-declare=0',
|
|
71
|
+
'-no-canonical-prefixes',
|
|
72
|
+
'-fuse-ld=lld',
|
|
73
|
+
'-fno-stack-protector',
|
|
74
|
+
'-fno-strict-aliasing',
|
|
75
|
+
'-Wno-builtin-macro-redefined',
|
|
76
|
+
'-fms-extensions',
|
|
77
|
+
'-static',
|
|
78
|
+
'-rtlib=compiler-rt',
|
|
79
|
+
'-stdlib=libc++',
|
|
80
|
+
'-lunwind',
|
|
81
|
+
'-lpthread',
|
|
82
|
+
'-Qunused-arguments',
|
|
83
|
+
'-D__CUSTOM_SECURITY_LIBRARY',
|
|
84
|
+
'-fno-exceptions',
|
|
85
|
+
'-fno-rtti',
|
|
86
|
+
]
|
|
87
|
+
|
|
88
|
+
ldflags += [
|
|
89
|
+
'-Wl,--fatal-warnings',
|
|
90
|
+
'-fPIC',
|
|
91
|
+
'-Wl,--as-needed',
|
|
92
|
+
'-fuse-ld=lld',
|
|
93
|
+
'-Wl,--icf=all',
|
|
94
|
+
'-m64',
|
|
95
|
+
'-static',
|
|
96
|
+
'-rtlib=compiler-rt',
|
|
97
|
+
'-stdlib=libc++',
|
|
98
|
+
'-std=c++17',
|
|
99
|
+
'-lunwind',
|
|
100
|
+
'-lpthread',
|
|
101
|
+
'-Qunused-arguments',
|
|
102
|
+
]
|
|
49
103
|
else
|
|
50
104
|
cflags += ['-DKOALA_LINUX']
|
|
51
105
|
endif
|
|
@@ -61,7 +115,6 @@ arch = target_machine.cpu()
|
|
|
61
115
|
arch = archs.get(arch, arch)
|
|
62
116
|
|
|
63
117
|
cflags_cross = []
|
|
64
|
-
cflags_host = []
|
|
65
118
|
suffix_host = '_' + os + '_' + arch
|
|
66
119
|
suffix_cross = ''
|
|
67
120
|
|
|
@@ -111,8 +164,8 @@ shared_library(
|
|
|
111
164
|
node_api_headers_dir / 'node-api-headers/include',
|
|
112
165
|
node_addon_api_dir / 'node-addon-api',
|
|
113
166
|
],
|
|
114
|
-
cpp_args: cflags
|
|
115
|
-
link_args:
|
|
167
|
+
cpp_args: cflags,
|
|
168
|
+
link_args: ldflags,
|
|
116
169
|
dependencies: []
|
|
117
170
|
)
|
|
118
171
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
# limitations under the License.
|
|
13
13
|
|
|
14
14
|
[binaries]
|
|
15
|
-
c = 'x86_64-
|
|
16
|
-
cpp = 'x86_64-
|
|
15
|
+
c = ['/home/huawei/Projects/idlize/external/arkoala-arkts/tools/compiler/llvm-toolchain/bin/clang', '-target', 'x86_64-pc-windows-gnu']
|
|
16
|
+
cpp = ['/home/huawei/Projects/idlize/external/arkoala-arkts/tools/compiler/llvm-toolchain/bin/clang++', '-target', 'x86_64-pc-windows-gnu', '-fuse-ld=lld', '-Wl,--icf=all']
|
|
17
17
|
ar = 'x86_64-w64-mingw32-ar'
|
|
18
18
|
windres = 'x86_64-w64-mingw32-windres'
|
|
19
19
|
strip = 'x86_64-w64-mingw32-strip'
|
|
@@ -24,6 +24,3 @@ system = 'windows'
|
|
|
24
24
|
cpu_family = 'x86_64'
|
|
25
25
|
cpu = 'x86_64'
|
|
26
26
|
endian = 'little'
|
|
27
|
-
|
|
28
|
-
[properties]
|
|
29
|
-
cpp_link_args = ['-lpsapi']
|