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

Issue 11092104: Reserve a state variable for the bailout function. (Closed)

Created:
8 years, 2 months ago by floitsch
Modified:
8 years, 2 months ago
CC:
reviews_dartlang.org, ngeoffray
Visibility:
Public.

Description

Reserve a state variable for the bailout function. BUG=http://dartbug.com/5807 Committed: https://code.google.com/p/dart/source/detail?r=13620

Patch Set 1 #

Patch Set 2 : Add tests. #

Total comments: 2

Patch Set 3 : Address comment. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -14 lines) Patch
M lib/compiler/implementation/ssa/codegen.dart View 1 2 5 chunks +9 lines, -7 lines 2 comments Download
M lib/compiler/implementation/ssa/variable_allocator.dart View 2 chunks +17 lines, -7 lines 2 comments Download
A tests/language/state_mangling2_test.dart View 1 1 chunk +36 lines, -0 lines 0 comments Download
A tests/language/state_mangling_test.dart View 1 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
floitsch
8 years, 2 months ago (2012-10-12 12:28:21 UTC) #1
kasperl
LGTM! https://codereview.chromium.org/11092104/diff/2001/lib/compiler/implementation/ssa/codegen.dart File lib/compiler/implementation/ssa/codegen.dart (right): https://codereview.chromium.org/11092104/diff/2001/lib/compiler/implementation/ssa/codegen.dart#newcode2793 lib/compiler/implementation/ssa/codegen.dart:2793: pushExpressionAsStatement(new js.Assignment(new js.VariableUse(stateName), Add a helper for using ...
8 years, 2 months ago (2012-10-12 12:33:52 UTC) #2
karlklose
LGTM.
8 years, 2 months ago (2012-10-12 12:45:13 UTC) #3
floitsch
https://codereview.chromium.org/11092104/diff/2001/lib/compiler/implementation/ssa/codegen.dart File lib/compiler/implementation/ssa/codegen.dart (right): https://codereview.chromium.org/11092104/diff/2001/lib/compiler/implementation/ssa/codegen.dart#newcode2793 lib/compiler/implementation/ssa/codegen.dart:2793: pushExpressionAsStatement(new js.Assignment(new js.VariableUse(stateName), On 2012/10/12 12:33:52, kasperl wrote: > ...
8 years, 2 months ago (2012-10-12 13:16:44 UTC) #4
ngeoffray
https://codereview.chromium.org/11092104/diff/4004/lib/compiler/implementation/ssa/codegen.dart File lib/compiler/implementation/ssa/codegen.dart (right): https://codereview.chromium.org/11092104/diff/4004/lib/compiler/implementation/ssa/codegen.dart#newcode2715 lib/compiler/implementation/ssa/codegen.dart:2715: newParameters.add(new js.Parameter(name)); Something doesn't look right here: why do ...
8 years, 2 months ago (2012-10-15 14:12:29 UTC) #5
floitsch
8 years, 2 months ago (2012-10-18 14:58:47 UTC) #6
https://codereview.chromium.org/11092104/diff/4004/lib/compiler/implementatio...
File lib/compiler/implementation/ssa/codegen.dart (right):

https://codereview.chromium.org/11092104/diff/4004/lib/compiler/implementatio...
lib/compiler/implementation/ssa/codegen.dart:2715: newParameters.add(new
js.Parameter(name));
On 2012/10/15 14:12:29, ngeoffray wrote:
> Something doesn't look right here: why do you need to do it for state but not
> for env$i? Is it the declaredVariables.add call that makes it safe? Should you
> do that for the state as well instead of this CL?

There was still a bug in the handling of environment variables. But they are
easier to handle since they only live in the setup. The state variable is more
annoying since there are "state=0" statements sprinkled all over the function.
Even if state doesn't conflict with any argument it might still conflict with a
local. Therefore we have to reserve 'state' for the whole function.

Fix for env0... in https://codereview.chromium.org/11186048

https://codereview.chromium.org/11092104/diff/4004/lib/compiler/implementatio...
File lib/compiler/implementation/ssa/variable_allocator.dart (right):

https://codereview.chromium.org/11092104/diff/4004/lib/compiler/implementatio...
lib/compiler/implementation/ssa/variable_allocator.dart:436: // throughout the
function. Therefore we make sure no one uses it at any
On 2012/10/15 14:12:29, ngeoffray wrote:
> I'd prefer keeping the comment that was there before, and add an explicit
> comment on why we need stateName too.

https://codereview.chromium.org/11186048

Powered by Google App Engine
This is Rietveld 408576698