Index: test/mjsunit/asm/asm-validation.js |
diff --git a/test/mjsunit/asm/asm-validation.js b/test/mjsunit/asm/asm-validation.js |
index 1f087fc01909827191d0bd23e7a63cbe6aa3f65a..364ecd64d3dd9bd0f233bf917a12beb7aa7657c3 100644 |
--- a/test/mjsunit/asm/asm-validation.js |
+++ b/test/mjsunit/asm/asm-validation.js |
@@ -476,3 +476,23 @@ function assertValidAsm(func) { |
Module(); |
assertFalse(% IsAsmWasmCode(Module)); |
})(); |
+ |
+(function TestAsmIsRegular() { |
+ function Module() { |
+ 'use asm'; |
+ var g = 123; |
+ function foo() { |
+ return g | 0; |
+ } |
+ return {x: foo}; |
+ } |
+ var o = Module(); |
+ assertValidAsm(Module); |
+ assertFalse(o instanceof WebAssembly.Instance); |
+ assertTrue(o instanceof Object); |
+ assertTrue(o.__proto__ === Object.prototype); |
+ o.x = 5; |
+ assertTrue(typeof o.x === 'number'); |
+ assertTrue(o.__single_function__ === undefined); |
+ assertTrue(o.__foreign_init__ === undefined); |
+})(); |