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

Unified Diff: src/frames.h

Issue 1839843002: wasm: implemente WasmFrame::cast, fix inheritance (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index ccf069c8c1322dec4002ded85b47880a60064626..466c850e0a6a7cff0b991550f758f5f1b5a6995b 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -414,7 +414,9 @@ class StackFrame BASE_EMBEDDED {
bool is_exit() const { return type() == EXIT; }
bool is_optimized() const { return type() == OPTIMIZED; }
bool is_interpreted() const { return type() == INTERPRETED; }
- bool is_wasm() const { return type() == WASM; }
+ bool is_wasm() const {
bradn 2016/03/28 23:46:06 Keeping the 3 sorts of wasm frames orthogonal seem
JF 2016/03/29 00:24:06 I don't mind either way, but if we keep them separ
+ return type() == WASM || is_wasm_to_js() || is_js_to_wasm();
+ }
bool is_wasm_to_js() const { return type() == WASM_TO_JS; }
bool is_js_to_wasm() const { return type() == JS_TO_WASM; }
bool is_arguments_adaptor() const { return type() == ARGUMENTS_ADAPTOR; }
@@ -961,6 +963,11 @@ class WasmFrame : public StandardFrame {
// Determine the code for the frame.
Code* unchecked_code() const override;
+ static WasmFrame* cast(StackFrame* frame) {
+ DCHECK(frame->is_wasm());
bradn 2016/03/28 23:46:06 Why not preserve the existing categories and dchec
+ return static_cast<WasmFrame*>(frame);
+ }
+
protected:
inline explicit WasmFrame(StackFrameIteratorBase* iterator);
« no previous file with comments | « no previous file | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698