The implementation of patching in analyzer checks that signatures are identical.
This is stricter than it needs to be, but the required fixes in dart:core are
pretty simple.
BUG=
R=hausner@google.com
Review-Url: https://codereview.chromium.org/2655223005 .
The CL adds metadata support for Fields/Classes/Functions/Constructors. There
are other places where annotations can be put in the Dart language but the
Kernel IR currently does not store it in the AST.
Whenever a element (e.g. a function) gets annotated, the VM will make a [Field] for this
element whos value is an array of evaluated constant metadata annotations.
This CL attaches to these [Fields] a `kernel_function` which is then used to do the constant
evaluation.
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2632253002 .
- Don't mark core_isolate_snapshot_buffer as a const pointer.
- Update app snapshots without code to not rewrite the VM isolate snapshot, as already done by app snapshots with code.
Fixes#28368R=asiva@google.com
Review-Url: https://codereview.chromium.org/2637193002 .
This was a pull request: 8a8033a417
MirrorsUsed doesn't transitively include reflective information. However, it must still be able to create TypeMirrors for types that are used as return- or parameter types.
Initially, the patch checked that TypeMirrors had the correct number of arguments for generic types. This is now disabled.
A better approach would be to know if a class has full reflective information, or not. But this would require much bigger changes to the system.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2615943004 .
* Basic implementation of reflecting generic types using dynamic list of type arguments
* Removed redundant expectation in test
* Added basic support for dynamic type arguments in reflectType of js_mirrors
* Fixes according to code review comments: major cleanup, added more test cases and updated docs
* Updated JS mirrors reflectType() to match behavior of VM implementation
* Terminate exception messages with a dot; Improved error handling for empty argument list and type checks;
* Use NumTypeParameters when checking provided argument list size
* Check if type arguments are malbounded; added test cases for typedefs and mixins
* Uncommented a test case
* Updated lib.status to mark some tests as failing in dart2js due to limitations in JS mirrors
* Fixed mixin test mock definition; updated configuration for tests requiring checked mode
* Handle nested generic types in type argument parsing (JS)
The analyzer has a stricter patch parser than the VM. Patch files
cannot change signatures of patched members. Specifically, they cannot
change:
- the return type
- a parameter's name
- a parameter to an initializing formal
- an optional parameter's default value
BUG=
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2612043002 .
Before, the VM's dart:typed_data was a complete replacement of the SDK's
dart:typed_data implementation instead of a patch. This is unlike all
the other SDK libraries. This difference requires special-casing for
dart:typed_data in tools that handle the SDK libraries (e.g., the
Analyzer's patching support, the GN build).
This change makes dart:typed_data back into a patch to the SDK's
implementation. It reintroduces a distinction between abstract
interface and concrete implementation classes, so there are more
classes.
BUG=
R=fschneider@google.com, vegorov@google.com
Committed: https://github.com/dart-lang/sdk/commit/a9b906d319c32525a0600c75c008c92753591d86
Review-Url: https://codereview.chromium.org/2571563005 .
Before, the VM's dart:typed_data was a complete replacement of the SDK's
dart:typed_data implementation instead of a patch. This is unlike all
the other SDK libraries. This difference requires special-casing for
dart:typed_data in tools that handle the SDK libraries (e.g., the
Analyzer's patching support, the GN build).
This change makes dart:typed_data back into a patch to the SDK's
implementation. It reintroduces a distinction between abstract
interface and concrete implementation classes, so there are more
classes.
BUG=
R=fschneider@google.com
Review-Url: https://codereview.chromium.org/2571563005 .
Modify the following VM dart: library patches: collection, convert,
developer, _internal, isolate, math, mirrors, profiler, vmservice_io,
_vmservice, _builtin, nativewrappers, and io.
The modifications are mostly because:
- Patches should not be able to introduce new public members to a
library's API. In cases where the VM's patches introduce public
members, the patches are rewritten to introduce private members
instead.
- Patches should not be able to replace arbitrary members, only
ones declared external. In cases where the VM's patches replace
arbitrary members, those members are declared external in the
SDK sources and dart2js's patch files are rewritten to use the
original SDK implementation.
BUG=
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2564383002 .
Clean up the VM's dart:core and dart:async library patches so that
they are clean according to the patching rules implemented in the
analyzer. Specifically:
- If a member is patched in a patch file, it must be declared external
in the SDK.
- If a member is introduced in a patch file, it must be private.
- A non-private superclass member cannot be overridden in a patch
file.
BUG=
R=lrn@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2563633002 .
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math
The HTML related libraries are not changed. The templates used to build them
must be changed as well.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2529393002 .
This should help least-upper-bound computations to not think of EfficientLength
as completely separate from Iterable even though they are always used together.
It doesn't solve all problems with the least-upper-bound computation,
but at least some of the more often occuring ones.
R=floitsch@google.com
Review URL: https://codereview.chromium.org/2467113003 .