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

Issue 8893001: Second try for instantiation of objects. (Closed)

Created:
9 years ago by floitsch
Modified:
9 years ago
Reviewers:
ngeoffray
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Second try for instantiation of objects. First try was here: http://codereview.chromium.org/8888010/ Committed: https://code.google.com/p/dart/source/detail?r=2313

Patch Set 1 #

Patch Set 2 : Changes to last attempt. #

Total comments: 6

Patch Set 3 : Address comments. #

Patch Set 4 : Clean up even more. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+216 lines, -48 lines) Patch
M frog/leg/elements/elements.dart View 1 2 6 chunks +32 lines, -2 lines 0 comments Download
M frog/leg/emitter.dart View 1 2 4 chunks +25 lines, -13 lines 0 comments Download
M frog/leg/namer.dart View 1 2 3 2 chunks +62 lines, -19 lines 0 comments Download
M frog/leg/ssa/builder.dart View 1 2 5 chunks +93 lines, -13 lines 0 comments Download
M frog/leg/ssa/nodes.dart View 1 chunk +2 lines, -1 line 0 comments Download
M tests/language/language.status View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
floitsch
9 years ago (2011-12-09 13:55:07 UTC) #1
ngeoffray
LGTM, with comments http://codereview.chromium.org/8893001/diff/1001/frog/leg/elements/elements.dart File frog/leg/elements/elements.dart (right): http://codereview.chromium.org/8893001/diff/1001/frog/leg/elements/elements.dart#newcode123 frog/leg/elements/elements.dart:123: bool isStatic() { As discussed, I ...
9 years ago (2011-12-09 14:27:43 UTC) #2
floitsch
9 years ago (2011-12-09 15:24:57 UTC) #3
http://codereview.chromium.org/8893001/diff/1001/frog/leg/elements/elements.dart
File frog/leg/elements/elements.dart (right):

http://codereview.chromium.org/8893001/diff/1001/frog/leg/elements/elements.d...
frog/leg/elements/elements.dart:123: bool isStatic() {
On 2011/12/09 14:27:44, ngeoffray wrote:
> As discussed, I *strongly* prefer something like isInstanceMember. We could
even
> drop the isStatic to a hasThis method.

Done.

http://codereview.chromium.org/8893001/diff/1001/frog/leg/elements/elements.d...
frog/leg/elements/elements.dart:160: Type get type() => constructor.type;
On 2011/12/09 14:27:44, ngeoffray wrote:
> Not really fund of these getters, since we have the fields. I'd assign the
> fields in the constructor. But your approach does have the advantage of
> enforcing consistency between type, node, parameters and constructor.
> 
> Maybe ConsutrctorBodyElement should just extend Element? Then the getters
would
> work OK for me.

Needs to be a FunctionElement. Copied over the fields.

http://codereview.chromium.org/8893001/diff/1001/frog/leg/namer.dart
File frog/leg/namer.dart (right):

http://codereview.chromium.org/8893001/diff/1001/frog/leg/namer.dart#newcode81
frog/leg/namer.dart:81: String instanceName(Element element) {
On 2011/12/09 14:27:44, ngeoffray wrote:
> Why do you need instanceName and constructorBodyName? Why not just calling
> getName and switching on the element?

Still need constructorBodyName, since the super-call doesn't have the right
Element.
Done.

Powered by Google App Engine
This is Rietveld 408576698