fix: 补充部分不支持特性以提供详细报错信息

This commit is contained in:
爱特每羊队
2026-06-14 17:11:45 +08:00
parent d242d08e6d
commit a31d22cd3f
3 changed files with 54 additions and 0 deletions
+33
View File
@@ -302,6 +302,39 @@ impl CompileCtx {
"parseFloat",
"isNaN",
"isFinite",
// Out-of-scope constructors: bound as TypeError-throwing stubs
"Proxy",
"WeakMap",
"WeakSet",
"WeakRef",
"FinalizationRegistry",
"Atomics",
"SharedArrayBuffer",
"ArrayBuffer",
"DataView",
"Iterator",
"BigInt",
// TypedArray family stubs
"Int8Array",
"Uint8Array",
"Uint8ClampedArray",
"Int16Array",
"Uint16Array",
"Int32Array",
"Uint32Array",
"Float32Array",
"Float64Array",
"BigInt64Array",
"BigUint64Array",
// Reflect namespace object
"Reflect",
// URI utility functions
"escape",
"unescape",
"encodeURI",
"decodeURI",
"encodeURIComponent",
"decodeURIComponent",
];
for name in &builtins {
let reg = self.alloc_reg();