Commit Graph

1564 Commits

Author SHA1 Message Date
Leaf Petersen 1b8f4ac1e7 Optimize DDC private runtime library files.
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 .
2017-08-23 10:28:45 -07:00
Leaf Petersen f744dea741 Fix DDC presubmit status.
Update some status entries and fix a few miscellaneous issues.

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3002133002 .
2017-08-22 16:29:18 -07:00
Jennifer Messerly ed5ced82b1 Re-land "fix #30423, covariant parameter tearoff type should be Object"
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 .
2017-08-16 23:23:36 -07:00
Brian Wilkerson 1b0b1a4913 Gardening: Revert "fix #30423, covariant parameter tearoff type should be Object" (TBR)
Review-Url: https://codereview.chromium.org/2995973002 .
2017-08-15 17:02:49 -07:00
Jennifer Messerly d09868c02f fix #30423, covariant parameter tearoff type should be Object
some tests needed to be updated to reflect the informal spec semantics.

R=leafp@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2995813002 .
2017-08-15 14:27:06 -07:00
Konstantin Shcheglov 5b29ae48ad Don't record dependencies in SummaryDataStore.
It was added for DDC, but DDC does not use it anymore. At the same time,
URIs operations are expensive, and this code is showing in Observatory.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2996783002 .
2017-08-09 17:45:13 -07:00
Jennifer Messerly 65e609548d fix #28988, remove throw on Dart1 incompatible is-checks for dartdevc
We've had this flag off in testing for quite a while. This should not affect user code because it's removing a throw.

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2996573002 .
2017-08-07 16:41:18 -07:00
Jennifer Messerly 89578574d0 mark call_test failing for DDC travis bot
TBR= @munificent
2017-08-04 18:27:33 -07:00
Jennifer Messerly 4cb87e6f1e Update language_tests.js
The test was fixed shortly after the fail marker was added
2017-08-04 17:48:31 -07:00
Jennifer Messerly fdf8c22e23 fix Travis bot runtime status
Review-Url: https://codereview.chromium.org/2995563002 .
2017-08-04 16:41:13 -07:00
Leaf Petersen d3344ed466 Fix incorrect nullability inference for ??
Fix bug where (a?.foo) was being incorrectly inferred to be
non-nullable if `foo` was non-nullable.

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2996523003 .
2017-08-04 15:31:01 -07:00
Jennifer Messerly dcc5f0a873 fix ddc travis bot
Review-Url: https://codereview.chromium.org/2998483002 .
2017-08-04 14:08:27 -07:00
Vijay Menon 4ead726a8c Check for cross-frame violation
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2991353003 .
2017-08-03 16:53:40 -07:00
Jennifer Messerly 62303b6711 enable batch mode for dartdevc tests, also fix status so ddc bots pass
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2987393002 .
2017-08-03 14:39:45 -07:00
Jennifer Messerly 676cf46c44 Fix DDC buildbot so it is green
This is an attempt to get DDC's bot (https://travis-ci.org/dart-lang/sdk) green and restore test coverage, without affecting the Analyzer --strong buildbot. DDC and Analyzer can generally use the same status entries, as they are running nearly identical strong mode analysis. This fixes DDC's test builder to understand status codes in the same way analyzer does, as that was causing mismatch in statuses.

This does not fix the problem that we're skipping tests instead of recording the status. So there is a bit of test coverage lost, but it restores most of DDC's coverage. We can tackle the skips either in a follow up, or as we migrate tests from *_strong to *_2.

This is a partial revert of  "Revert status file changes from 58a6227198d2aa927df19f1b4862f8d0017d6da4" in commit 7be946cf3d.

Review-Url: https://codereview.chromium.org/2990213002 .
2017-08-02 19:57:56 -07:00
Jennifer Messerly 58a6227198 Use status files for DDC's presubmit script/travis bot
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 .
2017-08-01 16:36:17 -07:00
Vijay Menon 427b2890ce Fix ddc status
TBR=rnystrom@google.com,jmesserly@google.com

