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

Issue 8713012: Introduce Dart_SetVMFlags API function. (Closed)

Created:
9 years ago by podivilov
Modified:
9 years ago
Reviewers:
siva
CC:
reviews_dartlang.org, Anton Muhin, vsm
Visibility:
Public.

Description

Introduce Dart_SetVMFlags API function. It should be possible to set command line arguments without providing isolate init callback. Committed: https://code.google.com/p/dart/source/detail?r=1972

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : Force atomicity. #

Total comments: 16

Patch Set 4 : Comments addressed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -21 lines) Patch
M runtime/bin/gen_snapshot.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M runtime/bin/main.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/include/dart_api.h View 1 2 3 1 chunk +12 lines, -5 lines 0 comments Download
M runtime/vm/dart.h View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/dart.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M runtime/vm/flags.h View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M runtime/vm/flags.cc View 1 2 3 3 chunks +11 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
podivilov1
9 years ago (2011-11-28 13:51:06 UTC) #1
siva
Currently we have a certain amount of atomicity that flags initialization has with Dart_initialize (i.e ...
9 years ago (2011-11-29 19:08:43 UTC) #2
podivilov
PTAL. http://codereview.chromium.org/8713012/diff/5001/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): http://codereview.chromium.org/8713012/diff/5001/runtime/vm/dart_api_impl.cc#newcode471 runtime/vm/dart_api_impl.cc:471: Flags::ProcessCommandLineFlags(argc, argv); On 2011/11/29 19:08:43, asiva wrote: > ...
9 years ago (2011-11-30 11:50:36 UTC) #3
siva
lgtm once these comments are addressed. http://codereview.chromium.org/8713012/diff/8001/runtime/include/dart_api.h File runtime/include/dart_api.h (right): http://codereview.chromium.org/8713012/diff/8001/runtime/include/dart_api.h#newcode265 runtime/include/dart_api.h:265: DART_EXPORT void Dart_SetVMFlags(int ...
9 years ago (2011-11-30 19:09:38 UTC) #4
podivilov
9 years ago (2011-12-01 11:10:22 UTC) #5
http://codereview.chromium.org/8713012/diff/8001/runtime/include/dart_api.h
File runtime/include/dart_api.h (right):

http://codereview.chromium.org/8713012/diff/8001/runtime/include/dart_api.h#n...
runtime/include/dart_api.h:265: DART_EXPORT void Dart_SetVMFlags(int argc, const
char** argv);
On 2011/11/30 19:09:38, asiva wrote:
> Please make this also return bool, so that we have true when it is set and
false
> when there is an error or multiple invokes.

Done.

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/dart.cc
File runtime/vm/dart.cc (right):

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/dart.cc#newcode28
runtime/vm/dart.cc:28: if (vm_isolate_ != NULL) {
On 2011/11/30 19:09:38, asiva wrote:
> if (vm_isolate_ != NULL || !Flags::Initialized()) {
>   return false;
> }

Done.

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/dart_api_impl.cc
File runtime/vm/dart_api_impl.cc (right):

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/dart_api_impl.cc#...
runtime/vm/dart_api_impl.cc:525: DART_EXPORT void Dart_SetVMFlags(int argc,
const char** argv) {
On 2011/11/30 19:09:38, asiva wrote:
> void => bool

Done.

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/dart_api_impl.cc#...
runtime/vm/dart_api_impl.cc:526: Flags::ProcessCommandLineFlags(argc, argv);
On 2011/11/30 19:09:38, asiva wrote:
> return Flags::ProcessCommandLineFlags(argc, argv);

Done.

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/flags.cc
File runtime/vm/flags.cc (right):

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/flags.cc#newcode230
runtime/vm/flags.cc:230: void Flags::ProcessCommandLineFlags(int
number_of_vm_flags,
On 2011/11/30 19:09:38, asiva wrote:
> void => bool

Done.

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/flags.cc#newcode234
runtime/vm/flags.cc:234: return;
On 2011/11/30 19:09:38, asiva wrote:
> return false; 
> and remove the UNREACHABLE();

Done.

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/flags.cc#newcode276
runtime/vm/flags.cc:276: }
On 2011/11/30 19:09:38, asiva wrote:
>   return true;

Done.

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/flags.h
File runtime/vm/flags.h (right):

http://codereview.chromium.org/8713012/diff/8001/runtime/vm/flags.h#newcode54
runtime/vm/flags.h:54: static void ProcessCommandLineFlags(int argc, const
char** argv);
On 2011/11/30 19:09:38, asiva wrote:
> change void to bool

Done.

Powered by Google App Engine
This is Rietveld 408576698