Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to Dart VM --enable-checked-mode #1950

Closed
sethladd opened this issue Mar 2, 2012 · 9 comments
Closed

Add flag to Dart VM --enable-checked-mode #1950

sethladd opened this issue Mar 2, 2012 · 9 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug

Comments

@sethladd
Copy link
Contributor

sethladd commented Mar 2, 2012

We talk about checked mode and production mode a lot, both in our documentation and in the spec. To keep things simple, I suggest adding an --enable-checked-mode flag to the VM, which turns on the behavior and semantics specified by what "checked mode" means.

I believe this is the same as --enable_type_checks and --enable_asserts

Ideally, this matches the same flags that can be given to Frog.

@ghost
Copy link

ghost commented Mar 2, 2012

IN VM --enable_type_checks is the same flag as requested --enable_checked_mode: it turns on the type checks and enables asserts. We may want to rename --enable_type_checks to --enable_checked_mode to be consistent with naming in spec.


Set owner to @crelier.

@crelier
Copy link
Contributor

crelier commented Mar 2, 2012

I'm afraid I do not like this proposed change. VM flags should have a more specific meaning than just "checked mode" and a finer granularity on what they control. Adding a new flag, rather than renaming an existing one is not much better, since it makes flags depending on each other. On the other hand, --enable_type_checks already turns on --enable_asserts, if I remember correctly.
   
Reassigning to Ivan for more opinion.


Set owner to @iposva-google.

@sethladd
Copy link
Contributor Author

sethladd commented Mar 2, 2012

Here's an example, from the spec, where "checked mode" means "turn on asserts":

"""
In checked mode, execution of an assert statement assert(e); proceeds as follows:
"""

@crelier
Copy link
Contributor

crelier commented Mar 3, 2012

After some discussion, it seems that keeping --enable_asserts and --enable_type_checks (but decoupling them), and adding a new --enable_checked_mode is the right solution.

Asserts would be evaluated if --enable_asserts or --enable_checked_mode.
Type checks would be performed if --enable_type_checks or --enable_checked_mode.

Let me know if this is acceptable.

@sethladd
Copy link
Contributor Author

sethladd commented Mar 3, 2012

SGTM! Thanks for simplifying this. :)

@iposva-google
Copy link
Contributor

Set owner to @crelier.
Added Accepted label.

@sethladd
Copy link
Contributor Author

sethladd commented Mar 5, 2012

Frog just added --enable-checked-mode (notice dashes, not underscores)

@iposva-google
Copy link
Contributor

Set owner to @iposva-google.

@iposva-google
Copy link
Contributor

I did add support for --enable-checked-mode in the VM. That left me wondering whether we want to keep the name or whether we want to simplify to --checked-mode.

https://chromiumcodereview.appspot.com/9668034/


Added Fixed label.

@sethladd sethladd added Type-Enhancement area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Mar 9, 2012
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
copybara-service bot pushed a commit that referenced this issue Feb 23, 2023
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/dba6f94..e4cdbd6):
  e4cdbd6f  2023-02-21  Janice Collins  Record rendering simplification (#3344)

http (https://github.com/dart-lang/http/compare/c13a3f8..1500a71):
  1500a71  2023-02-23  Devon Carew  contribute a pull request labeler workflow (#875)
  e2c4e6f  2023-02-21  Brian Quinlan  Add a link to cronet_http_embedded from cronet_http. (#874)

markdown (https://github.com/dart-lang/markdown/compare/4befe66..ecbffa9):
  ecbffa9  2023-02-22  Kevin Moore  Use latest lints, require Dart 2.19 or later (#524)

shelf (https://github.com/dart-lang/shelf/compare/707c8b2..e3cfe79):
  e3cfe79  2023-02-22  Devon Carew  contribute issue templates and a pull request labeler (#332)

test (https://github.com/dart-lang/test/compare/e56c643..2cc4144):
  2cc4144e  2023-02-22  Nate Bosch  Avoid exceptions for iterable getters (#1954)
  f7fe4f06  2023-02-22  Nate Bosch  Include stack trace for exception in has (#1953)
  ba8e43af  2023-02-22  Nate Bosch  Only grab the first failure in softCheck (#1949)
  34df652b  2023-02-22  Nate Bosch  Flush stdin before test (#1950)
  ae015ef6  2023-02-22  Nidal Bakir  Add Concurrency Testing section to README (#1944)
  4e23d036  2023-02-21  Nate Bosch  Mention .having and .has in migration guide (#1948)
  438c2274  2023-02-21  Nate Bosch  Annotate `has` with `@useResult` (#1947)
  3ddecafd  2023-02-21  Nate Bosch  Add async examples to README (#1946)

tools (https://github.com/dart-lang/tools/compare/a53933c..c7518f7):
  c7518f7  2023-02-22  Elias Yishak  Update to regex to look for underscore delimited labels (#12)

webdev (https://github.com/dart-lang/webdev/compare/ae7eb80..1e7f9b7):
  1e7f9b7  2023-02-22  Anna Gringauze  Create copying sdk configuration provider (#1984)
  26910ba  2023-02-22  Anna Gringauze  Pass SdkLayout to the frontend server (#1986)
  784e28b  2023-02-22  Anna Gringauze  Remove unnecessary awaits (#1982)
  3cbaf37  2023-02-22  Elliott Brooks (she/her)  [MV3 Debug Extension] Support Bolt workflow (#1983)
  0f893e6  2023-02-22  Anna Gringauze  Move project definitions into a separate class (#1975)
  a942b5f  2023-02-22  Anna Gringauze  Add unnecessary_lambdas lint (#1978)
  3774cf8  2023-02-21  Anna Gringauze  Add 'avoid_void_async' lint (#1977)
  705e0ac  2023-02-21  Elliott Brooks (she/her)  [MV3 Debug Extension] Show a warning if multiple Dart apps are in a single page (#1976)

Change-Id: Iea264a18a154e71cd0990e1363951648bec5ceba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284940
Reviewed-by: Konstantin Shcheglov <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants