File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class Math
4545
4646 static bool FitsInDWord (int32 value) { return true ; }
4747 static bool FitsInDWord (size_t value) { return ((size_t )(signed int )(value & 0xFFFFFFFF ) == value); }
48- static bool FitsInDWord (int64 value) { return FitsInDWord (( size_t ) value); }
48+ static bool FitsInDWord (int64 value) { return ((int64)( signed int )(value & 0xFFFFFFFF ) == value); }
4949
5050 static UINT_PTR Rand ();
5151 static bool IsPow2 (int32 val) { return (val > 0 && ((val-1 ) & val) == 0 ); }
Original file line number Diff line number Diff line change 1+ //-------------------------------------------------------------------------------------------------------
2+ // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
3+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+ //-------------------------------------------------------------------------------------------------------
5+ WScript . Flag ( "-wasmI64" ) ;
6+ async function main ( ) {
7+ const { instance : { exports : { foo} } } = await WebAssembly . instantiate ( readbuffer ( "binaries/bug_fitsdword.wasm" ) ) ;
8+ foo ( ) ;
9+ }
10+
11+ main ( ) . then ( ( ) => console . log ( "PASSED" ) , console . log ) ;
Original file line number Diff line number Diff line change 128128 <compile-flags >-wasm</compile-flags >
129129 </default >
130130</test >
131+ <test >
132+ <default >
133+ <files >bugs.js</files >
134+ <compile-flags >-wasm</compile-flags >
135+ </default >
136+ </test >
131137<test >
132138 <default >
133139 <files >debugger.js</files >
Original file line number Diff line number Diff line change 1+ ;; -------------------------------------------------------------------------------------------------------
2+ ;; Copyright (C) Microsoft. All rights reserved.
3+ ;; Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+ ;; -------------------------------------------------------------------------------------------------------
5+ (module
6+ (func (export " foo" ) (result i64 ) (i64.extend_u /i32 (i32.const 0x80000000 )))
7+ )
You can’t perform that action at this time.
0 commit comments