| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --validate-asm | 5 // Flags: --validate-asm |
| 6 | 6 |
| 7 var filename = '(?:[^ ]+/)?test/mjsunit/wasm/asm-wasm-exception-in-tonumber.js'; | 7 var filename = '(?:[^ ]+/)?test/mjsunit/wasm/asm-wasm-exception-in-tonumber.js'; |
| 8 filename = filename.replace(/\//g, '[/\\\\]'); | 8 filename = filename.replace(/\//g, '[/\\\\]'); |
| 9 | 9 |
| 10 function verifyStack(frames, expected) { | 10 function verifyStack(frames, expected) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 use_asm_js, test_detailed, | 73 use_asm_js, test_detailed, |
| 74 test_detailed ? expected_frames : expected_stack, input); | 74 test_detailed ? expected_frames : expected_stack, input); |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 (function testStackForThrowAtCall() { | 79 (function testStackForThrowAtCall() { |
| 80 var expected_stack = [ | 80 var expected_stack = [ |
| 81 '^Error: user-thrown$', | 81 '^Error: user-thrown$', |
| 82 '^ *at sym \\(' + filename + ':\\d+:9\\)$', | 82 '^ *at sym \\(' + filename + ':\\d+:9\\)$', |
| 83 '^ *at callSym \\(.*<anonymous>:\\d+:12\\)$', | 83 '^ *at callSym \\(eval at testHelper \\(' + filename + |
| 84 ':\\d+:19\\), <anonymous>:\\d+:12\\)$', |
| 84 ]; | 85 ]; |
| 85 var expected_frames = [ | 86 var expected_frames = [ |
| 86 // function pos | 87 // function pos |
| 87 [ "sym", 9], | 88 [ "sym", 9], |
| 88 [ "callSym", 12], | 89 [ "callSym", 12], |
| 89 ]; | 90 ]; |
| 90 | 91 |
| 91 testAll(expected_stack, expected_frames, 0); | 92 testAll(expected_stack, expected_frames, 0); |
| 92 })(); | 93 })(); |
| 93 | 94 |
| 94 (function testStackForThrowAtConversion() { | 95 (function testStackForThrowAtConversion() { |
| 95 var expected_stack = [ | 96 var expected_stack = [ |
| 96 '^TypeError: Cannot convert a Symbol value to a number$', | 97 '^TypeError: Cannot convert a Symbol value to a number$', |
| 97 '^ *at callSym \\(.*<anonymous>:\\d+:21\\)$', | 98 '^ *at callSym \\(eval at testHelper \\(' + filename + |
| 99 ':\\d+:19\\), <anonymous>:\\d+:21\\)$', |
| 98 ]; | 100 ]; |
| 99 var expected_frames = [ | 101 var expected_frames = [ |
| 100 // function pos | 102 // function pos |
| 101 [ "callSym", 21], | 103 [ "callSym", 21], |
| 102 ]; | 104 ]; |
| 103 | 105 |
| 104 testAll(expected_stack, expected_frames, 1); | 106 testAll(expected_stack, expected_frames, 1); |
| 105 })(); | 107 })(); |
| OLD | NEW |