File tree Expand file tree Collapse file tree 7 files changed +35
-27
lines changed Expand file tree Collapse file tree 7 files changed +35
-27
lines changed Original file line number Diff line number Diff line change @@ -8220,11 +8220,16 @@ export class Compiler extends DiagnosticEmitter {
8220
8220
var wasm64 = nativeUsize == NativeType . I64 ;
8221
8221
8222
8222
if ( instance . closedLocals . size > 0 ) {
8223
+ this . warning (
8224
+ DiagnosticCode . Closure_support_is_experimental ,
8225
+ instance . prototype . declaration . range
8226
+ )
8227
+
8223
8228
// Append the appropriate signature and flags for this closure type, then set it to currentType
8224
8229
this . currentType = Type . closure32 ;
8225
8230
this . currentType . signatureReference = instance . signature ;
8226
8231
8227
- // create a local which will hold our closure class instance
8232
+ // create a local which will hold our closure
8228
8233
var tempLocal = flow . getAutoreleaseLocal ( this . currentType ) ;
8229
8234
var tempLocalIndex = tempLocal . index ;
8230
8235
Original file line number Diff line number Diff line change @@ -173,6 +173,7 @@ export enum DiagnosticCode {
173
173
File_0_not_found = 6054 ,
174
174
Numeric_separators_are_not_allowed_here = 6188 ,
175
175
Multiple_consecutive_numeric_separators_are_not_permitted = 6189 ,
176
+ Closure_support_is_experimental = 6190 ,
176
177
_super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class = 17009 ,
177
178
_super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class = 17011
178
179
}
@@ -346,6 +347,7 @@ export function diagnosticCodeToString(code: DiagnosticCode): string {
346
347
case 6054 : return "File '{0}' not found." ;
347
348
case 6188 : return "Numeric separators are not allowed here." ;
348
349
case 6189 : return "Multiple consecutive numeric separators are not permitted." ;
350
+ case 6190 : return "Closure support is experimental." ;
349
351
case 17009 : return "'super' must be called before accessing 'this' in the constructor of a derived class." ;
350
352
case 17011 : return "'super' must be called before accessing a property of 'super' in the constructor of a derived class." ;
351
353
default : return "" ;
Original file line number Diff line number Diff line change 170
170
"File '{0}' not found." : 6054 ,
171
171
"Numeric separators are not allowed here." : 6188 ,
172
172
"Multiple consecutive numeric separators are not permitted." : 6189 ,
173
+ "Closure support is experimental." : 6190 ,
173
174
"'super' must be called before accessing 'this' in the constructor of a derived class." : 17009 ,
174
175
"'super' must be called before accessing a property of 'super' in the constructor of a derived class." : 17011
175
176
}
Original file line number Diff line number Diff line change 78
78
i32.store
79
79
local.get $0
80
80
i32.const 0
81
- i32.store offset = 4
81
+ i32.store offset = 1
82
82
local.get $0
83
83
i32.const 4
84
84
i32.shr_s
Original file line number Diff line number Diff line change 155
155
local.set $2
156
156
local.get $2
157
157
local.get $0
158
- i32.store offset = 4
158
+ i32.store offset = 1
159
159
local.get $2
160
160
i32.const 4
161
161
i32.shr_s
Original file line number Diff line number Diff line change 1203
1203
i32.store
1204
1204
local.get $0
1205
1205
i32.const 11
1206
- i32.store offset = 4
1206
+ i32.store offset = 1
1207
1207
local.get $0
1208
1208
i32.const 4
1209
- i32.store offset = 8
1209
+ i32.store offset = 1
1210
1210
local.get $0
1211
1211
i32.const 7
1212
- i32.store offset = 12
1212
+ i32.store offset = 1
1213
1213
local.get $0
1214
1214
i32.const 4
1215
1215
i32.shr_s
1242
1242
i32.store
1243
1243
local.get $0
1244
1244
i32.const 1
1245
- i32.store offset = 4
1245
+ i32.store offset = 1
1246
1246
local.get $0
1247
1247
i32.const 7
1248
- i32.store offset = 8
1248
+ i32.store offset = 1
1249
1249
local.get $0
1250
1250
local.get $1
1251
1251
local.get $0
1284
1284
i32.store
1285
1285
local.get $0
1286
1286
i32.const 1
1287
- i32.store offset = 4
1287
+ i32.store offset = 1
1288
1288
local.get $0
1289
1289
i32.const 4
1290
1290
i32.shr_s
1337
1337
i32.store
1338
1338
local.get $0
1339
1339
i32.const 2
1340
- i32.store offset = 4
1340
+ i32.store offset = 1
1341
1341
local.get $0
1342
1342
i32.const 4
1343
1343
i32.shr_s
1379
1379
i32.store
1380
1380
local.get $0
1381
1381
i32.const 0
1382
- i32.store offset = 4
1382
+ i32.store offset = 1
1383
1383
local.get $0
1384
1384
i32.const 4
1385
1385
i32.shr_s
1421
1421
i32.store
1422
1422
local.get $0
1423
1423
i32.const 0
1424
- i32.store offset = 4
1424
+ i32.store offset = 1
1425
1425
local.get $0
1426
1426
i32.const 4
1427
1427
i32.shr_s
1518
1518
i32.store
1519
1519
local.get $0
1520
1520
i32.const 1
1521
- i32.store offset = 4
1521
+ i32.store offset = 1
1522
1522
local.get $0
1523
1523
i32.const 1
1524
- i32.store offset = 8
1524
+ i32.store offset = 1
1525
1525
local.get $0
1526
1526
i32.const 1
1527
- i32.store offset = 12
1527
+ i32.store offset = 1
1528
1528
local.get $0
1529
1529
i32.const 4
1530
1530
i32.shr_s
Original file line number Diff line number Diff line change 1561
1561
local.set $3
1562
1562
local.get $3
1563
1563
local.get $1
1564
- i32.store offset = 4
1564
+ i32.store offset = 1
1565
1565
local.get $3
1566
1566
i32.const 4
1567
1567
i32.shr_s
1612
1612
local.set $2
1613
1613
local.get $2
1614
1614
local.get $0
1615
- i32.store offset = 4
1615
+ i32.store offset = 1
1616
1616
local.get $2
1617
1617
i32.const 4
1618
1618
i32.shr_s
1663
1663
local.set $2
1664
1664
local.get $2
1665
1665
local.get $0
1666
- i32.store offset = 4
1666
+ i32.store offset = 1
1667
1667
local.get $2
1668
1668
i32.const 4
1669
1669
i32.shr_s
1755
1755
local.set $8
1756
1756
local.get $8
1757
1757
local.get $2
1758
- i32.store offset = 4
1758
+ i32.store offset = 1
1759
1759
local.get $8
1760
1760
local.get $3
1761
- i32.store offset = 8
1761
+ i32.store offset = 1
1762
1762
local.get $8
1763
1763
local.get $1
1764
- i32.store offset = 12
1764
+ i32.store offset = 1
1765
1765
local.get $8
1766
1766
i32.const 4
1767
1767
i32.shr_s
1887
1887
local.set $4
1888
1888
local.get $4
1889
1889
local.get $0
1890
- i32.store offset = 4
1890
+ i32.store offset = 1
1891
1891
local.get $4
1892
1892
local.get $1
1893
- i32.store offset = 8
1893
+ i32.store offset = 1
1894
1894
local.get $4
1895
1895
local.get $2
1896
1896
i32.const 1
1944
1944
local.set $3
1945
1945
local.get $3
1946
1946
local.get $0
1947
- i32.store offset = 4
1947
+ i32.store offset = 1
1948
1948
local.get $3
1949
1949
i32.const 4
1950
1950
i32.shr_s
2091
2091
local.set $4
2092
2092
local.get $4
2093
2093
local.get $0
2094
- i32.store offset = 4
2094
+ i32.store offset = 1
2095
2095
local.get $4
2096
2096
local.get $1
2097
- i32.store offset = 8
2097
+ i32.store offset = 1
2098
2098
local.get $4
2099
2099
local.get $2
2100
- i32.store offset = 12
2100
+ i32.store offset = 1
2101
2101
local.get $4
2102
2102
i32.const 4
2103
2103
i32.shr_s
You can’t perform that action at this time.
0 commit comments