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

Issue 36883005: Add fields to platform library, implement them on runtime dart. (Closed)

Created:
7 years, 2 months ago by Bill Hesse
Modified:
7 years, 1 month ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add fields to platform library, implement them on runtime dart. BUG= R=ahe@google.com, ajohnsen@google.com, floitsch@google.com, sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=29244

Patch Set 1 #

Patch Set 2 : Rebase on top of CL 32683002 #

Patch Set 3 : Rebase on CL 32683002 #

Total comments: 7

Patch Set 4 : Implement on dart2js and dartium, add tests. #

Patch Set 5 : Add comments. #

Total comments: 25

Patch Set 6 : Address all comments #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+433 lines, -77 lines) Patch
M runtime/bin/builtin.dart View 1 2 3 4 5 1 chunk +20 lines, -0 lines 2 comments Download
M runtime/bin/dartutils.h View 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 2 3 4 5 2 chunks +19 lines, -6 lines 0 comments Download
M runtime/lib/platform_patch.dart View 1 2 3 4 5 1 chunk +85 lines, -0 lines 0 comments Download
M sdk/lib/_internal/lib/platform_patch.dart View 1 2 3 4 5 1 chunk +28 lines, -0 lines 3 comments Download
M sdk/lib/platform/platform.dart View 1 2 3 4 5 1 chunk +126 lines, -0 lines 2 comments Download
A tests/lib/platform/environment_test.dart View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A + tests/lib/platform/executable_arguments_test.dart View 1 2 3 1 chunk +3 lines, -7 lines 0 comments Download
A + tests/lib/platform/executable_test.dart View 1 2 3 1 chunk +7 lines, -10 lines 0 comments Download
A tests/lib/platform/isolate_test.dart View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
A tests/lib/platform/local_hostname_test.dart View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A + tests/lib/platform/number_of_processors_test.dart View 1 2 3 1 chunk +7 lines, -11 lines 0 comments Download
A tests/lib/platform/operating_system_test.dart View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
A tests/lib/platform/package_root_test.dart View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
A + tests/lib/platform/path_separator_test.dart View 1 2 3 1 chunk +7 lines, -5 lines 0 comments Download
A tests/lib/platform/script_test.dart View 1 2 3 4 5 1 chunk +16 lines, -0 lines 0 comments Download
A + tests/lib/platform/uri_test.dart View 1 2 3 2 chunks +3 lines, -6 lines 0 comments Download
M tests/standalone/io/uri_platform_test.dart View 1 2 3 1 chunk +2 lines, -32 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Bill Hesse
Do you agree that all the fields from Platform should move to dart:platform? I plan ...
7 years, 2 months ago (2013-10-23 15:54:58 UTC) #1
Anders Johnsen
Also, please add default options for dart2js/dartium. https://codereview.chromium.org/36883005/diff/50001/sdk/lib/platform/platform.dart File sdk/lib/platform/platform.dart (right): https://codereview.chromium.org/36883005/diff/50001/sdk/lib/platform/platform.dart#newcode42 sdk/lib/platform/platform.dart:42: final int ...
7 years, 2 months ago (2013-10-24 08:30:07 UTC) #2
Bill Hesse
OK, PTAL. https://codereview.chromium.org/36883005/diff/50001/tests/standalone/io/platform_test.dart File tests/standalone/io/platform_test.dart (right): https://codereview.chromium.org/36883005/diff/50001/tests/standalone/io/platform_test.dart#newcode1 tests/standalone/io/platform_test.dart:1: // Copyright (c) 2012, the Dart project ...
7 years, 2 months ago (2013-10-24 13:43:43 UTC) #3
Bill Hesse
7 years, 2 months ago (2013-10-24 15:33:07 UTC) #4
Søren Gjesse
lgtm
7 years, 2 months ago (2013-10-24 15:33:18 UTC) #5
ahe
Doesn't look good for dart2js. https://codereview.chromium.org/36883005/diff/160001/sdk/lib/platform/platform.dart File sdk/lib/platform/platform.dart (right): https://codereview.chromium.org/36883005/diff/160001/sdk/lib/platform/platform.dart#newcode10 sdk/lib/platform/platform.dart:10: class _Platform { This ...
7 years, 2 months ago (2013-10-24 15:38:16 UTC) #6
Bill Hesse
On 2013/10/24 15:38:16, ahe wrote: > Doesn't look good for dart2js. > > https://codereview.chromium.org/36883005/diff/160001/sdk/lib/platform/platform.dart > ...
7 years, 2 months ago (2013-10-24 15:49:38 UTC) #7
floitsch
LGTM after Peter's concerns are addressed. I would simply make all of the getters external. ...
7 years, 2 months ago (2013-10-24 15:50:57 UTC) #8
Anders Johnsen
LGTM, but wait for Peters comments. https://codereview.chromium.org/36883005/diff/160001/runtime/bin/dartutils.cc File runtime/bin/dartutils.cc (right): https://codereview.chromium.org/36883005/diff/160001/runtime/bin/dartutils.cc#newcode715 runtime/bin/dartutils.cc:715: Dart_Handle package_root_string = ...
7 years, 2 months ago (2013-10-24 17:21:01 UTC) #9
Bill Hesse
Changed according to Peter's and Ivan's suggestions. Works on VM, dart2js, dart2dart, dartium, dartanalyzer and ...
7 years, 1 month ago (2013-10-25 11:06:34 UTC) #10
ahe
sdk/lib/_internal/lib/platform_patch.dart, LGTM https://codereview.chromium.org/36883005/diff/260001/sdk/lib/_internal/lib/platform_patch.dart File sdk/lib/_internal/lib/platform_patch.dart (right): https://codereview.chromium.org/36883005/diff/260001/sdk/lib/_internal/lib/platform_patch.dart#newcode4 sdk/lib/_internal/lib/platform_patch.dart:4: In follow-up CL: import 'dart:_js_helper' show Primitives; ...
7 years, 1 month ago (2013-10-25 11:34:04 UTC) #11
Bill Hesse
Committed patchset #6 manually as r29244 (presubmit successful).
7 years, 1 month ago (2013-10-25 11:48:47 UTC) #12
Ivan Posva
-Ivan https://codereview.chromium.org/36883005/diff/160001/runtime/lib/platform_patch.dart File runtime/lib/platform_patch.dart (right): https://codereview.chromium.org/36883005/diff/160001/runtime/lib/platform_patch.dart#newcode21 runtime/lib/platform_patch.dart:21: return "/"; null https://codereview.chromium.org/36883005/diff/260001/sdk/lib/platform/platform.dart File sdk/lib/platform/platform.dart (right): https://codereview.chromium.org/36883005/diff/260001/sdk/lib/platform/platform.dart#newcode51 ...
7 years, 1 month ago (2013-10-25 17:03:47 UTC) #13
Ivan Posva
-Ivan https://codereview.chromium.org/36883005/diff/260001/runtime/bin/builtin.dart File runtime/bin/builtin.dart (right): https://codereview.chromium.org/36883005/diff/260001/runtime/bin/builtin.dart#newcode316 runtime/bin/builtin.dart:316: int get numberOfProcessors => Platform.numberOfProcessors; I am assuming ...
7 years, 1 month ago (2013-10-25 17:26:43 UTC) #14
Bill Hesse
7 years, 1 month ago (2013-10-25 17:49:59 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/36883005/diff/160001/runtime/lib/platform_pat...
File runtime/lib/platform_patch.dart (right):

https://codereview.chromium.org/36883005/diff/160001/runtime/lib/platform_pat...
runtime/lib/platform_patch.dart:21: return "/";
On 2013/10/25 17:03:48, Ivan Posva wrote:
> null

Are you ok with making this "/" on Dartium, when a Dartium implementation is
added?

https://codereview.chromium.org/36883005/diff/260001/runtime/bin/builtin.dart
File runtime/bin/builtin.dart (right):

https://codereview.chromium.org/36883005/diff/260001/runtime/bin/builtin.dart...
runtime/bin/builtin.dart:316: int get numberOfProcessors =>
Platform.numberOfProcessors;
On 2013/10/25 17:26:44, Ivan Posva wrote:
> I am assuming that we will remove the Platform from dart:io. In the meantime
> please add a comment here as to what is happening because otherwise it looks
> like a circularity.

Comment added in CL 43773004.

https://codereview.chromium.org/36883005/diff/260001/sdk/lib/_internal/lib/pl...
File sdk/lib/_internal/lib/platform_patch.dart (right):

https://codereview.chromium.org/36883005/diff/260001/sdk/lib/_internal/lib/pl...
sdk/lib/_internal/lib/platform_patch.dart:21: patch List<String> get
executableArguments => new List<String>(0);
On 2013/10/25 11:34:04, ahe wrote:
> Add comment that this is unmodifiable.

Done.

https://codereview.chromium.org/36883005/diff/260001/sdk/lib/platform/platfor...
File sdk/lib/platform/platform.dart (right):

https://codereview.chromium.org/36883005/diff/260001/sdk/lib/platform/platfor...
sdk/lib/platform/platform.dart:51: /**
On 2013/10/25 17:03:48, Ivan Posva wrote:
> These specific testers are problematic. Let's assume that we or a third-party
> ports Dart to BSD, now they would have to change the dart:platform API.

Removed in CL 43773004

Powered by Google App Engine
This is Rietveld 408576698