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

Unified Diff: src/objects-inl.h

Issue 2230953002: Use a custom Struct for stack trace storage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 years, 4 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 | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index e83d8b6096358b865ad58503a2eef602d72d8212..c736467ebe18ebc18fe716c0a03e3769c1365d8f 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5818,6 +5818,29 @@ void Script::set_origin_options(ScriptOriginOptions origin_options) {
(origin_options.Flags() << kOriginOptionsShift));
}
+SMI_ACCESSORS(StackTraceFrame, flags, kFlagsOffset)
+ACCESSORS(StackTraceFrame, abstract_code, AbstractCode, kAbstractCodeOffset)
+SMI_ACCESSORS(StackTraceFrame, offset, kOffsetOffset)
+ACCESSORS_CHECKED(StackTraceFrame, receiver, Object, kReceiverOffset,
+ !IsWasmFrame())
+ACCESSORS_CHECKED(StackTraceFrame, function, JSFunction, kFunctionOffset,
+ !IsWasmFrame())
+ACCESSORS_CHECKED(StackTraceFrame, wasm_object, Object, kWasmObjectOffset,
+ IsWasmFrame())
+SMI_ACCESSORS_CHECKED(StackTraceFrame, wasm_function_index,
+ kWasmFunctionIndexOffset, IsWasmFrame())
+
+bool StackTraceFrame::IsWasmFrame() const {
+ return ((flags() & kIsWasmFrame) != 0);
+}
+
+bool StackTraceFrame::IsJavaScriptFrame() const { return !IsWasmFrame(); }
+
+bool StackTraceFrame::IsStrict() const { return ((flags() & kIsStrict) != 0); }
+
+bool StackTraceFrame::ForceConstructor() const {
+ return ((flags() & kForceConstructor) != 0);
+}
ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex)
ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayIndex)
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698