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

Issue 8888010: First instantiations of objects. (Closed)

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

Description

First instantiations of objects. Committed: https://code.google.com/p/dart/source/detail?r=2254

Patch Set 1 #

Patch Set 2 : small refactorings. #

Total comments: 16

Patch Set 3 : Addressed comments. #

Patch Set 4 : Added comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+172 lines, -30 lines) Patch
M frog/leg/elements/elements.dart View 1 2 3 chunks +28 lines, -1 line 0 comments Download
M frog/leg/emitter.dart View 1 4 chunks +19 lines, -12 lines 0 comments Download
M frog/leg/namer.dart View 1 2 3 3 chunks +29 lines, -3 lines 0 comments Download
M frog/leg/ssa/builder.dart View 1 2 5 chunks +94 lines, -13 lines 0 comments Download
M frog/leg/ssa/nodes.dart View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
floitsch
Sample output: class A { A() {} } main() { new A(); } => function ...
9 years ago (2011-12-08 15:25:37 UTC) #1
ngeoffray
LGTM! http://codereview.chromium.org/8888010/diff/2001/frog/leg/elements/elements.dart File frog/leg/elements/elements.dart (right): http://codereview.chromium.org/8888010/diff/2001/frog/leg/elements/elements.dart#newcode193 frog/leg/elements/elements.dart:193: List<Element> backendMembers; Please make that a Link. http://codereview.chromium.org/8888010/diff/2001/frog/leg/namer.dart ...
9 years ago (2011-12-08 16:01:40 UTC) #2
floitsch
9 years ago (2011-12-08 16:35:59 UTC) #3
http://codereview.chromium.org/8888010/diff/2001/frog/leg/elements/elements.dart
File frog/leg/elements/elements.dart (right):

http://codereview.chromium.org/8888010/diff/2001/frog/leg/elements/elements.d...
frog/leg/elements/elements.dart:193: List<Element> backendMembers;
On 2011/12/08 16:01:40, ngeoffray wrote:
> Please make that a Link.

Done.

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

http://codereview.chromium.org/8888010/diff/2001/frog/leg/namer.dart#newcode32
frog/leg/namer.dart:32: String dartId = '${element.name}';
On 2011/12/08 16:01:40, ngeoffray wrote:
> Please add a method getName that takes an element, and returns 'default' if
the
> name is empty. And use that method here and in instanceName.

Done.

http://codereview.chromium.org/8888010/diff/2001/frog/leg/namer.dart#newcode34
frog/leg/namer.dart:34: assert(element is FunctionElement);
On 2011/12/08 16:01:40, ngeoffray wrote:
> element.kind == ElementKind.CONSTRUCTOR?

Done.

http://codereview.chromium.org/8888010/diff/2001/frog/leg/namer.dart#newcode76
frog/leg/namer.dart:76: if (element is ConstructorBodyElement) {
On 2011/12/08 16:01:40, ngeoffray wrote:
> element.kind == ElementKind.CONSTRUCTOR_BODY

Done.

http://codereview.chromium.org/8888010/diff/2001/frog/leg/namer.dart#newcode83
frog/leg/namer.dart:83: String constructorBodyName(Element element) {
On 2011/12/08 16:01:40, ngeoffray wrote:
> assert(element.kind == ElementKind.BODY_CONSTRUCTOR)?
Actually it must be a constructor. This is necessary, as we need to get to the
body-constructor from a constructor when we call 'super'.
Added comment and assert.

http://codereview.chromium.org/8888010/diff/2001/frog/leg/ssa/builder.dart
File frog/leg/ssa/builder.dart (right):

http://codereview.chromium.org/8888010/diff/2001/frog/leg/ssa/builder.dart#ne...
frog/leg/ssa/builder.dart:17: graph = compileConstructor(builder, function,
element, elements);
On 2011/12/08 16:01:40, ngeoffray wrote:
> I wouuld have the same API between compileConstructor* and compileMethod.
> Passing in the builder and the element.

Done.

http://codereview.chromium.org/8888010/diff/2001/frog/leg/ssa/builder.dart#ne...
frog/leg/ssa/builder.dart:113: if (superInvocation !== null) {
On 2011/12/08 16:01:40, ngeoffray wrote:
> I'm not really fund of having code that we know is not executed. Please add a
> unimplemented just before this code.

Done.

http://codereview.chromium.org/8888010/diff/2001/frog/leg/ssa/builder.dart#ne...
frog/leg/ssa/builder.dart:669: visitSend(node.send);
On 2011/12/08 16:01:40, ngeoffray wrote:
> => syntax?

Done.

Powered by Google App Engine
This is Rietveld 408576698