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

Issue 9360039: Create values for literal Strings. (Closed)

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

Description

Create values for literal Strings. Committed: https://code.google.com/p/dart/source/detail?r=4254

Patch Set 1 #

Patch Set 2 : Add removed line again. #

Total comments: 1

Patch Set 3 : Make CompileTimeConstantEvaluator use DartStrings. #

Patch Set 4 : Add test. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -76 lines) Patch
M frog/leg/compile_time_constants.dart View 1 2 2 chunks +81 lines, -9 lines 2 comments Download
M frog/leg/emitter.dart View 1 2 3 chunks +4 lines, -3 lines 2 comments Download
M frog/leg/leg.dart View 1 2 1 chunk +1 line, -0 lines 2 comments Download
M frog/leg/ssa/codegen.dart View 1 2 2 chunks +4 lines, -59 lines 2 comments Download
A frog/tests/leg_only/src/SimpleStringConstantTest.dart View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M tests/co19/co19-leg.status View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language-leg.status View 3 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
karlklose
8 years, 10 months ago (2012-02-14 10:30:39 UTC) #1
floitsch
As discussed: we need to move the writeEscapedString from codegen to the CompileTimeConstantHandler. http://codereview.chromium.org/9360039/diff/5/frog/leg/compile_time_constants.dart File ...
8 years, 10 months ago (2012-02-14 10:40:57 UTC) #2
karlklose
Thanks for the pointers Florian and Lasse. PTAL.
8 years, 10 months ago (2012-02-14 14:08:05 UTC) #3
floitsch
LGTM! can you verify if ssa still needs to import ../util/characters.dart. https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/compile_time_constants.dart File frog/leg/compile_time_constants.dart (right): ...
8 years, 10 months ago (2012-02-14 16:08:02 UTC) #4
karlklose
8 years, 10 months ago (2012-02-15 10:37:30 UTC) #5
Thanks for the review, Florian.

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/compile_tim...
File frog/leg/compile_time_constants.dart (right):

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/compile_tim...
frog/leg/compile_time_constants.dart:99: buffer.add("$value");
On 2012/02/14 16:08:02, floitsch wrote:
> not your code, but could you please add parenthesis around negative numbers
> (num.isNegative()).

Done.

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/emitter.dart
File frog/leg/emitter.dart (right):

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/emitter.dar...
frog/leg/emitter.dart:110: var value = constants.writeJsCodeForVariable(new
StringBuffer(), element);
On 2012/02/14 16:08:02, floitsch wrote:
> 80 chars.

Done.

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/leg.dart
File frog/leg/leg.dart (right):

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/leg.dart#ne...
frog/leg/leg.dart:17: #import('util/characters.dart');
On 2012/02/14 16:08:02, floitsch wrote:
> sort alphabetically.
> (also please fix the string_validator).

Done.

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/ssa/codegen...
File frog/leg/ssa/codegen.dart (right):

https://chromiumcodereview.appspot.com/9360039/diff/6001/frog/leg/ssa/codegen...
frog/leg/ssa/codegen.dart:564: compiler.cancel(reason, instruction:node);
On 2012/02/14 16:08:02, floitsch wrote:
> space after instruction:

Done.

Powered by Google App Engine
This is Rietveld 408576698