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

Issue 14942010: Eliminate temporary locals for some expressions (Closed)

Created:
7 years, 7 months ago by Florian Schneider
Modified:
7 years, 6 months ago
CC:
reviews_dartlang.org, srdjan, hausner
Visibility:
Public.

Description

Eliminate temporary locals for some expressions This CL affects a subset of expressions that use temporary locals: constructor calls, array literals and and instance getter postfix-ops. For expressions that are de-sugared in the parser I added LetNode. It creates a scoped temporary local bound to an initializing expression. For expressions where we need a temporary local at graph-building time, I added a helper class TempLocalScope to easily create a single temporary local in the graph builder since this is a frequently recurring pattern. This simplifies code in the parser and the graph builder and also fixes a bug with indexed-super invocation and NoSuchMethod. BUG=dart:8918 R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=23401

Patch Set 1 #

Patch Set 2 : rebased, updated #

Patch Set 3 : rebased #

Patch Set 4 : removed duplicate code from platforms #

Patch Set 5 : cleaned up #

Total comments: 24

Patch Set 6 : new version #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 4

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -235 lines) Patch
M runtime/vm/ast.h View 1 2 3 4 5 6 7 8 6 chunks +33 lines, -21 lines 0 comments Download
M runtime/vm/ast.cc View 1 2 3 4 5 6 7 8 1 chunk +28 lines, -0 lines 0 comments Download
M runtime/vm/ast_printer.cc View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/bit_vector.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/code_generator_test.cc View 1 2 3 4 2 chunks +2 lines, -4 lines 0 comments Download
M runtime/vm/compiler.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph.cc View 1 2 3 4 4 chunks +21 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 3 4 5 5 chunks +21 lines, -8 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 3 4 5 6 7 8 13 chunks +122 lines, -39 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 2 chunks +65 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
M runtime/vm/parser.h View 1 2 3 4 5 6 7 5 chunks +1 line, -18 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 6 7 8 15 chunks +94 lines, -131 lines 0 comments Download
M runtime/vm/scopes.h View 1 2 3 4 5 4 chunks +4 lines, -5 lines 0 comments Download
M runtime/vm/symbols.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M tests/language/language.status View 1 2 3 4 2 chunks +0 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Florian Schneider
Request for comments: I started migrating three expressions: constructor calls, array literals, and instance-getter postfix-ops ...
7 years, 6 months ago (2013-05-28 13:21:59 UTC) #1
srdjan
DBC https://codereview.chromium.org/14942010/diff/35001/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://codereview.chromium.org/14942010/diff/35001/runtime/vm/flow_graph_builder.cc#newcode1845 runtime/vm/flow_graph_builder.cc:1845: ASSERT(value->definition()->temp_index() == visitor->temp_index() - 1); weird indent of ...
7 years, 6 months ago (2013-05-28 13:30:43 UTC) #2
hausner
DBC. The idea of the change looks nice to me. The biggest issue IMO is ...
7 years, 6 months ago (2013-05-28 17:00:47 UTC) #3
Kevin Millikin (Google)
This looks like a good approach. https://codereview.chromium.org/14942010/diff/35001/runtime/vm/ast.h File runtime/vm/ast.h (right): https://codereview.chromium.org/14942010/diff/35001/runtime/vm/ast.h#newcode302 runtime/vm/ast.h:302: const GrowableArray<AstNode*>& temp_expressions() ...
7 years, 6 months ago (2013-05-29 11:28:23 UTC) #4
Florian Schneider
On 2013/05/28 17:00:47, hausner wrote: > DBC. > > The idea of the change looks ...
7 years, 6 months ago (2013-05-29 15:30:13 UTC) #5
Florian Schneider
New version uploaded with comments addressed. The main diff is that now all prefix-, postfix-, ...
7 years, 6 months ago (2013-05-30 09:29:31 UTC) #6
Kevin Millikin (Google)
LGTM, considering the further improvements we discussed to be made in another CL. https://codereview.chromium.org/14942010/diff/60004/runtime/vm/ast.h File ...
7 years, 6 months ago (2013-05-30 11:30:55 UTC) #7
Florian Schneider
https://codereview.chromium.org/14942010/diff/60004/runtime/vm/ast.h File runtime/vm/ast.h (right): https://codereview.chromium.org/14942010/diff/60004/runtime/vm/ast.h#newcode301 runtime/vm/ast.h:301: LocalVariable* temp(intptr_t i) const { return vars_[i]; } On ...
7 years, 6 months ago (2013-05-30 11:46:57 UTC) #8
Florian Schneider
7 years, 6 months ago (2013-05-30 12:19:37 UTC) #9
Message was sent while issue was closed.
Committed patchset #9 manually as r23401 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698