Comments (5)
Need this here as well! Could be very useful for example projects for packages to show an indicator as to whether it's running with WASM, to verify potential performance improvements.
from sdk.
As you link to #54785, this is something that can be useful for more than just Dart2Wasm.
I'd prefer a general solution to something that only works for one compiler.
(Preferably entries that distinguish, at least, whether running natively, in JS or in Wasm, and possibly also whether compiled in development mode or production mode, and whether asserts are enabled.)
That is, I'd want to also define dart.tool.vm
, dart.tool.dart2js
, dart.tool.dev_compiler
(or whatever names they want to be known under).
I believe dart.tool.dart2js
already exists. The rest should too.
(But I'm OK with just agreeing that they should all exist, and then landing this as the first step.)
from sdk.
I'd prefer a general solution to something that only works for one compiler.
I'm not claiming this fixes #54785 :) I just need the identification in dart2wasm and I think it would be nice to have it in a format that will eventually be consistent between all tools.
from sdk.
@lrhn is there a problem with adding dart.tool.dart2wasm
now, without waiting for #54785?
It looks like dart2js added it ~9 months ago:
sdk/pkg/compiler/lib/src/options.dart
Line 1089 in 1d0c90c
from sdk.
I have no problem with landing this as-is. (That's what I tried to say in the last line of my previous comment, maybe I should just be more direct. Ship it!)
I don't know whether I'm the one who should get to decide this. So far, nobody else does, so I'll take it!
I hope that this format is what we end up on, and if we don't, we'll have to take it from there. Since Dart2JS already used it, it'll only a bigger migration problem, not a more difficult one.
from sdk.
Related Issues (20)
- LateInitializationError when a late global variable is accessed in another isolate despite it has been initialized before spawning. HOT 3
- Feature Request: Ability to Specify File List in dart fix --apply HOT 1
- [warning] proposal: `do_not_check_equality_to_self` HOT 6
- [Feature request] `dart run --no-sandbox` option on MacOS HOT 1
- First analysis is much slower on Windows after a reboot (because of Windows Defender scanning files as they're read) HOT 5
- Pattern matching inside collection literal can cause crash in release builds HOT 2
- type 'InvalidType' is not a subtype of type 'InterfaceType' in type cast HOT 4
- dart compile exe --obfuscate not supported HOT 5
- [extension types/analyzer] `The receiver can't be null` false negative on `extension type` typed values? HOT 3
- Auto complete shows too many suggestions on types that have custom extension methods/properties HOT 3
- `Remove unnecessary import` assist should take empty lines into consideration HOT 1
- `convert to constant pattern` assist in the wrong place HOT 14
- Code-generators/macros should provide a way to "bundle" renaming HOT 1
- Auto Fix for Import Not Working in Dart 3.5.3 HOT 1
- Tree-shaking not producing the same result depending on whether Dart code is compiled as Javascript or Android binary HOT 10
- Failures on [cfe] Create PrefixBuilder through fragments
- Failures on riscv64 configurations HOT 1
- Dart Macro Augmentation Incorrectly Adds `abstract` to `sealed` Class , while using it with dart run HOT 1
- Incorrect record runtime type hash code in VM HOT 13
- test_runner doesn't report violations of same-origin policy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdk.