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

Issue 24975002: - Implement a first cut for const String.env in the VM to allow (Closed)

Created:
7 years, 2 months ago by Ivan Posva
Modified:
7 years, 1 month ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Brian Wilkerson
Visibility:
Public.

Description

- Implement a first cut for const String.env in the VM to allow for configurations. int.env and bool.env to follow. - Reintroduce native const factory constructors.

Patch Set 1 #

Total comments: 15

Patch Set 2 : #

Patch Set 3 : #

Total comments: 5

Patch Set 4 : Update and add tests #

Patch Set 5 : Removed bool.inEnvironment, more default value handling, more tests #

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+241 lines, -16 lines) Patch
M runtime/bin/main.cc View 1 2 3 4 5 2 chunks +34 lines, -0 lines 0 comments Download
M runtime/include/dart_api.h View 1 2 3 4 5 2 chunks +24 lines, -1 line 0 comments Download
A runtime/lib/bool.cc View 1 2 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download
M runtime/lib/bool_patch.dart View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/lib/corelib_sources.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M runtime/lib/integers.cc View 1 2 3 4 5 2 chunks +23 lines, -0 lines 0 comments Download
M runtime/lib/integers_patch.dart View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/lib/string.cc View 1 2 3 4 5 2 chunks +22 lines, -0 lines 0 comments Download
M runtime/lib/string_patch.dart View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 4 5 3 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 4 5 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/vm/isolate.h View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/parser.cc View 1 2 3 4 5 5 chunks +33 lines, -15 lines 0 comments Download
M sdk/lib/core/bool.dart View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/core/int.dart View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/core/string.dart View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
A tests/corelib/string_env_test.dart View 1 4 5 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Ivan Posva
Re-animated a 6+months old patch. This allows setting configurations in the VM as a basis ...
7 years, 2 months ago (2013-09-27 07:21:01 UTC) #1
kasperl
Looking forward to seeing this stuff land! https://codereview.chromium.org/24975002/diff/1/sdk/lib/core/string.dart File sdk/lib/core/string.dart (right): https://codereview.chromium.org/24975002/diff/1/sdk/lib/core/string.dart#newcode128 sdk/lib/core/string.dart:128: * Returns ...
7 years, 2 months ago (2013-09-27 07:32:43 UTC) #2
bakster
- Consider default values for 'defaultValue'. - Please rename env to fromEnvironment. env is an ...
7 years, 2 months ago (2013-09-27 07:44:39 UTC) #3
ahe
What does this solve?
7 years, 2 months ago (2013-09-27 07:57:00 UTC) #4
floitsch
LGTM. I don't have a better name than "fromEnvironment" although I agree with Kasper that ...
7 years, 2 months ago (2013-09-27 13:52:31 UTC) #5
Ivan Posva
https://codereview.chromium.org/24975002/diff/1/runtime/bin/main.cc File runtime/bin/main.cc (right): https://codereview.chromium.org/24975002/diff/1/runtime/bin/main.cc#newcode437 runtime/bin/main.cc:437: UNIMPLEMENTED(); On 2013/09/27 07:44:39, bakster wrote: > Why not ...
7 years, 2 months ago (2013-09-27 21:05:05 UTC) #6
Lasse Reichstein Nielsen
https://codereview.chromium.org/24975002/diff/1/sdk/lib/core/int.dart File sdk/lib/core/int.dart (right): https://codereview.chromium.org/24975002/diff/1/sdk/lib/core/int.dart#newcode259 sdk/lib/core/int.dart:259: * integer literal a [FormatException] is thrown. Consider reformatting ...
7 years, 2 months ago (2013-09-28 00:13:38 UTC) #7
ahe
lgtm What is a "configuration"? Can you give an example of how you plan to ...
7 years, 2 months ago (2013-09-30 05:25:51 UTC) #8
ahe
Sorry, didn't mean to say "LGTM", accidentally hit the wrong button on my phone.
7 years, 2 months ago (2013-09-30 05:26:54 UTC) #9
Sean Eagan
On 2013/09/30 05:25:51, ahe wrote: > lgtm > > What is a "configuration"? Can you ...
7 years, 2 months ago (2013-10-01 16:58:25 UTC) #10
floitsch
This has nothing to do with configuration specific imports. I agree with Lasse: the constructors ...
7 years, 2 months ago (2013-10-01 17:20:44 UTC) #11
Lasse Reichstein Nielsen
https://codereview.chromium.org/24975002/diff/31001/sdk/lib/core/int.dart File sdk/lib/core/int.dart (right): https://codereview.chromium.org/24975002/diff/31001/sdk/lib/core/int.dart#newcode257 sdk/lib/core/int.dart:257: * Returns the integer value for the given environment ...
7 years, 2 months ago (2013-10-10 07:45:02 UTC) #12
ahe
Adding Brian for a heads up on compile-time constant evaluation.
7 years, 2 months ago (2013-10-10 14:09:09 UTC) #13
rakudrama
How is this supposed to work with ahead-of-time compilation like dart2js? I would want to ...
7 years, 2 months ago (2013-10-10 15:48:29 UTC) #14
ahe
On 2013/10/10 15:48:29, rakudrama wrote: > How is this supposed to work with ahead-of-time compilation ...
7 years, 2 months ago (2013-10-10 15:52:05 UTC) #15
Lasse Reichstein Nielsen
On 2013/10/10 15:52:05, ahe wrote: > On 2013/10/10 15:48:29, rakudrama wrote: > > How is ...
7 years, 2 months ago (2013-10-11 07:21:35 UTC) #16
Ivan Posva
7 years, 2 months ago (2013-10-11 16:22:10 UTC) #17
https://codereview.chromium.org/24975002/diff/31001/sdk/lib/core/int.dart
File sdk/lib/core/int.dart (right):

https://codereview.chromium.org/24975002/diff/31001/sdk/lib/core/int.dart#new...
sdk/lib/core/int.dart:257: * Returns the integer value for the given environment
variable [name] or [defaultValue]
On 2013/10/10 07:45:03, Lasse Reichstein Nielsen wrote:
> Long lines.

You are commenting on a revision that was only uploaded as a checkpoint to move
between machines. Thanks for you suggestions nonetheless.

-Ivan

Powered by Google App Engine
This is Rietveld 408576698