Index: src/mirror-debugger.js |
diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js |
index 3a0353515c1d449053959fd2049d60015b3c54c7..57de6c68f91f2c0bc5f57825331397ade1497436 100644 |
--- a/src/mirror-debugger.js |
+++ b/src/mirror-debugger.js |
@@ -1243,13 +1243,17 @@ const kFrameDetailsLocalCountIndex = 4; |
const kFrameDetailsSourcePositionIndex = 5; |
const kFrameDetailsConstructCallIndex = 6; |
const kFrameDetailsAtReturnIndex = 7; |
-const kFrameDetailsDebuggerFrameIndex = 8; |
+const kFrameDetailsFlagsIndex = 8; |
const kFrameDetailsFirstDynamicIndex = 9; |
const kFrameDetailsNameIndex = 0; |
const kFrameDetailsValueIndex = 1; |
const kFrameDetailsNameValueSize = 2; |
+const kFrameDetailsFlagDebuggerFrame = 1; |
+const kFrameDetailsFlagOptimizedFrame = 2; |
+const kFrameDetailsFlagInlinedFrame = 4; |
+ |
/** |
* Wrapper for the frame details information retreived from the VM. The frame |
* details from the VM is an array with the following content. See runtime.cc |
@@ -1262,7 +1266,7 @@ const kFrameDetailsNameValueSize = 2; |
* 5: Source position |
* 6: Construct call |
* 7: Is at return |
- * 8: Debugger frame |
+ * 8: Flags (debugger frame, optimized frame, inlined frame) |
* Arguments name, value |
* Locals name, value |
* Return value if any |
@@ -1308,7 +1312,22 @@ FrameDetails.prototype.isAtReturn = function() { |
FrameDetails.prototype.isDebuggerFrame = function() { |
%CheckExecutionState(this.break_id_); |
- return this.details_[kFrameDetailsDebuggerFrameIndex]; |
+ var f = kFrameDetailsFlagDebuggerFrame; |
+ return (this.details_[kFrameDetailsFlagsIndex] & f) == f; |
+} |
+ |
+ |
+FrameDetails.prototype.isOptimizedFrame = function() { |
+ %CheckExecutionState(this.break_id_); |
+ var f = kFrameDetailsFlagOptimizedFrame; |
+ return (this.details_[kFrameDetailsFlagsIndex] & f) == f; |
+} |
+ |
+ |
+FrameDetails.prototype.isInlinedFrame = function() { |
+ %CheckExecutionState(this.break_id_); |
+ var f = kFrameDetailsFlagInlinedFrame; |
+ return (this.details_[kFrameDetailsFlagsIndex] & f) == f; |
} |
@@ -1447,6 +1466,16 @@ FrameMirror.prototype.isDebuggerFrame = function() { |
}; |
+FrameMirror.prototype.isOptimizedFrame = function() { |
+ return this.details_.isOptimizedFrame(); |
+}; |
+ |
+ |
+FrameMirror.prototype.isInlinedFrame = function() { |
+ return this.details_.isInlinedFrame(); |
+}; |
+ |
+ |
FrameMirror.prototype.argumentCount = function() { |
return this.details_.argumentCount(); |
}; |