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>
This should improve performance of these members in most cases:
- toString
- operator ==
- hashCode
- runtimeType
- noSuchMethod
The helpers for checking `null` and then dispatching to the method are now very small again. Also, because we can lookup symbolized names always, we can start taking advantage of this in our Map/Set implementations (for a follow up CL).
This also improves correctness of these helpers given JavaScript objects; we were previously falling back to calling a Dart method name like `.hashCode`, which is incorrect (except for `toString` where fallback is probably the correct behavior).
Change-Id: I39cbc80ca3e93ca7672652610b02bce899894da1
Reviewed-on: https://dart-review.googlesource.com/3427
Commit-Queue: Jennifer Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Eliminate numerous type checks not needed in strong mode. Use
private nullability annotations instead of inline JS to mark known
non-null variables, and to make the compiler generate null checks
for null checked variables. Use nullability annotations and code refactoring to
remove redundant null checks and to move checks out of loops.
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2994203002 .
This is the original CL plus status file fixes.
Disables auto-generated function_type tests that are not working for the Dart 2 runtime behavior, and filed #30462 to track. Also removes the separate status that was skipping these tests in DDC when $checked was unset. $checked is not a thing for Dart 2, and DDC test status should never depend on it.
This reverts commit 1b0b1a4913.
R=leafp@google.com
Review-Url: https://codereview.chromium.org/3001053002 .
This only handles compile time errors & compiler crashes. It does not yet support status files at runtime, that is still hard coded in language_tests.js. Some preliminary support for runtime status is there, but it's not enabled yet.
This also updates *_strong.status to reflect current test behavior. It looks like those files have not been triaged in a while.
R=rnystrom@google.com
Review-Url: https://codereview.chromium.org/2987093002 .
this includes various cleanups found along the way:
* various issues with JS annotations, see #30043
* getGenericClass is now optimized when used in a JS builtin with a Type literal
* typed list literals should be slightly faster to create
* memoized getters used by dart:_runtime should be faster
* registerExtension should be a tad faster, and now understands JSArray
* dart.bind "safeName" hack gone in codegenerator
* JSArray<E>.runtimeType returns List<E>
* JSArray<E>.noSuchMethod works
* cleans up code that generates `setExtensionBaseClass` (used only by JSArray)
* _throwUnsafe helper for generating a `throw` in --unsafe compile mode
* fix tearoff of JS interop types (_emitSimpleIdentifier)
* fix TODO about splitting LazyJSType and AnonymousJSType
* fix is/as/cast methods on TypeRep and related classes
* fix codegenerator to not tearoff "hashCode" and "runtimeType" (they are not methods)
* fix NoSuchMethodError.toString() (update via dart2js sdk impl)
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2962263002 .
This reverts commit 3a23e604e2.
The problem was unrelated to the CL; it appears to be a dart:async break of package:async.
In the meantime we have turned on --unsafe-force-compile to DDC's shapshotting step
Review-Url: https://codereview.chromium.org/2869733006 .
fixes#27625, Object constraints were not tracked in inference
fixes#27933, pin return type from downwards inference
We now prefer to pick the bound (lower or upper) that had some information on, and it also improves inference error messages somewhat (still a ways to go).
The way this works is we now have a type representing an unknown type: ?. We use ? when performing downward inference steps, instead of `dynamic`. This allows more accurate tracking of type constraints.
For example: given:
var x = await Future.wait([a, b]);
Future.wait<T>'s argument type is Iterable<Future<T>>. Since we didn't know T, we previously pushed down Iterable<Future<dynamic>>. The dynamic caused loss of information. Now we push down Iterable<Future<?>>, allowing us to infer the right type there.
R=leafp@google.com, vsm@google.com
Review-Url: https://codereview.chromium.org/2456803004 .
In DDC, if the receiver is typed and the target method simply forwards to a JS call, invoke that call directly instead of via a symbol.
This is a step toward #28307.
Paul: can you look the the analyzer / summary code change?
dart:html uses "native". other libraries (e.g., typed_data) use "external" for more or less the same thing. The analyzer element model doesn't provide a way to test for "native" methods, but it does for "external". I map native to external here. Not sure if it's better to treat them as separate (I believe native predated external). Longer term, it may make sense to try to remove "native" in favor of "external".
R=brianwilkerson@google.com, jacobr@google.com, jmesserly@google.com, paulberry@google.com
Review-Url: https://codereview.chromium.org/2748713002 .
My initial goal was just to move some of the HTML tests off unittest,
but that ended up slurping in some other changes as well. I haven't
finished going through all of the tests, but this puts the
infrastructure in place and fixes a batch of them. I'll do more next.
Changes:
- Add a "minitest" package. This shims just enough of the unittest/test
API to make it easy to swap it out for unittest without having to
rework the entire test.
- Go through the HTML tests from A-J and change them to use minitest
when possible. The ones that aren't possible use asynchrony.
Minitest doesn't support async tests (yet, maybe).
- Triage those tests and enable ones that are passing. Mark them failing
if failing. Filed a couple of tracking bugs for the common issues,
but for other cases, I just left a comment.
- In the process of this, I went ahead and make some of the affected
tests strong mode clean if they weren't already and it was easy.
- Synchronize changes between dev_compiler's fork of expect and
pkg/expect. We'll want to unfork those at some point. D-:
This gets dev_compiler from 1985 tests to 2042.
R=jacobr@google.com, vsm@google.com
Review URL: https://codereview.chromium.org/2413073002 .