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 #include "src/debug/debug-interface.h" | 5 #include "src/debug/debug-interface.h" |
6 #include "src/wasm/wasm-macro-gen.h" | 6 #include "src/wasm/wasm-macro-gen.h" |
7 #include "src/wasm/wasm-objects.h" | 7 #include "src/wasm/wasm-objects.h" |
8 | 8 |
9 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
10 #include "test/cctest/compiler/value-helper.h" | 10 #include "test/cctest/compiler/value-helper.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } // namespace | 53 } // namespace |
54 | 54 |
55 TEST(CollectPossibleBreakpoints) { | 55 TEST(CollectPossibleBreakpoints) { |
56 WasmRunner<int> runner(kExecuteCompiled); | 56 WasmRunner<int> runner(kExecuteCompiled); |
57 | 57 |
58 BUILD(runner, WASM_NOP, WASM_I32_ADD(WASM_ZERO, WASM_ONE)); | 58 BUILD(runner, WASM_NOP, WASM_I32_ADD(WASM_ZERO, WASM_ONE)); |
59 | 59 |
60 Handle<WasmInstanceObject> instance = runner.module().instance_object(); | 60 Handle<WasmInstanceObject> instance = runner.module().instance_object(); |
61 std::vector<debug::Location> locations; | 61 std::vector<debug::Location> locations; |
62 CheckLocations(instance->compiled_module(), {0, 0}, {1, 0}, | 62 CheckLocations(instance->compiled_module(), {0, 0}, {1, 0}, |
63 {{0, 1}, {0, 2}, {0, 4}, {0, 6}, {0, 7}}); | 63 {{0, 1}, {0, 2}, {0, 4}, {0, 6}}); |
64 CheckLocations(instance->compiled_module(), {0, 2}, {0, 4}, {{0, 2}}); | 64 CheckLocations(instance->compiled_module(), {0, 2}, {0, 4}, {{0, 2}}); |
65 CheckLocations(instance->compiled_module(), {0, 2}, {0, 5}, {{0, 2}, {0, 4}}); | 65 CheckLocations(instance->compiled_module(), {0, 2}, {0, 5}, {{0, 2}, {0, 4}}); |
66 CheckLocations(instance->compiled_module(), {0, 7}, {0, 8}, {{0, 7}}); | 66 CheckLocations(instance->compiled_module(), {0, 6}, {0, 7}, {{0, 6}}); |
67 CheckLocations(instance->compiled_module(), {0, 7}, {1, 0}, {{0, 7}}); | 67 CheckLocations(instance->compiled_module(), {0, 6}, {1, 0}, {{0, 6}}); |
68 CheckLocations(instance->compiled_module(), {0, 8}, {1, 0}, {}); | 68 CheckLocations(instance->compiled_module(), {0, 7}, {1, 0}, {}); |
69 CheckLocationsFail(instance->compiled_module(), {0, 9}, {1, 0}); | 69 CheckLocationsFail(instance->compiled_module(), {0, 8}, {1, 0}); |
70 } | 70 } |
OLD | NEW |