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

Issue 10855199: Refactor program traversing logic. (Closed)

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

Description

Refactor program traversing logic. R=smok@google.com Committed: https://code.google.com/p/dart/source/detail?r=10821

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -55 lines) Patch
M lib/compiler/implementation/dart_backend/backend.dart View 1 2 3 chunks +52 lines, -54 lines 2 comments Download
M tests/compiler/dart2js/unparser_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Anton Muhin
8 years, 4 months ago (2012-08-16 13:35:30 UTC) #1
Roman
lgtm https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implementation/dart_backend/backend.dart#newcode48 lib/compiler/implementation/dart_backend/backend.dart:48: final emptyTreeElements = new TreeElementMapping(); maybe remove this? ...
8 years, 4 months ago (2012-08-16 13:53:26 UTC) #2
Anton Muhin
Thanks a lot for review, submitting https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implementation/dart_backend/backend.dart#newcode48 lib/compiler/implementation/dart_backend/backend.dart:48: final emptyTreeElements = ...
8 years, 4 months ago (2012-08-16 14:06:42 UTC) #3
Roman
lgtm https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implementation/dart_backend/backend.dart File lib/compiler/implementation/dart_backend/backend.dart (right): https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implementation/dart_backend/backend.dart#newcode48 lib/compiler/implementation/dart_backend/backend.dart:48: final emptyTreeElements = new TreeElementMapping(); On 2012/08/16 14:06:42, ...
8 years, 4 months ago (2012-08-16 14:23:54 UTC) #4
Anton Muhin
8 years, 4 months ago (2012-08-16 14:30:44 UTC) #5
https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implem...
File lib/compiler/implementation/dart_backend/backend.dart (right):

https://chromiumcodereview.appspot.com/10855199/diff/2001/lib/compiler/implem...
lib/compiler/implementation/dart_backend/backend.dart:48: final
emptyTreeElements = new TreeElementMapping();
Why stress GC unnecessarily?

On 2012/08/16 14:23:54, Roman wrote:
> On 2012/08/16 14:06:42, Anton Muhin wrote:
> > I don't want to create a lot of garbage.
> > 
> > On 2012/08/16 13:53:26, Roman wrote:
> > > maybe remove this? it is used only twice, it would be better for
readability
> > to
> > > explicitly use new TreeElementMapping, and you will actually save 1 loc
> > 
> 
> Why not?

https://chromiumcodereview.appspot.com/10855199/diff/6001/lib/compiler/implem...
File lib/compiler/implementation/dart_backend/backend.dart (right):

https://chromiumcodereview.appspot.com/10855199/diff/6001/lib/compiler/implem...
lib/compiler/implementation/dart_backend/backend.dart:57:
processElement(element, treeElements) {
That sounds really interesting, thanks a lot, let me give it a try.

On 2012/08/16 14:23:54, Roman wrote:
> How about refactoring all this stuff to a separate class? Its "processing"
> output will be top level elements and classes to output.

Powered by Google App Engine
This is Rietveld 408576698