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

Issue 10697031: Generate JS operators using helper functions with thunks for operands. (Closed)

Created:
8 years, 5 months ago by Lasse Reichstein Nielsen
Modified:
8 years, 5 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Generate JS operators using helper functions with thunks for operands. This removes a lot of boilerplate, yet complex, code with its occasional inevitable errors. Committed: https://code.google.com/p/dart/source/detail?r=9250

Patch Set 1 #

Total comments: 15

Patch Set 2 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -349 lines) Patch
M lib/compiler/implementation/ssa/codegen.dart View 1 26 chunks +367 lines, -348 lines 0 comments Download
M lib/compiler/implementation/ssa/codegen_helpers.dart View 3 chunks +30 lines, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein Nielsen
This is a lower-impact attempt to simplify JS expression code generation. In the longer run, ...
8 years, 5 months ago (2012-06-29 06:05:18 UTC) #1
Lasse Reichstein Nielsen
If we can't go to a full AST right now, I think we should do ...
8 years, 5 months ago (2012-06-29 11:34:56 UTC) #2
floitsch
LGTM. https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implementation/ssa/codegen.dart File lib/compiler/implementation/ssa/codegen.dart (right): https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implementation/ssa/codegen.dart#newcode678 lib/compiler/implementation/ssa/codegen.dart:678: binary("=", (){ But each closure on one line. ...
8 years, 5 months ago (2012-06-29 11:55:32 UTC) #3
Lasse Reichstein Nielsen
8 years, 5 months ago (2012-06-29 14:20:13 UTC) #4
https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implement...
File lib/compiler/implementation/ssa/codegen.dart (right):

https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:678: binary("=", (){
On 2012/06/29 11:55:32, floitsch wrote:
> But each closure on one line.

Done.

https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:1229: () => use(node.left,
expectedPrecedence),
On 2012/06/29 11:55:32, floitsch wrote:
> indentation.

Done.

https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:1241: () => visitInvokeBinary(node,
op),
Done everywhere *cross fingers*.

https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:1281: () => use(left,
expectedPrecedence),
On 2012/06/29 11:55:32, floitsch wrote:
> I would define the closures first:
> Function condition = () {
>  ...
> };
> Function ifTrue = () {
>  ...
> };
> ...
> conditional(condition, ifTrue, ifFalse);

Done.

https://chromiumcodereview.appspot.com/10697031/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/codegen.dart:1624: generateAnd(thenGraph, () {
use(node.inputs[0],
On 2012/06/29 11:55:32, floitsch wrote:
> move the closure in one line.

Done.

Powered by Google App Engine
This is Rietveld 408576698