We initially hard coded a few of these. That worked until native_typed_data and html were added. Those two libraries have a lot of native types.
This also fixes TypeRep to extend dart:core Object, and fixes the dart:_runtime so we can write Dart classes. Cleans up a few of the JS builtins as well.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1962823002 .
I started trying to get the convert tests all cleaned up and passing
but realized I was going down a rathole. So, for now, all of the slow
or failing ones are just skipped.
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/1965563003 .
Also, fix the language test for this to actually do something useful.
I accidentally removed the definition of testType() in the last patch,
so the test did nothing. :(
Fixes#547.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1945643005 .
- Instead of using the raw runtime type that DDC uses for its type
checks, use a WrappedType that correctly implements Type's interface.
- Compile class literals to wrap the type in a WrappedType.
- Make Object.runtimeType() do the same thing.
Fixes#488. Fixes#511.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1944483002 .
- JavaScript shifts can be used for operands in certain ranges.
- Coercion from signed-32 to unsigned-32 can be omitted if
- it is a no-op
- the context performs the coercion
- the context is insensitive to the most significant bit
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1920293005 .
Partially addresses #504. This is WIP, but wanted your thoughts.
Comment / questions:
- The current js_ast ImportDeclaration assumes a legal identifier I think.
E.g., this gets lowered:
import { src$interfaces } from "matcher"
- Should we thread package root through ModuleCompiler to let it packagify urls?
- How should we handle non-package urls? Pass in an explicit root dir
and go relative?
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1917863005 .
Highlights
* compile one module at a time
* use summaries to speed up compiles
* use command runner so we can add more commands later
* some long needed renames and file organization
* various other technical debt has been addressed
Lowlights
* lost node.js runner/tests (node output format still supported)
* possibly lost some closure support/workarounds (format still supported)
* needs more end-to-end tests of the new system
R=vsm@google.com
Review URL: https://codereview.chromium.org/1879373004 .
A couple notes:
- regress_18535_test started failing at runtime. It's using unimplemented mirrors code, so perhaps a static failure before.
- typed_data_sublist_type_dart started failing at runtime. It was inferring Is<EfficientLength> with the type omitted. :-(
- my local chrome is newer than the one on travis failing on generators. not seeing that error.
TBR=jmesserly@google.com
Review URL: https://codereview.chromium.org/1847163002 .
* factor the class heritage workaround so it's out of the way & easier to remove later.
* always emit type parameters in the AST, and pass the flag to the printer to skip printing them.
* cleanup an unnecessary sync* method for closure field decls.
* also, reformats. I think I forgot to do that in previous CL.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1767803002 .
fixes https://github.com/dart-lang/dev_compiler/issues/471
Changes here are:
* Analyzer now infers list/map literals
* Analyzer changed how isPotentiallyMutated* APIs work, so we need to track current function
* Another fix to arrow functions. We shouldn't skip generating covariant arg checks. If there were any, we use `=> { block }` form rather than `=> expr` form.
R=vsm@google.com
Review URL: https://codereview.chromium.org/1757343002 .