You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking into the Clock sample running on Chrome, the stack trace is of almost no use.
Developers will have to debug code on Chrome, Safari, IE, Opera and whatever else. Basic information needs to be in the JS stacktrace.
dart2js+Chrome: No class names appear in the stack trace at all.
dart2js code:
Isolate.$defineClass("Balls", "Object", ["balls?", "lastTime", "root?"], {
...
newDistanceSquared$3: function(delta, b0, b1) {
[*] var nb0x = $.add(b0.get$x(), $.mul(b0.get$vx(), delta));
var nb0y = $.add(b0.get$y(), $.mul(b0.get$vy(), delta));
var nb1x = $.add(b1.get$x(), $.mul(b1.get$vx(), delta));
var nb1y = $.add(b1.get$y(), $.mul(b1.get$vy(), delta));
var ndx = $.abs($.sub(nb0x, nb1x));
var ndy = $.abs($.sub(nb0y, nb1y));
return $.add($.mul(ndx, ndx), $.mul(ndy, ndy));
},
Frog is somewhat better, but still inadequate.
At least it is not substantially worse than debugging in JavaScript using Closure.
Example: class name 'Balls' appears:
Breaking into the Clock sample running on Chrome, the stack trace is of almost no use.
Developers will have to debug code on Chrome, Safari, IE, Opera and whatever else. Basic information needs to be in the JS stacktrace.
dart2js+Chrome: No class names appear in the stack trace at all.
dart2js stack:
Isolate.$defineClass.newDistanceSquared$3 (Clock.dart.js:768)
Isolate.$defineClass.$call$1 (Clock.dart.js:1134)
$.forEach2 (Clock.dart.js:2280)
$.forEach (Clock.dart.js:2250)
Isolate.$defineClass.$call$1 (Clock.dart.js:1124)
$.forEach2 (Clock.dart.js:2280)
$.forEach (Clock.dart.js:2250)
Isolate.$defineClass.collideBalls$1 (Clock.dart.js:779)
Isolate.$defineClass.tick$0 (Clock.dart.js:787)
Isolate.$defineClass.$call$0 (Clock.dart.js:1053)
Isolate.$defineClass.$call$0 (Clock.dart.js:1158)
$.invokeClosure (Clock.dart.js:1656)
function0 (Clock.dart.js:1478)
dart2js code:$.abs($ .sub(nb0x, nb1x));$.abs($ .sub(nb0y, nb1y));$.add($ .mul(ndx, ndx), $.mul(ndy, ndy));
Isolate.$defineClass("Balls", "Object", ["balls?", "lastTime", "root?"], {
...
newDistanceSquared$3: function(delta, b0, b1) {
[*] var nb0x = $.add(b0.get$x(), $.mul(b0.get$vx(), delta));
var nb0y = $.add(b0.get$y(), $.mul(b0.get$vy(), delta));
var nb1x = $.add(b1.get$x(), $.mul(b1.get$vx(), delta));
var nb1y = $.add(b1.get$y(), $.mul(b1.get$vy(), delta));
var ndx =
var ndy =
return
},
Frog is somewhat better, but still inadequate.
At least it is not substantially worse than debugging in JavaScript using Closure.
Example: class name 'Balls' appears:
frog stack:
Balls.newDistanceSquared (Clock.dart.js_:3117)
(anonymous function) (Clock.dart.js_:3094)
ListIterator.hasNext (Clock.dart.js_:545)
(anonymous function) (Clock.dart.js_:3089)
ListIterator.hasNext (Clock.dart.js_:545)
Balls.collideBalls (Clock.dart.js_:3088)
Balls.tick (Clock.dart.js_:3084)
f (Clock.dart.js_:2971)
frog code at breakpoint:
Balls.prototype.newDistanceSquared = function(delta, b0, b1) {
[*] var nb0x = b0.x + b0.vx * delta;
var nb0y = b0.y + b0.vy * delta;
var nb1x = b1.x + b1.vx * delta;
var nb1y = b1.y + b1.vy * delta;
var ndx = (nb0x - nb1x).abs();
var ndy = (nb0y - nb1y).abs();
var nd2 = ndx * ndx + ndy * ndy;
return nd2;
}
The text was updated successfully, but these errors were encountered: