Chromium Code Reviews
DescriptionProper dispatch in the presence of optional arguments.
Formerly for the methods like foo([Optional] x, [Opional] y), the following
dispatcher was emitted:
foo([x = _null, y = _null]) {
if (y === _null) {
return _foo_1(x); // WRONG!
}
if (x === _null) {
return _foo_2();
}
return _foo_3(x, y);
}
Now correct code is emitted:
foo([x = _null, y = _null]) {
if (y !== _null) {
return _foo_1(x, y);
}
if (x !== _null) {
return _foo_2(x);
}
return _foo_3();
}
TBR=podivilov@chromium.org
BUG=4487
Committed: https://code.google.com/p/dart/source/detail?r=10661
Patch Set 1 #
Total comments: 2
Messages
Total messages: 4 (0 generated)
|
|||||||||||||||||||