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

Side by Side Diff: src/runtime/runtime-wasm.cc

Issue 2655653003: [inspector] Expose GetPossibleBreakpoints for wasm (Closed)
Patch Set: Introduce Init method and clang-format wasm-translation.cc Created 3 years, 11 months 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 | « src/runtime/runtime-debug.cc ('k') | test/inspector/debugger/wasm-get-breakable-locations.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/compiler/wasm-compiler.h" 9 #include "src/compiler/wasm-compiler.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 Handle<WasmInstanceObject> instance = 162 Handle<WasmInstanceObject> instance =
163 Handle<WasmInstanceObject>::cast(instance_obj); 163 Handle<WasmInstanceObject>::cast(instance_obj);
164 164
165 // The arg buffer is the raw pointer to the caller's stack. It looks like a 165 // The arg buffer is the raw pointer to the caller's stack. It looks like a
166 // Smi (lowest bit not set, as checked by IsSmi), but is no valid Smi. We just 166 // Smi (lowest bit not set, as checked by IsSmi), but is no valid Smi. We just
167 // cast it back to the raw pointer. 167 // cast it back to the raw pointer.
168 CHECK(!arg_buffer_obj->IsHeapObject()); 168 CHECK(!arg_buffer_obj->IsHeapObject());
169 CHECK(arg_buffer_obj->IsSmi()); 169 CHECK(arg_buffer_obj->IsSmi());
170 uint8_t* arg_buffer = reinterpret_cast<uint8_t*>(*arg_buffer_obj); 170 uint8_t* arg_buffer = reinterpret_cast<uint8_t*>(*arg_buffer_obj);
171 171
172 // Set the current isolate's context, saving the previous one.
173 SaveContext save(isolate);
174 isolate->set_context(*instance->compiled_module()->native_context());
175
172 instance->debug_info()->RunInterpreter(func_index, arg_buffer); 176 instance->debug_info()->RunInterpreter(func_index, arg_buffer);
173 return isolate->heap()->undefined_value(); 177 return isolate->heap()->undefined_value();
174 } 178 }
175 179
176 } // namespace internal 180 } // namespace internal
177 } // namespace v8 181 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/inspector/debugger/wasm-get-breakable-locations.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698