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

Issue 10823293: Support resolution of indexed operators. (Closed)

Created:
8 years, 4 months ago by Anton Muhin
Modified:
8 years, 4 months ago
Reviewers:
kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Support resolution of indexed operators. Committed: https://code.google.com/p/dart/source/detail?r=10634

Patch Set 1 #

Total comments: 12

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -4 lines) Patch
M lib/compiler/implementation/resolver.dart View 1 1 chunk +7 lines, -0 lines 0 comments Download
M tests/compiler/dart2js/resolver_test.dart View 1 4 chunks +35 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
kasperl
LGTM. https://chromiumcodereview.appspot.com/10823293/diff/1/lib/compiler/implementation/resolver.dart File lib/compiler/implementation/resolver.dart (right): https://chromiumcodereview.appspot.com/10823293/diff/1/lib/compiler/implementation/resolver.dart#newcode1319 lib/compiler/implementation/resolver.dart:1319: } else { Turn this into else-if and ...
8 years, 4 months ago (2012-08-14 07:13:13 UTC) #1
Anton Muhin
8 years, 4 months ago (2012-08-14 11:34:44 UTC) #2
Thanks a lot for review, Kasper, submitting

https://chromiumcodereview.appspot.com/10823293/diff/1/lib/compiler/implement...
File lib/compiler/implementation/resolver.dart (right):

https://chromiumcodereview.appspot.com/10823293/diff/1/lib/compiler/implement...
lib/compiler/implementation/resolver.dart:1319: } else {
On 2012/08/14 07:13:13, kasperl wrote:
> Turn this into else-if and move Selector.INDEX_AND_INDEX_SET to the left side
of
> the === comparison for consistency.

Done.

https://chromiumcodereview.appspot.com/10823293/diff/1/lib/compiler/implement...
lib/compiler/implementation/resolver.dart:1321: register(op, selector) {
On 2012/08/14 07:13:13, kasperl wrote:
> This looks fine for now, but I'll probably have to change it a bit.

Sure

https://chromiumcodereview.appspot.com/10823293/diff/1/tests/compiler/dart2js...
File tests/compiler/dart2js/resolver_test.dart (right):

https://chromiumcodereview.appspot.com/10823293/diff/1/tests/compiler/dart2js...
tests/compiler/dart2js/resolver_test.dart:730: compileScript(String source,
f(compiler)) {
On 2012/08/14 07:13:13, kasperl wrote:
> Could this just return the compiler instead?

Done.

https://chromiumcodereview.appspot.com/10823293/diff/1/tests/compiler/dart2js...
tests/compiler/dart2js/resolver_test.dart:738: compileScript(@"class C {
toString() => 'C'; } main() { '${new C()}'; }",
Hopefully obsolete after addressing your previous comment.

On 2012/08/14 07:13:13, kasperl wrote:
> Maybe stuff the script code in a string variable to make the callback argument
> more readable.

https://chromiumcodereview.appspot.com/10823293/diff/1/tests/compiler/dart2js...
tests/compiler/dart2js/resolver_test.dart:750: compileScript(@"""
On 2012/08/14 07:13:13, kasperl wrote:
> Separate string variable for the script code.

Done.

https://chromiumcodereview.appspot.com/10823293/diff/1/tests/compiler/dart2js...
tests/compiler/dart2js/resolver_test.dart:758:
.lookupLocalMember(buildSourceString(@'operator$index'));
On 2012/08/14 07:13:13, kasperl wrote:
> It would be nice if you didn't have to hardcode the operator$index and the
> operator$indexSet names here. Can you use Elements.constructOperatorName
> instead? I'd rather hardcode [] and []=.

Done.

Powered by Google App Engine
This is Rietveld 408576698