Commit Graph

741 Commits

Author SHA1 Message Date
Jenny Messerly be815e1a86 [dartdevc] fix #35013, move DDC off Analyzer task model
The new file pkg/dev_compiler/lib/src/analyzer/driver.dart handles
building the linked summary for a build unit, and then is capable of
doing analysis using LibraryAnalyzer.

The algorithm is very similar to analyzer_cli's build mode. The
biggest difference is that `dartdevc` has existing support for
discovering source files from the explicit source list (rather than
requiring every source to be listed on the command line). We don't want
to break that support, so there's a bit of logic to follow imports,
exports, and parts.

After the linked summary is produced, DDC gets the analysis results
(errors and resolved AST) for each library, and compiles it into a JS
module.

Change-Id: I7bf1ce1eca73fd036002e498de5924c488b534dc
Reviewed-on: https://dart-review.googlesource.com/c/82469
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-11-06 00:52:24 +00:00
Kevin Moore 475eaee3c2 Cleanup some dynamic/Object promotion confusion from 5226b5c307
And make tweaks to Uri and StreamController equality

Change-Id: I63f85f67209442684e50b7c2e0011531893f294e
Reviewed-on: https://dart-review.googlesource.com/c/82781
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-11-03 14:05:15 +00:00
Lasse R.H. Nielsen 5226b5c307 Remove some unnecessary dynamic invocations in the platform libraries.
Change-Id: Ia72033e37c4d8292eabd95aeff97e4cb29e81823
Reviewed-on: https://dart-review.googlesource.com/c/82204
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-02 11:32:03 +00:00
Lasse Reichstein Holst Nielsen 26121608a1 Make DateTime not assume arguments are instances of the same class.
The current DateTime class takes DateTime objects as arguments,
and then tries to access private members.
That does not work if someone else implements the DateTime interface.

Fixes #34962

BUG= http://dartbug.com/34962

Change-Id: I7191fe42f5b6efc1c7da5ed8e22b892b18f872f7
Reviewed-on: https://dart-review.googlesource.com/c/81828
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-10-31 07:29:48 +00:00
Bob Nystrom b41d26546c Remove Future from the cast failure whitelist.
Change-Id: Ida819d72ac1a4176edbdbb44ab6e00cecd0eb4af
Reviewed-on: https://dart-review.googlesource.com/c/81522
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-10-26 00:53:01 +00:00
Jenny Messerly c0c3fc4c5f [dartdevc] fix #34596, hot restart can now clear field & cache state
This adds a method to the internal SDK runtime library that can be
called to clear state when a hot restart is desired.

This also refactors some of the logic around ignoring type errors,
as we need to ensure we can clear those caches. Also I noticed a bug
where the result of isSubtypeOf was assumed to be non-null, but this
was not the case. The new structure should make this more clear.

(Note: I think we may be able to remove a lot of the code for ignoring
type errors soon.)

Change-Id: Icf5072ffe21aefd85e9816ffc2fc29f679839bc4
Reviewed-on: https://dart-review.googlesource.com/c/78324
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-10-18 19:52:32 +00:00
Dan Field 6e23c3b3cb Support SO_REUSEPORT and IP_MULTICAST_TTL for datagram sockets.
mDNS queries (and many other local queries) should be allowed to set
their TTL to 255.  This patch enables that on all platforms.

