Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: test/cctest/wasm/test-run-wasm-module.cc

Issue 2460313002: [wasm] Do not run the infinite loop test if FLAG_dump_wasm_module is true (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include "src/snapshot/code-serializer.h" 8 #include "src/snapshot/code-serializer.h"
9 #include "src/version.h" 9 #include "src/version.h"
10 #include "src/wasm/module-decoder.h" 10 #include "src/wasm/module-decoder.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 } 430 }
431 431
432 Isolate* isolate_; 432 Isolate* isolate_;
433 volatile int32_t* memory_; 433 volatile int32_t* memory_;
434 static const int32_t interrupt_location_ = 10; 434 static const int32_t interrupt_location_ = 10;
435 static const int32_t interrupt_value_ = 154; 435 static const int32_t interrupt_value_ = 154;
436 static const int32_t signal_value_ = 1221; 436 static const int32_t signal_value_ = 1221;
437 }; 437 };
438 438
439 TEST(TestInterruptLoop) { 439 TEST(TestInterruptLoop) {
440 // Do not dump the module of this test because it contains an infinite loop.
441 if (FLAG_dump_wasm_module) return;
442
440 // This test tests that WebAssembly loops can be interrupted, i.e. that if an 443 // This test tests that WebAssembly loops can be interrupted, i.e. that if an
441 // InterruptCallback is registered by {Isolate::RequestInterrupt}, then the 444 // InterruptCallback is registered by {Isolate::RequestInterrupt}, then the
442 // InterruptCallback is eventually called even if a loop in WebAssembly code 445 // InterruptCallback is eventually called even if a loop in WebAssembly code
443 // is executed. 446 // is executed.
444 // Test setup: 447 // Test setup:
445 // The main thread executes a WebAssembly function with a loop. In the loop 448 // The main thread executes a WebAssembly function with a loop. In the loop
446 // {signal_value_} is written to memory to signal a helper thread that the 449 // {signal_value_} is written to memory to signal a helper thread that the
447 // main thread reached the loop in the WebAssembly program. When the helper 450 // main thread reached the loop in the WebAssembly program. When the helper
448 // thread reads {signal_value_} from memory, it registers the 451 // thread reads {signal_value_} from memory, it registers the
449 // InterruptCallback. Upon exeution, the InterruptCallback write into the 452 // InterruptCallback. Upon exeution, the InterruptCallback write into the
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 712
710 TEST(Run_WasmModule_Global_f32) { 713 TEST(Run_WasmModule_Global_f32) {
711 RunWasmModuleGlobalInitTest<float>(kAstF32, -983.9f); 714 RunWasmModuleGlobalInitTest<float>(kAstF32, -983.9f);
712 RunWasmModuleGlobalInitTest<float>(kAstF32, 1122.99f); 715 RunWasmModuleGlobalInitTest<float>(kAstF32, 1122.99f);
713 } 716 }
714 717
715 TEST(Run_WasmModule_Global_f64) { 718 TEST(Run_WasmModule_Global_f64) {
716 RunWasmModuleGlobalInitTest<double>(kAstF64, -833.9); 719 RunWasmModuleGlobalInitTest<double>(kAstF64, -833.9);
717 RunWasmModuleGlobalInitTest<double>(kAstF64, 86374.25); 720 RunWasmModuleGlobalInitTest<double>(kAstF64, 86374.25);
718 } 721 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698