File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -197,10 +197,11 @@ import {
197197 writeV128 ,
198198 cloneMap ,
199199 isPowerOf2 ,
200- v128_zero ,
201200 readI32 ,
202201 isIdentifier ,
203- accuratePow64
202+ accuratePow64 ,
203+ v128_zero ,
204+ v128_ones ,
204205} from "./util" ;
205206
206207import {
@@ -957,7 +958,7 @@ export class Compiler extends DiagnosticEmitter {
957958 element . identifierNode . range
958959 ) ;
959960 }
960-
961+
961962 // files
962963
963964 /** Compiles the file matching the specified path. */
@@ -10153,6 +10154,7 @@ export class Compiler extends DiagnosticEmitter {
1015310154 case TypeKind . U64 : return module . i64 ( - 1 , - 1 ) ;
1015410155 case TypeKind . F32 : return module . f32 ( - 1 ) ;
1015510156 case TypeKind . F64 : return module . f64 ( - 1 ) ;
10157+ case TypeKind . V128 : return module . v128 ( v128_ones ) ;
1015610158 case TypeKind . I31REF : return module . i31_new ( module . i32 ( - 1 ) ) ;
1015710159 }
1015810160 }
Original file line number Diff line number Diff line change 55
66/** v128 zero constant. */
77export const v128_zero = new Uint8Array ( 16 ) ;
8+ /** v128 all ones constant. */
9+ export const v128_ones = new Uint8Array ( 16 ) . fill ( 0xFF ) ;
You can’t perform that action at this time.
0 commit comments