On macOS in particular, a system service reserves the mDNS port. The
socket option SO_REUSEPORT is required in addition to SO_REUSEADDR to
successfully bind there; the flag is also supported on Linux, so this
patch allows it to be used there as well (but prints an error message if
it's used on any other platform).

I could use some guidance as to tests for this - is it support availble
for running tests only on specific platforms?

Bug: https://github.com/dart-lang/sdk/issues/34799 and
Change-Id: I29b620d8ec04343f356a8171bae3d385ddfa9564
https://github.com/dart-lang/sdk/issues/34782
Reviewed-on: https://dart-review.googlesource.com/c/80082
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-10-17 01:48:52 +00:00
Peter von der Ahé a2aa6c8414 Consolidate DDC dependencies on front_end
We're consolidating all dependencies on package:front_end in one file per tool.

The idea is, if you want to depend on something in the package:front_end, you
modify pkg/front_end/lib/src/api_unstable/ddc.dart and consult with the
front-end team.

These consolidated files will help us when designing a public API in the
future.

Change-Id: I505b8f986e8c2b1d93e158171c1ecc0c4e12b9a6
Reviewed-on: https://dart-review.googlesource.com/c/78220
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-16 08:02:49 +00:00
G?nter Z?chbauer 2da0b9f4f1 fix some typos
Closes #34738
https://github.com/dart-lang/sdk/pull/34738

GitOrigin-RevId: d211bbacfe65355cf7304c990ffb6c79d7a229cf
Change-Id: If690e6d378e543b300e1f6a353ceae73e39c29db
Reviewed-on: https://dart-review.googlesource.com/c/78900
Reviewed-by: Alexander Thomas <athom@google.com>
2018-10-10 19:15:30 +00:00
Jenny Messerly f320477ff9 [dartdevc] add module-name option to kernel backend
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>
2018-10-10 18:09:03 +00:00
Ivan Naydonov ed6c557d1a Add cli parameters to kernel_sdk.dart to get all paths explicitly
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>
2018-10-09 22:15:06 +00:00
Peter von der Ahé 8ef3258e59 Remove _ConstantExpressionError
Change-Id: I0f7c590e826d9516d7b916cb6e39fd67eab97997
Reviewed-on: https://dart-review.googlesource.com/76662
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-09-28 08:41:53 +00:00
Jenny Messerly 1c8d65c49b fix #32785, implement typedef equality in dartdevc
This change expands typedefs into their underlying function type in the
compiler. Typedefs no longer exist at runtime in DDC, so they now have
similar equality and identity behavior as other function types.

The compiler used to preserve typedefs so they could have a better
toString. But over time that support has been almost entirely lost;
the caching for function/interface types eliminates typedefs, and
DDC+Kernel does not appear to get any TypedefTypes from the common
front end. So in practice typedef types were almost never present at
runtime. Because of this, we can remove the remaining support with very
little user visible effect. This also brings DDC's canonicalization
roughly in line with dart2js for compile-time typedefs, so frameworks
like Angular will be able to continue their use of `identical` for fast
type comparisons.

This CL also fixes DDC's type caching for generic function types
(typeHashCode was incorrect for them), and has some refactoring to
improve names/comments and make the SDK runtime code more clear.

Change-Id: I4e34c0c8f737a8535ba474a4683967ff41bcd3c8
Reviewed-on: https://dart-review.googlesource.com/74664
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
2018-09-26 02:01:45 +00:00
Jenny Messerly 3b511b9439 [dartdevc] improve compile time of kernel backend
- avoids creating a second analyzer summary resynthesizer
- avoids creating a new class hierarchy

Change-Id: Idd9e2952f1ab46b2a5d58bbc40fa2be5c1604d5e
Reviewed-on: https://dart-review.googlesource.com/76062
Reviewed-by: Alan Knight <alanknight@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-26 01:02:05 +00:00
Vijay Menon 70cc34df21 Custom format errors and exceptions to show traces
Fixes #34529

Change-Id: If5142a9c11808af50d1b7a04346e53e980cce3e6
Reviewed-on: https://dart-review.googlesource.com/76101
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-09-24 17:41:33 +00:00
Jenny Messerly 0496569f09 implement super mixins in dartdevc and fix a few issues in Analyzer
Fixes #34167. This implements the Dart 2 mixin proposal
(https://goo.gl/KEKQyv) for DDC. When the mixin is applied, a class
is created for the application that extends the correct superclass
and has all of the instance members, so `super` works correctly.

This also fixes a few minor issues in Analyzer's (mostly complete)
implementation:
- InterfaceType.isObject now returns false for Dart 2 mixins.
- Least upper bound calculation recognizes mixins are not Object.
- Interface of the mixin now implements its superclass constraints.
- Mixin superclass constraints are checked against the superclass and
  all previously applied mixins (if any); this keeps it working with
  the subtype fix above, and also prevents a not-yet-applied mixin
  from satisfying the constraint

The language_2/mixin_declaration tests were updated with a few minor
fixes now that we can run Analyzer/dartdevc to test them.

This change implements super mixins for DDC's Kernel backend (DDK)
too. This will be enabled once Kernel adds a flag to recognize which
Class nodes are mixins (vs normal classes).


Change-Id: Ib3c4fcb12de9988345e52d92931196828d8227c3
Reviewed-on: https://dart-review.googlesource.com/74965
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-09-18 03:21:48 +00:00
Lasse R.H. Nielsen cc08d0e1da Add operators &, | and ^ to bool.
Change-Id: Idd6472f239445914c1ff1ab68fc7b38fa6b320ae
Reviewed-on: https://dart-review.googlesource.com/25240
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-09-17 12:33:12 +00:00
Jenny Messerly 24493c2f54 Add support for dartdevk to read Analyzer summaries into Kernel format
This allows dartdevk to be used in the context of an existing build
system based on Analyzer summary files. This will ease migration of
existing dartdevc users over to dartdevk.

Change-Id: I8413f906e384f3f33c98e450adc0860f6fa7bc53
Reviewed-on: https://dart-review.googlesource.com/65641
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-10 22:51:04 +00:00
Jenny Messerly be5cd6307f fix #34296, generic function instantiation should be checked eagerly
Change-Id: I8c6e0980c23d8ca2cb22db9411028b59be5eb8db
Reviewed-on: https://dart-review.googlesource.com/72545
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-09-07 21:34:36 +00:00
Jenny Messerly 14d3249567 fix dartdevc to be robust if JS interop classes are not found
If a JS class is not found (because it's not loaded yet), dartdevc
should handle this gracefully. However the code assumed that the class
would not be nested in a module that itself has not been loaded. That's
fixed in this change.

Change-Id: I2de8f4b85e8063dea31ea257aca9721702c6ea7a
Reviewed-on: https://dart-review.googlesource.com/72065
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-08-30 00:38:08 +00:00
Bob Nystrom da2ed2fd59 Don't ignore runtime cast failures on Map<K,V>.
Change-Id: I18a607e37510b78c27a62381864b98f21a0d4192
Reviewed-on: https://dart-review.googlesource.com/67503
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2018-07-30 23:31:05 +00:00
Jenny Messerly 7651177cf1 fix #33684, "not a function" JS TypeError usually means nSM
Improves the error message when calling a null function, by suggesting
to the user that null may be the problem. Also prefixes the errors with
'NoSuchMethodError' to match Dart user expectations (the Dart type that
users can catch is indeed NoSuchMethodError).

Change-Id: Ia9bca5bc2a3e33e83f0c3728b48f7b17f98dcc6a
Reviewed-on: https://dart-review.googlesource.com/66228
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-27 00:13:00 +00:00
Sigmund Cherem d5b5736a47 Merge DDC's libraries specification into the sdk/lib/libraries.json file
Change-Id: I3f8076a3726aec0636e63173df8ec2a2c75d225e
Reviewed-on: https://dart-review.googlesource.com/66740
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-07-26 22:31:51 +00:00
Jenny Messerly 1a122e3ac0 Deprecate module-root option in dartdevc, part of #32272
Adds an option for specifying the output JS module name if that is
needed (only applies for some module formats).

Also removes repl-compile (it's set via API, not the command line).

Refactors dartdevk options to match dartdevc so we can migrate more
easily. Moves shared code into a shared location and removes copied
code.

Change-Id: I966343ecbbc962f5d0f14ea7e65d78660159f420
Reviewed-on: https://dart-review.googlesource.com/64823
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-26 02:43:48 +00:00
Jenny Messerly 5fa401cab0 fix dartdevc dart:_runtime to use old-style part-of declarations
There appears to be some inconsistency in how "dart:" part-of URIs are
interpreted by different tools, so this goes back to the old style.

Change-Id: I02f9ce568c0b9859f2fa6239131b0232aa1f8ae4
Reviewed-on: https://dart-review.googlesource.com/66281
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-07-25 02:29:31 +00:00
Jenny Messerly 128ecff0c5 fix #33872, support typeArguments passed to reflectType
Change-Id: I84cfbeec89fa9bf3fa50b7df0ccb6861d364b802
Reviewed-on: https://dart-review.googlesource.com/65201
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-07-19 00:19:54 +00:00
Jenny Messerly 2420134b23 Remove obsolete tools and tests from package:dev_compiler
Change-Id: I28fcd5832d89a0531961daac8f94a97a8b5ec68c
Reviewed-on: https://dart-review.googlesource.com/64824
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-07-16 19:28:01 +00:00
Alan Knight feaf79e5ac Colors that work a little better in dark mode
Change-Id: I7cacbce8f4c8ea365a2f4ef3b9e7af2de1c06350
Reviewed-on: https://dart-review.googlesource.com/61840
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2018-07-14 00:12:29 +00:00
Devon Carew 6cc709e192 Avoid using deprecated apis and constants.
Change-Id: I471335e882817711c5d22ccb956dca5e33834679
Reviewed-on: https://dart-review.googlesource.com/64081
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-07-10 22:35:58 +00:00
Lasse Reichstein Holst Nielsen e26d3d5f9f Reenable the Iterable.whereType method.
Fixes #32463.

Bug: http://dartbug.com/32463
Change-Id: Ie58ff1acbc0a834956741c7ec0ab8d890793baf9
Reviewed-on: https://dart-review.googlesource.com/63940
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-07-10 18:05:15 +00:00
Zach Anderson 0ccdc3ec38 Reland: [dart:io] Adds Socket.startConnect
This is a reland of https://dart-review.googlesource.com/c/sdk/+/62484
with the following changes:
- _NativeSocket.connect now drops references to pending sockets on
  an error or successful connection.
- eventhandlers are updated to ignore unset Dart ports on a close
  command.
- Test updated to account for new SocketException.

This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484

This CL adds a startConnect method to Socket types that returns
a ConnectionTask object that can be cancelled. Cancelling
a ConnectionTask closes any sockets that were opened for the
connection attempt that are not yet connected to the host.

This allows a closing HttpClient to close sockets for pending
requests whose sockets weren't fully connected yet.

related https://github.com/flutter/flutter/issues/18617

Change-Id: I47fe3564e41197d622079aad4bb644bbdfe0bfe8
Reviewed-on: https://dart-review.googlesource.com/63040
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-07-03 14:47:41 +00:00
Jenny Messerly c8f8190444 fix #33330, sync async functions should complete their future async
This was difficult to observe in practice, as it required a combination
of two unlikely things:

- an `async` function with no awaits
- a custom Zone with side-effecting scheduleMicrotask callback

The new implementation matches dart2js and the Dart VM's behavior.

Change-Id: I4ff275f37aa93d23643481f00c33aeacb7138b01
Reviewed-on: https://dart-review.googlesource.com/58980
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-29 02:06:51 +00:00
Zach Anderson 4e04ad50b7 Revert "[dart:io] Adds Socket.startConnect"
This reverts commit eb3becea2c.

Reason for revert: test failures on the bots.

Original change's description:
> [dart:io] Adds Socket.startConnect
> 
> This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484
> 
> This CL adds a startConnect method to Socket types that returns
> a ConnectionTask object that can be cancelled. Cancelling
> a ConnectionTask closes any sockets that were opened for the
> connection attempt that are not yet connected to the host.
> 
> This allows a closing HttpClient to close sockets for pending
> requests whose sockets weren't fully connected yet.
> 
> related https://github.com/flutter/flutter/issues/18617
> 
> Change-Id: I59c761b06e070d555fc514614079930b69c129dd
> Reviewed-on: https://dart-review.googlesource.com/62780
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com

Change-Id: I890d0de7fcde65fec55bfa9bad077c1a3dd13a74
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/62980
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-28 22:42:38 +00:00
Zach Anderson eb3becea2c [dart:io] Adds Socket.startConnect
This is the second part of https://dart-review.googlesource.com/c/sdk/+/62484

This CL adds a startConnect method to Socket types that returns
a ConnectionTask object that can be cancelled. Cancelling
a ConnectionTask closes any sockets that were opened for the
connection attempt that are not yet connected to the host.

This allows a closing HttpClient to close sockets for pending
requests whose sockets weren't fully connected yet.

related https://github.com/flutter/flutter/issues/18617

Change-Id: I59c761b06e070d555fc514614079930b69c129dd
Reviewed-on: https://dart-review.googlesource.com/62780
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-28 21:58:08 +00:00
Vijay Menon c2a22c6462 Updates to ddc/ddb tool
These weren't working for me.  Updated to use local sdk artifacts in debug mode.

Change-Id: I4e5d2d66d9237fde5d77f9683ed7d96e1dc0141d
Reviewed-on: https://dart-review.googlesource.com/61580
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-06-21 20:06:23 +00:00
Jenny Messerly d2a37231b3 optimize await in async* methods in dartdevc
Refactors async* implementation class to dart:async and ports it back to
Dart. Improves `await` to avoid zone registration at each await.

Change-Id: I15cac2a40bd56269c8ade1dc0810792c23459ef5
Reviewed-on: https://dart-review.googlesource.com/59260
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-15 01:54:03 +00:00
Jenny Messerly 1ef4399df0 Run dartfmt --fix for dart2 on pkg/dev_compiler
This uses optional new/const and `=` in named argument defaults.

All changes are automated, except for:

- utils/dartdevc/BUILD.gn: run DDC build scripts with --preview-dart-2
- pkg/dev_compiler/tool/patch_sdk.dart: add a TODO that Analyzer doesn't
  supporting implicit const in libraries.dart
- pkg/dev_compiler/tool/input_sdk/libraries.dart: was not formatted due
  to the aforementioned Analyzer bug
- tools/bots/test_matrix.json: run DDC sourcemap suite in Dart 2 mode
- pkg/pkg.status: skip pkg/dev_compiler if running in Dart 1 mode

Change-Id: I9b80ccba0c2cc7b66efc662a0b16562e3660aee3
Reviewed-on: https://dart-review.googlesource.com/60402
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-06-15 00:28:13 +00:00
Régis Crelier 87a46b8bee [VM Bigint] Fix _convert() of classic reduction for negative Bigint (fixes #33405).
Add regression test in existing bigint test.


Change-Id: I3dd0cc24ef19531dd16c89b4565f687a7b2b46bd
Reviewed-on: https://dart-review.googlesource.com/59820
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2018-06-12 15:12:00 +00:00
Lasse R.H. Nielsen 0b91676362 Remove the retype method.
See #33075.

Bug: http://dartbug.com/33075
Change-Id: I1ee2f587afbc672dd08ac61ac003bbdc85bb95e2
Reviewed-on: https://dart-review.googlesource.com/59091
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-12 14:36:09 +00:00
Jenny Messerly 976aa4074b Run dartdevk against its own compiled SDK and packages
Currently we test dartdevk against SDK/packages that were compiled with
dartdevc (DDC+Analyzer). This CL migrates to having those files compiled
with DDC+Kernel. dartdevc testing is unchanged.

Most of the fixes are around things like special optimized annotations
used in our SDK code, that were not understood by DDK. Also some inline
JS type annoations were not correct.

Change-Id: Iccf4427e4b9beffd6d97a4be654253d91f6cb89e
Reviewed-on: https://dart-review.googlesource.com/57800
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-08 19:18:34 +00:00
Jenny Messerly 8cd33751c6 optimize string concat in dartdevc
String concat now uses + rather than tagged template strings.
Also refactors the JSTypeRep code into a shared location, and fixes a
bug in null inference for op assign expressions in Analyzer backend.

Change-Id: I74fb6950c1d739efb977a03bd639a07afe453eb6
Reviewed-on: https://dart-review.googlesource.com/57522
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-07 01:28:02 +00:00
Jenny Messerly f059df7cc5 unfork DDC package:async_helper
This code was from the old travis/karma test runner setup, it is no
longer used. Also deletes the old browser test runner files.

Change-Id: I7eab3ebdc709cfc9c48d6f230c73035bc512cea9
Reviewed-on: https://dart-review.googlesource.com/57780
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-06 21:58:01 +00:00
Jenny Messerly a1f6aa8a3b improve speed of dartdevk SDK and ddc test package summary build
Renames the target to dartdevk_sdk (to match dartdevc_sdk), and switches
dartdevk_sdk and dartdevc_test_pkg to use prebuilt_dart_action.

Change-Id: Ib31c85c46743a005bb95cf888055a4d093ffe07f
Reviewed-on: https://dart-review.googlesource.com/57481
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-05-30 21:14:01 +00:00
Vijay Menon 30ad3f66ce Set DDK to run on Dart-2 VM
Change-Id: I0c0558996c5d6d6c739ded5e5c8b2554a4cd7b04
Reviewed-on: https://dart-review.googlesource.com/53320
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-05-24 21:51:25 +00:00
Sigmund Cherem 9b44fc39c8 Deprecate chaseDependencies option.
The option is not used by any client at this time and removing it simplifies the
next stack of changes I'll be making on how we compose file systems.

I also don't believe we will necessarily add this back as an option, but instead
it might be that clients requriing hermeticity will provide a custom file system
that helps with that.

Change-Id: I401efb042920d234382b6c041b13d40ffae5c908
Reviewed-on: https://dart-review.googlesource.com/56462
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-24 04:57:01 +00:00
Ben Konyi 3ab7cf0590 Revert "[dart:io] Revert recent non-utf8 path handling"
This reverts commit 42bcdcd332.

Change-Id: I11fb7db2aac3b7dc15cb35a22fea38b31069cbc0
Reviewed-on: https://dart-review.googlesource.com/55502
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-05-23 21:01:44 +00:00
Vijay Menon c771e4d132 DDC: disallow ignore option on Stream cast failures
See #27223

Change-Id: Ia23edc3700a8e0bb3d982be9b0bb36ad4522091d
Reviewed-on: https://dart-review.googlesource.com/56033
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-05-22 12:15:32 +00:00
Vijay Menon bea580c3a4 Disallow ignore on any explicit cast failures
See #27223

Change-Id: I9689ce9a72597b3e5c945f9787f2de6c5e8c2074
Reviewed-on: https://dart-review.googlesource.com/54701
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-05-21 22:01:39 +00:00
Jenny Messerly 21fbf7d767 fix #33103, switch dartdevk to use Kernel nSM stubs
Change-Id: I383b36809b1e8b43f9f7a36ca84d8db5da7cef67
Reviewed-on: https://dart-review.googlesource.com/55266
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-05-18 23:43:58 +00:00
Vijay Menon 9f6e8a3a96 Move DDC to Dart 2 snapshot
This is not yet working.

Change-Id: I86990eb7a8758d9bccee45997f30286d72a8925f
Reviewed-on: https://dart-review.googlesource.com/54532
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-18 19:13:08 +00:00