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>
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 .
A few more passes, but perhaps one regression:
Chrome 59.0.3071 (Mac OS X 10.12.5) corelib/date_time10_test FAILED
Error: Expect.equals(at index 1: Expected <0100-01-01 00:00:00.000Z...>, Found: <0099-01-01 00:00:00.000Z...>) fails.
at finish (test/browser/language_tests.js:807:59)
TBR=rnystrom@google.com,jmesserly@google.com
Review-Url: https://codereview.chromium.org/2983403003 .
commit 4ed5f6f9d34510c3f0d6a3e5db9f8bac3290e464
Merge: 075833b fb613c0
Author: Bob Nystrom <rnystrom@google.com>
Date: Fri Jul 21 16:08:11 2017 -0700
Merge branch 'master' into ddc-tests-2
commit 075833bbdb33d2642f4df1ca501805f0a97a96e7
Author: Bob Nystrom <rnystrom@google.com>
Date: Thu Jul 20 18:08:25 2017 -0700
Include migrated "_2" test directories in DDC's codegen_test.
This required a couple of other changes too:
- I renamed "not_yet_strong_tests.dart" to "compile_error_tests.dart"
because it includes some tests that have been made strong mode clean,
but still generate static errors due to bugs in analyzer or ddc.
- Reworded the test failure messages to take the above into account.
- I cleaned up the failure reporting code a bit. There was some
redundancy and unreachable code.
- Triaged the "_2" tests to mark the ones that are failing at compile
time or runtime appropriately. Good news! The big integers tests
compile now! Of course, they don't actually *run* correctly on the
web...
also fixes various bugs:
* setters now use the correct memberName symbol, fixes#30223
* object members work for callable classes, fixes#30213
* some test fixes to work in strong mode
* a few other small cleanups (e.g. obsolete `dart.list` is removed)
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2979353002 .
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 .
Side effect of this:
Fix bug where helpers in js_mirrors were specifying that name had to have type String when it could really also be a JS Symbol as well.
Fix bug where top level JS interop members using the external keyword but no @JS keyword were not implemented.
Update js_typed_interop_test.dart so it can work in DDC.
Add regression test for jsify call with native function type arguments.
BUG=
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2827333003 .