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

Side by Side Diff: src/debug/mirrors.js

Issue 2069823003: [wasm] Enable wasm frame inspection for debugging (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@split-wasm-debug
Patch Set: Add two DCHECKs Created 4 years, 6 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/debug/debug-scopes.cc ('k') | src/frames.h » ('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 2006-2012 the V8 project authors. All rights reserved. 1 // Copyright 2006-2012 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 (function(global, utils) { 5 (function(global, utils) {
6 "use strict"; 6 "use strict";
7 7
8 // ---------------------------------------------------------------------------- 8 // ----------------------------------------------------------------------------
9 // Imports 9 // Imports
10 10
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 UnresolvedFunctionMirror.prototype.protoObject = function() { 1084 UnresolvedFunctionMirror.prototype.protoObject = function() {
1085 return GetUndefinedMirror(); 1085 return GetUndefinedMirror();
1086 }; 1086 };
1087 1087
1088 1088
1089 UnresolvedFunctionMirror.prototype.name = function() { 1089 UnresolvedFunctionMirror.prototype.name = function() {
1090 return this.value_; 1090 return this.value_;
1091 }; 1091 };
1092 1092
1093 1093
1094 UnresolvedFunctionMirror.prototype.debugName = function() {
1095 return this.value_;
1096 };
1097
1098
1094 UnresolvedFunctionMirror.prototype.inferredName = function() { 1099 UnresolvedFunctionMirror.prototype.inferredName = function() {
1095 return UNDEFINED; 1100 return UNDEFINED;
1096 }; 1101 };
1097 1102
1098 1103
1099 UnresolvedFunctionMirror.prototype.propertyNames = function(kind, limit) { 1104 UnresolvedFunctionMirror.prototype.propertyNames = function(kind, limit) {
1100 return []; 1105 return [];
1101 }; 1106 };
1102 1107
1103 1108
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 1618
1614 1619
1615 InternalPropertyMirror.prototype.value = function() { 1620 InternalPropertyMirror.prototype.value = function() {
1616 return MakeMirror(this.value_, false); 1621 return MakeMirror(this.value_, false);
1617 }; 1622 };
1618 1623
1619 1624
1620 var kFrameDetailsFrameIdIndex = 0; 1625 var kFrameDetailsFrameIdIndex = 0;
1621 var kFrameDetailsReceiverIndex = 1; 1626 var kFrameDetailsReceiverIndex = 1;
1622 var kFrameDetailsFunctionIndex = 2; 1627 var kFrameDetailsFunctionIndex = 2;
1623 var kFrameDetailsArgumentCountIndex = 3; 1628 var kFrameDetailsScriptIndex = 3;
1624 var kFrameDetailsLocalCountIndex = 4; 1629 var kFrameDetailsArgumentCountIndex = 4;
1625 var kFrameDetailsSourcePositionIndex = 5; 1630 var kFrameDetailsLocalCountIndex = 5;
1626 var kFrameDetailsConstructCallIndex = 6; 1631 var kFrameDetailsSourcePositionIndex = 6;
1627 var kFrameDetailsAtReturnIndex = 7; 1632 var kFrameDetailsConstructCallIndex = 7;
1628 var kFrameDetailsFlagsIndex = 8; 1633 var kFrameDetailsAtReturnIndex = 8;
1629 var kFrameDetailsFirstDynamicIndex = 9; 1634 var kFrameDetailsFlagsIndex = 9;
1635 var kFrameDetailsFirstDynamicIndex = 10;
1630 1636
1631 var kFrameDetailsNameIndex = 0; 1637 var kFrameDetailsNameIndex = 0;
1632 var kFrameDetailsValueIndex = 1; 1638 var kFrameDetailsValueIndex = 1;
1633 var kFrameDetailsNameValueSize = 2; 1639 var kFrameDetailsNameValueSize = 2;
1634 1640
1635 var kFrameDetailsFlagDebuggerFrameMask = 1 << 0; 1641 var kFrameDetailsFlagDebuggerFrameMask = 1 << 0;
1636 var kFrameDetailsFlagOptimizedFrameMask = 1 << 1; 1642 var kFrameDetailsFlagOptimizedFrameMask = 1 << 1;
1637 var kFrameDetailsFlagInlinedFrameIndexMask = 7 << 2; 1643 var kFrameDetailsFlagInlinedFrameIndexMask = 7 << 2;
1638 1644
1639 /** 1645 /**
1640 * Wrapper for the frame details information retreived from the VM. The frame 1646 * Wrapper for the frame details information retreived from the VM. The frame
1641 * details from the VM is an array with the following content. See runtime.cc 1647 * details from the VM is an array with the following content. See runtime.cc
1642 * Runtime_GetFrameDetails. 1648 * Runtime_GetFrameDetails.
1643 * 0: Id 1649 * 0: Id
1644 * 1: Receiver 1650 * 1: Receiver
1645 * 2: Function 1651 * 2: Function
1646 * 3: Argument count 1652 * 3: Script
1647 * 4: Local count 1653 * 4: Argument count
1648 * 5: Source position 1654 * 5: Local count
1649 * 6: Construct call 1655 * 6: Source position
1650 * 7: Is at return 1656 * 7: Construct call
1651 * 8: Flags (debugger frame, optimized frame, inlined frame index) 1657 * 8: Is at return
1658 * 9: Flags (debugger frame, optimized frame, inlined frame index)
1652 * Arguments name, value 1659 * Arguments name, value
1653 * Locals name, value 1660 * Locals name, value
1654 * Return value if any 1661 * Return value if any
1655 * @param {number} break_id Current break id 1662 * @param {number} break_id Current break id
1656 * @param {number} index Frame number 1663 * @param {number} index Frame number
1657 * @constructor 1664 * @constructor
1658 */ 1665 */
1659 function FrameDetails(break_id, index) { 1666 function FrameDetails(break_id, index) {
1660 this.break_id_ = break_id; 1667 this.break_id_ = break_id;
1661 this.details_ = %GetFrameDetails(break_id, index); 1668 this.details_ = %GetFrameDetails(break_id, index);
(...skipping 11 matching lines...) Expand all
1673 return this.details_[kFrameDetailsReceiverIndex]; 1680 return this.details_[kFrameDetailsReceiverIndex];
1674 }; 1681 };
1675 1682
1676 1683
1677 FrameDetails.prototype.func = function() { 1684 FrameDetails.prototype.func = function() {
1678 %CheckExecutionState(this.break_id_); 1685 %CheckExecutionState(this.break_id_);
1679 return this.details_[kFrameDetailsFunctionIndex]; 1686 return this.details_[kFrameDetailsFunctionIndex];
1680 }; 1687 };
1681 1688
1682 1689
1690 FrameDetails.prototype.script = function() {
1691 %CheckExecutionState(this.break_id_);
1692 return this.details_[kFrameDetailsScriptIndex];
1693 };
1694
1695
1683 FrameDetails.prototype.isConstructCall = function() { 1696 FrameDetails.prototype.isConstructCall = function() {
1684 %CheckExecutionState(this.break_id_); 1697 %CheckExecutionState(this.break_id_);
1685 return this.details_[kFrameDetailsConstructCallIndex]; 1698 return this.details_[kFrameDetailsConstructCallIndex];
1686 }; 1699 };
1687 1700
1688 1701
1689 FrameDetails.prototype.isAtReturn = function() { 1702 FrameDetails.prototype.isAtReturn = function() {
1690 %CheckExecutionState(this.break_id_); 1703 %CheckExecutionState(this.break_id_);
1691 return this.details_[kFrameDetailsAtReturnIndex]; 1704 return this.details_[kFrameDetailsAtReturnIndex];
1692 }; 1705 };
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
3035 // Functions needed by the debugger runtime. 3048 // Functions needed by the debugger runtime.
3036 utils.InstallFunctions(utils, DONT_ENUM, [ 3049 utils.InstallFunctions(utils, DONT_ENUM, [
3037 "ClearMirrorCache", ClearMirrorCache 3050 "ClearMirrorCache", ClearMirrorCache
3038 ]); 3051 ]);
3039 3052
3040 // Export to debug.js 3053 // Export to debug.js
3041 utils.Export(function(to) { 3054 utils.Export(function(to) {
3042 to.MirrorType = MirrorType; 3055 to.MirrorType = MirrorType;
3043 }); 3056 });
3044 }) 3057 })
OLDNEW
« no previous file with comments | « src/debug/debug-scopes.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698