Review-Url: https://codereview.chromium.org/2993533002 .
2017-08-01 10:36:29 -07:00
Jennifer Messerly bba4b68d51 fix unsound cast failures in tests
the "whitelist" option to ignore cast failures is no longer used by most tests (I'm investigating what to do about package:unittest)

R=rnystrom@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2989993002 .
2017-07-31 14:30:40 -07:00
Jennifer Messerly 925295d7af remove unittest as a test status, instead record this at test build time
this will help integrate with existing .status files

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2991073002 .
2017-07-31 14:25:11 -07:00
Jennifer Messerly d705cff08e fix #30290, assertion messages that contain yield
also fixes list_sort_test to work in strong mode.

R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2985333002 .
2017-07-31 14:20:21 -07:00
Zachary Anderson 633ed4cf83 [corelib] dart:developer timeline flow events
This change adds an API to dart:developer Timeline for
adding flow events to the timeline. For details see the
changes in:

sdk/lib/developer/timeline.dart

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2985253002 .
2017-07-31 07:46:52 -07:00
Jennifer Messerly 951e9a5f88 fix DDC travis bot
It appears to have been broken by the language_2 test migration.

Review-Url: https://codereview.chromium.org/2991063002 .
2017-07-28 17:04:32 -07:00
Leaf Petersen 61e071e3e7 Avoid string interpolation in templates.
Replace some constant string interpolation with literal strings.

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2971453002 .
2017-07-27 13:47:40 -07:00
Jennifer Messerly d207e8d5ca fix test status for DDC's travis bot
Review-Url: https://codereview.chromium.org/2991633004 .
2017-07-25 18:40:50 -07:00
Jennifer Messerly f0c8fe6763 remove redundant type check in DDC's SDK implementation
Review-Url: https://codereview.chromium.org/2985063002 .
2017-07-25 18:33:09 -07:00
Vijay Menon 598b98bd09 Fix DDC travis status
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 .
2017-07-25 08:36:20 -07:00
Jennifer Messerly ff8511c83e fix override checking of mixins
it was rejecting some patterns that are sound, because the mixin member is overridden and thus not exposed.

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2988673003 .
2017-07-24 16:27:08 -07:00
Zachary Anderson 9e7e66602f Compute the script Uri lazily
Previously, the string set up by the embedder was eagerly passed to
Uri.parse during Isolate startup. This is expensive both in time and
memory footprint. This CL causes Uri.parse() to be called only
when needed. This change will allow reducing the memory footprint
of Fuchsia's Dart content handler on hello world by ~1MB.

fixes #25603

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2988613002 .
2017-07-24 12:56:21 -07:00
Vijay Menon 19a19f4423 Fix getSetterType in presence of metadata
R=jmesserly@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2986673002 .
2017-07-23 19:56:06 -07:00
Bob Nystrom 39a56dd020 Triage a couple of DDC tests. (#30232) 2017-07-21 17:01:39 -07:00
Bob Nystrom f334284967 Squashed commit of the following:
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...
2017-07-21 16:12:23 -07:00
Jennifer Messerly 04f3c8835f implement Invocation.typeArguments in DDC
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 .
2017-07-21 15:51:16 -07:00
Jennifer Messerly 132067f685 ignore @proxy in strong mode
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2980383002 .
2017-07-19 18:17:01 -07:00
Vijay Menon 87ee6cc0d6 Polyfill only once
Avoid dcall on polyfill.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2983903002 .
2017-07-19 13:42:23 -07:00
Vijay Menon 99e672d1cb Registration-based approach to cross frame support.
This approach installs all Dart extension types onto a window whenever
that window is accessed.

See #28326

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2980853002 .
2017-07-19 12:53:43 -07:00
Vijay Menon 12e32e230d Add hook to register global object
DDC will use this in a later CL.

R=alanknight@google.com, sra@google.com

Stephen: I assume this will get compiled out be dart2js.
Review-Url: https://codereview.chromium.org/2983813002 .
2017-07-19 05:46:07 -07:00
Vijay Menon 7365a24d98 Fix DDC status
TBR=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2981213002 .
2017-07-18 13:59:57 -07:00
Vijay Menon ab39958ac5 Dummy DDC implementation of MirrorSystem
It's a bit absurd that a bunch of tests are passing with this.

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2978223002 .
2017-07-18 13:00:23 -07:00
Jennifer Messerly 34361bb02a fix #30138, reland with windows fix
Revert "Revert "fix #30138, synethic nodes causing crash generating source maps""

This reverts commit b7e3d9185d.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2977183002 .
2017-07-17 15:58:24 -07:00
Jennifer Messerly 87c0b757cb fix #27320, better DDC temp generation
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2980113002 .
2017-07-17 14:33:30 -07:00
Vijay Menon 8913dd97df Update ddc dart:html
This is just a straight copy of the dart2js version to pick up sra's range fix.

TBR=sra@google.com,alanknight@google.com

Review-Url: https://codereview.chromium.org/2983693002 .
2017-07-17 12:14:30 -07:00
Leaf Petersen 9f059e58b4 Move null check out of getExtensionType
BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2980133002 .
2017-07-14 17:02:09 -07:00
Jennifer Messerly b7e3d9185d Revert "fix #30138, synethic nodes causing crash generating source maps"
This reverts commit 52880e9c4c.

Review-Url: https://codereview.chromium.org/2977163002 .
2017-07-14 15:54:23 -07:00
Jennifer Messerly 52880e9c4c fix #30138, synethic nodes causing crash generating source maps
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2977943002 .
2017-07-14 12:46:22 -07:00
Jennifer Messerly cc167f5901 fix #30108, mock support for callable classes
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2975273002 .
2017-07-14 12:42:16 -07:00
Jennifer Messerly 418d11fbd6 fix #30094, assert should work with a function
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2971243003 .
2017-07-13 22:51:45 -07:00
Leaf Petersen 4f7fa8a930 Check for null when getting the extension type.
isJsInterop can call this with null.

BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2983523002 .
2017-07-13 16:48:25 -07:00
Leaf Petersen 4a87156b13 Move NullError into interceptors
Put the NullError class into interceptors so that it will be picked
up as a native type.

BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2976173002 .
2017-07-13 14:38:39 -07:00
Vijay Menon d952055a7e Support ClassMirror.newInstance on factory constructors
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2976133002 .
2017-07-13 13:07:37 -07:00
Natalie Weizenbaum 5a74d8ab09 Properly handle Windows file: URLs on Node.js (#30098)
This adds logic to the JS implementation of URI to determine whether
the code is running on Windows under Node.js.
2017-07-12 14:57:01 -07:00