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

Side by Side Diff: src/debug/debug-interface.h

Issue 2531163010: [inspector] Introduce debug::WasmScript (Closed)
Patch Set: Fix expected output Created 4 years 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/api.cc ('k') | src/inspector/v8-debugger.cc » ('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 #ifndef V8_DEBUG_DEBUG_INTERFACE_H_ 5 #ifndef V8_DEBUG_DEBUG_INTERFACE_H_
6 #define V8_DEBUG_DEBUG_INTERFACE_H_ 6 #define V8_DEBUG_DEBUG_INTERFACE_H_
7 7
8 #include "include/v8-debug.h" 8 #include "include/v8-debug.h"
9 #include "include/v8-util.h" 9 #include "include/v8-util.h"
10 #include "include/v8.h" 10 #include "include/v8.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 * Returns empty local if not called with a valid wrapper of 169 * Returns empty local if not called with a valid wrapper of
170 * v8::internal::Script. 170 * v8::internal::Script.
171 */ 171 */
172 static MaybeLocal<Script> Wrap(Isolate* isolate, 172 static MaybeLocal<Script> Wrap(Isolate* isolate,
173 v8::Local<v8::Object> script); 173 v8::Local<v8::Object> script);
174 174
175 private: 175 private:
176 int GetSourcePosition(const debug::Location& location) const; 176 int GetSourcePosition(const debug::Location& location) const;
177 }; 177 };
178 178
179 // Specialization for wasm Scripts.
180 class WasmScript : public Script {
181 public:
182 static WasmScript* Cast(Script* script);
183
184 int NumFunctions() const;
185 int NumImportedFunctions() const;
186
187 debug::WasmDisassembly DisassembleFunction(int function_index) const;
188 };
189
179 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); 190 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts);
180 191
181 /**
182 * Compute the disassembly of a wasm function.
183 */
184 debug::WasmDisassembly DisassembleWasmFunction(Isolate* isolate,
185 v8::Local<v8::Object> script,
186 int function_index);
187
188 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, 192 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
189 Local<String> source); 193 Local<String> source);
190 194
191 } // namespace debug 195 } // namespace debug
192 } // namespace v8 196 } // namespace v8
193 197
194 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ 198 #endif // V8_DEBUG_DEBUG_INTERFACE_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698