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

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

Issue 2413693003: [wasm] Stack inspection support for asm.js frames (Closed)
Patch Set: Created 4 years, 2 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-frames.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 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 // value returned from the VM might be a string if the function for the 1871 // value returned from the VM might be a string if the function for the
1872 // frame is unresolved. 1872 // frame is unresolved.
1873 if (IS_FUNCTION(f)) { 1873 if (IS_FUNCTION(f)) {
1874 return this.func_ = MakeMirror(f); 1874 return this.func_ = MakeMirror(f);
1875 } else { 1875 } else {
1876 return new UnresolvedFunctionMirror(f); 1876 return new UnresolvedFunctionMirror(f);
1877 } 1877 }
1878 }; 1878 };
1879 1879
1880 1880
1881 FrameMirror.prototype.script = function() {
1882 if (!this.script_) {
1883 this.script_ = MakeMirror(this.details_.script());
1884 }
1885
1886 return this.script_;
1887 }
1888
1889
1881 FrameMirror.prototype.receiver = function() { 1890 FrameMirror.prototype.receiver = function() {
1882 return MakeMirror(this.details_.receiver()); 1891 return MakeMirror(this.details_.receiver());
1883 }; 1892 };
1884 1893
1885 1894
1886 FrameMirror.prototype.isConstructCall = function() { 1895 FrameMirror.prototype.isConstructCall = function() {
1887 return this.details_.isConstructCall(); 1896 return this.details_.isConstructCall();
1888 }; 1897 };
1889 1898
1890 1899
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1947 return MakeMirror(this.details_.returnValue()); 1956 return MakeMirror(this.details_.returnValue());
1948 }; 1957 };
1949 1958
1950 1959
1951 FrameMirror.prototype.sourcePosition = function() { 1960 FrameMirror.prototype.sourcePosition = function() {
1952 return this.details_.sourcePosition(); 1961 return this.details_.sourcePosition();
1953 }; 1962 };
1954 1963
1955 1964
1956 FrameMirror.prototype.sourceLocation = function() { 1965 FrameMirror.prototype.sourceLocation = function() {
1957 var func = this.func(); 1966 var script = this.script();
1958 if (func.resolved()) { 1967 if (script) {
1959 var script = func.script(); 1968 return script.locationFromPosition(this.sourcePosition(), true);
1960 if (script) {
1961 return script.locationFromPosition(this.sourcePosition(), true);
1962 }
1963 } 1969 }
1964 }; 1970 };
1965 1971
1966 1972
1967 FrameMirror.prototype.sourceLine = function() { 1973 FrameMirror.prototype.sourceLine = function() {
1968 var location = this.sourceLocation(); 1974 var location = this.sourceLocation();
1969 if (location) { 1975 if (location) {
1970 return location.line; 1976 return location.line;
1971 } 1977 }
1972 }; 1978 };
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
3079 // Functions needed by the debugger runtime. 3085 // Functions needed by the debugger runtime.
3080 utils.InstallFunctions(utils, DONT_ENUM, [ 3086 utils.InstallFunctions(utils, DONT_ENUM, [
3081 "ClearMirrorCache", ClearMirrorCache 3087 "ClearMirrorCache", ClearMirrorCache
3082 ]); 3088 ]);
3083 3089
3084 // Export to debug.js 3090 // Export to debug.js
3085 utils.Export(function(to) { 3091 utils.Export(function(to) {
3086 to.MirrorType = MirrorType; 3092 to.MirrorType = MirrorType;
3087 }); 3093 });
3088 }) 3094 })
OLDNEW
« no previous file with comments | « src/debug/debug-frames.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698