This name is not used by most module formats, but we do use it with the
legacy format.
Change-Id: I8d2f36b12a60b37d0460b57d5a360ba21b4e0476
Reviewed-on: https://dart-review.googlesource.com/c/78923
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
But still keep it using the old InheritanceManager.
R=brianwilkerson@google.com
Change-Id: I58f9187a97fc161215614ed55d6e08007f31595c
Reviewed-on: https://dart-review.googlesource.com/c/79080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
- Fixes to generation from spec
- Add basic code-gen with (very incomplete) tests
- Add some basic parsing of TypeScript interfaces in the LSP spec
- Add a group to the test
- Add code for extracting TypeScript codeblocks from Markdown
Change-Id: I733756d43744d89307b77527bd083cfacf670f56
Reviewed-on: https://dart-review.googlesource.com/c/79046
Commit-Queue: Danny Tuppeny <dantup@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Also remove any calls that aren't required. The function still works if you pass it a relative path (for convenience, if you have a variable) but it's not required for relative paths.
Change-Id: I567e098f5956a7c2b5fe2d6d7d7fb16a263a72cc
Reviewed-on: https://dart-review.googlesource.com/c/79025
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
The CL is reverted because it didn't account for the case when a check
of a user-specified type argument against the bound depends on another
type that is only known after type inference is done.
Change-Id: I1fd140af95ed37b9191a5b161a281d4639e3453f
Reviewed-on: https://dart-review.googlesource.com/c/79048
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Change-Id: I60f72904f4a9ae3427b2a2633a22f70a6b6f8ea9
Reviewed-on: https://dart-review.googlesource.com/c/79020
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This makes explicit downcasts more efficient by re-using the
optimizations we already have for implicit downcasts.
For implicit/explicit as checks we use the symbol to distinguish which
exception to throw if the check fails. So this does not actually
require unification of _CastError and _TypeError.
Issue https://github.com/dart-lang/sdk/issues/34582
Issue https://github.com/dart-lang/sdk/issues/30632
Issue https://github.com/dart-lang/sdk/issues/30571
Change-Id: I7b8818d2698e249c90a3e1b8790bad69ada649a9
Reviewed-on: https://dart-review.googlesource.com/c/78748
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The test isn't normally run, and all 12 testcases caused a crash.
Change-Id: Ie1576e32b70f01aa775c3305bff2bc992eebf86f
Reviewed-on: https://dart-review.googlesource.com/c/78940
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
--unsafe-package-serialization saves the frontend_server from having to
re-serialize everything all the time.
Before this CL, though, things could go wrong:
If you had a situation where you had previously compiled a file that
depend on a package A, and where (some of) package A depends on
package B this would happen:
- All of package A was serialized together.
- All of package B was serialized together.
When later, you compile something that depend less on package A - namely
on only on parts that does not depend on package B, but is included in
the previously serialized package A, the following would happen:
- The new (non-package) libraries would be serialized.
- Package A serialization would be reused.
This is basically fine: Running the app would be fine, everything it
actually depend on is there.
However, if the VM is forced to compile everything it now also compiles
stuff that was included - but really unused - from package A - namely
also the libraries that depend on package B --- which is not included.
This CL changes the last part by also including package B.
The result is that even more unused libraries are included, but that
the VM can survive a forceful compile.
Note that the --unsafe-package-serialization is only used for tests,
so the "including even more unused" part is probably not a big deal,
and all in all there's still a big speed advantage to doing this.
Change-Id: Iac06ba6f40c2caaacce641c5853e9491496dce53
Reviewed-on: https://dart-review.googlesource.com/c/78541
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This will allow us to create a synthetic
GenericFunctionTypeElementForLink representing the function type
defined by an old-style typedef. That in turn will be necessary to
fix some incompatibilities between the summary linker and element
model representations of typedefs.
Change-Id: Ia3622d58cac25976022bf79a0ac47b190f1f411c
Reviewed-on: https://dart-review.googlesource.com/c/78920
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
To allow ddc sdk kernel generation internally, add a way to provide
paths to dependent files explicitly, instead of assuming relative from
Platform.script.
Also remove .packages file parameter. We don't have this file internally
and sdk shouldn't depend on any of packages anyway, so it just work
without this option.
Change-Id: Iec892cbb640d35e64d107c6af36d214632815bae
Reviewed-on: https://dart-review.googlesource.com/c/77485
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Ivan Naydonov <inayd@google.com>
We now determine whether a type is simply bounded in the summary
linker, so that we can take advantage of the linker's circularity
detection logic.
Fixes#34635.
Fixes#34636.
Change-Id: I6c5040dbaeb79957d8a84e3f76e6a51834b57f05
Reviewed-on: https://dart-review.googlesource.com/c/78867
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This prevents tests marked as failing in InferredTypeTest from being
inherited by InferredTypeTest_Driver.
Change-Id: I4a364cd951dbf2bdf73e0bdda4b5f2630c91ea55
Reviewed-on: https://dart-review.googlesource.com/c/78863
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
- Wrap all paths with separators in convertPath() for Windows
- Ensure convertPathForImport does the right thing for relative paths
- Use the correct convertPath for imports/exports/parts
Change-Id: Ie95e41686479f175c9ba661180fdf5ad90b409e8
Reviewed-on: https://dart-review.googlesource.com/c/78740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
The implementation strategy is to replace int literals with double
literals during type inference, provided they occur in a double
context and can be represented exactly as a double. This requires us
to keep integer literals larger than the 64-bit range until after type
inference and to keep the source text of 64-bit integers until after
type inference for error reporting.
We postpone the check for web int literals as well because the
expression generator that was performing it isn't otherwise needed.
Fixes https://github.com/dart-lang/sdk/issues/34357.
Change-Id: Ia78c031565cad83961675fc4fb1cc871eaed01d3
Reviewed-on: https://dart-review.googlesource.com/c/78122
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
The tests are moved into a mixin,
StrongModeStaticTypeAnalyzer2TestCases, which both
StrongModeStaticTypeAnalyzer2Test and
StrongModeStaticTypeAnalyzer2Test_Driver apply separately. This
allows tests to be marked as failing in
StrongModeStaticTypeAnalyzer2Test without affecting
StrongModeStaticTypeAnalyzer2Test_Driver.
Change-Id: Iabd641d5ecf03fd0481baf053e689d68a0e0e7a1
Reviewed-on: https://dart-review.googlesource.com/c/78705
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
If all the components of a part-file are empty, the part file can be
removed.
On one app reduces number of parts from 710 to 599.
Related to https://github.com/dart-lang/sdk/issues/29686
Change-Id: I043d723645fd43c953536c82199ac41f43010c12
Reviewed-on: https://dart-review.googlesource.com/c/78190
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Previously, mixin deduplication transformation expected that isAnonymousMixin
classes could occur only in a superclass position. After this change,
deduplication also handles (canonicalizes) isAnonymousMixin classes in
implementedTypes, as CFE uses isAnonymousMixin classes in implementedTypes
to represent superclass constraints for mixin declarations.
No other uses of isAnonymousMixin classes supported.
Fixes https://github.com/dart-lang/sdk/issues/34704
Change-Id: I8558ce53c4fb1e5a06f839fa5ec8022958d9dafd
Reviewed-on: https://dart-review.googlesource.com/c/78383
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Change-Id: If16a8ea5da0f2cd805d3360e1d70cd19be8066a8
Reviewed-on: https://dart-review.googlesource.com/c/78621
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
- Move more that one assignment into var-list
- Move 'this' to a local variable
- Move repeated large 'fast' constants to local variable
Currently under flag --experiment-code-1
Change-Id: I091cab47f498b4ec3759b9ed358bcc0f2e73fdb1
Reviewed-on: https://dart-review.googlesource.com/c/77025
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
...when we are using Analysis Driver.
This method causes switching to the task-model based way of computing
constants. And so filling SdkAnalysisContext with data. And because
SDK instances are long-lived, we were keeping this data as well.
R=brianwilkerson@google.com
Change-Id: Ie6f4a4ce8a05238b9640aef961af394d64373573
Reviewed-on: https://dart-review.googlesource.com/c/78420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The field that we use to hold redirecting constructors is a Kernel
field, and not a ShadowField.
Fixes https://github.com/dart-lang/sdk/issues/34715
Change-Id: Iea2ce41f0229a7b9c2354bf3c6c3b586a3ffec33
Reviewed-on: https://dart-review.googlesource.com/c/78540
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Change-Id: Ia64c6c42a8737a23d7f708bd6905088f9444951e
Reviewed-on: https://dart-review.googlesource.com/c/78200
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>