summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc')
-rw-r--r--deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc30
1 files changed, 14 insertions, 16 deletions
diff --git a/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc b/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc
index 0b72998c47..ef0a0e545e 100644
--- a/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc
+++ b/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc
@@ -22,10 +22,10 @@ namespace wasm {
namespace {
void CheckLocations(
- WasmSharedModuleData* shared, debug::Location start, debug::Location end,
+ WasmModuleObject* module_object, debug::Location start, debug::Location end,
std::initializer_list<debug::Location> expected_locations_init) {
std::vector<debug::BreakLocation> locations;
- bool success = shared->GetPossibleBreakpoints(start, end, &locations);
+ bool success = module_object->GetPossibleBreakpoints(start, end, &locations);
CHECK(success);
printf("got %d locations: ", static_cast<int>(locations.size()));
@@ -45,10 +45,10 @@ void CheckLocations(
}
}
-void CheckLocationsFail(WasmSharedModuleData* shared, debug::Location start,
+void CheckLocationsFail(WasmModuleObject* module_object, debug::Location start,
debug::Location end) {
std::vector<debug::BreakLocation> locations;
- bool success = shared->GetPossibleBreakpoints(start, end, &locations);
+ bool success = module_object->GetPossibleBreakpoints(start, end, &locations);
CHECK(!success);
}
@@ -87,7 +87,6 @@ class BreakHandler : public debug::DebugDelegate {
std::vector<BreakPoint> expected_breaks_;
void BreakProgramRequested(v8::Local<v8::Context> paused_context,
- v8::Local<v8::Object> exec_state,
const std::vector<int>&) override {
printf("Break #%d\n", count_);
CHECK_GT(expected_breaks_.size(), count_);
@@ -121,8 +120,8 @@ void SetBreakpoint(WasmRunnerBase& runner, int function_index, int byte_offset,
int code_offset = func_offset + byte_offset;
if (expected_set_byte_offset == -1) expected_set_byte_offset = byte_offset;
Handle<WasmInstanceObject> instance = runner.builder().instance_object();
- Handle<WasmCompiledModule> compiled_module(instance->compiled_module());
- Handle<WasmModuleObject> module_object(instance->module_object());
+ Handle<WasmModuleObject> module_object(instance->module_object(),
+ runner.main_isolate());
static int break_index = 0;
Handle<BreakPoint> break_point =
runner.main_isolate()->factory()->NewBreakPoint(
@@ -193,7 +192,6 @@ class CollectValuesBreakHandler : public debug::DebugDelegate {
std::vector<BreakpointValues> expected_values_;
void BreakProgramRequested(v8::Local<v8::Context> paused_context,
- v8::Local<v8::Object> exec_state,
const std::vector<int>&) override {
printf("Break #%d\n", count_);
CHECK_GT(expected_values_.size(), count_);
@@ -249,25 +247,25 @@ WASM_COMPILED_EXEC_TEST(WasmCollectPossibleBreakpoints) {
BUILD(runner, WASM_NOP, WASM_I32_ADD(WASM_ZERO, WASM_ONE));
WasmInstanceObject* instance = *runner.builder().instance_object();
- WasmSharedModuleData* shared = instance->module_object()->shared();
+ WasmModuleObject* module_object = instance->module_object();
std::vector<debug::Location> locations;
// Check all locations for function 0.
- CheckLocations(shared, {0, 0}, {1, 0},
+ CheckLocations(module_object, {0, 0}, {1, 0},
{{0, 1}, {0, 2}, {0, 4}, {0, 6}, {0, 7}});
// Check a range ending at an instruction.
- CheckLocations(shared, {0, 2}, {0, 4}, {{0, 2}});
+ CheckLocations(module_object, {0, 2}, {0, 4}, {{0, 2}});
// Check a range ending one behind an instruction.
- CheckLocations(shared, {0, 2}, {0, 5}, {{0, 2}, {0, 4}});
+ CheckLocations(module_object, {0, 2}, {0, 5}, {{0, 2}, {0, 4}});
// Check a range starting at an instruction.
- CheckLocations(shared, {0, 7}, {0, 8}, {{0, 7}});
+ CheckLocations(module_object, {0, 7}, {0, 8}, {{0, 7}});
// Check from an instruction to beginning of next function.
- CheckLocations(shared, {0, 7}, {1, 0}, {{0, 7}});
+ CheckLocations(module_object, {0, 7}, {1, 0}, {{0, 7}});
// Check from end of one function (no valid instruction position) to beginning
// of next function. Must be empty, but not fail.
- CheckLocations(shared, {0, 8}, {1, 0}, {});
+ CheckLocations(module_object, {0, 8}, {1, 0}, {});
// Check from one after the end of the function. Must fail.
- CheckLocationsFail(shared, {0, 9}, {1, 0});
+ CheckLocationsFail(module_object, {0, 9}, {1, 0});
}
WASM_COMPILED_EXEC_TEST(WasmSimpleBreak) {