Stephen Adams
56424f08a8
[js_runtime] Test for JavaScriptFunction type tests.
...
- Add test for JavaScriptFunction type tests
- Make toString() for JavaScriptFunction more explicit.
Change-Id: I60042b909709c822c924336fd4973f35dc7f779a
Reviewed-on: https://dart-review.googlesource.com/58062
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-06-02 00:40:24 +00:00
Emily Fortuna
e7bad54986
Make dart2js only run with 64 bit ints, not the larger ints from the vm.
...
Change-Id: I03887a0af963f1a8f68acff0428635fc130687f5
Reviewed-on: https://dart-review.googlesource.com/57041
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-30 17:21:49 +00:00
Johnni Winther
9d9eff44c9
Support sharing function signatures in deferred parts for fast startup
...
Change-Id: I2ee08817241512269fe04d7fb0e3367df847d37a
Reviewed-on: https://dart-review.googlesource.com/56940
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-30 13:25:48 +00:00
Johnni Winther
6b7f3d5f54
Share non-generic signatures through init.types
...
Change-Id: Ie132bbe805780022c91e5578c8dc4636c3c4cc8b
Reviewed-on: https://dart-review.googlesource.com/56671
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-28 07:40:24 +00:00
Emily Fortuna
49d5ca3bb4
Switch to BigInt for ConstantValue.
...
Change-Id: I17eec094d794b1c4791d491ea523d284f9eae4ed
Reviewed-on: https://dart-review.googlesource.com/55500
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-22 01:04:41 +00:00
Stephen Adams
8cf81446a3
Add method stubs to support instantiation stubs
...
Change-Id: Id9cce10b6319d268eb4ec2745465df5f06d3b906
Reviewed-on: https://dart-review.googlesource.com/55081
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Stephen Adams <sra@google.com >
2018-05-15 20:32:46 +00:00
Sigmund Cherem
a06f7c9241
Remove dart:_isolate_helper.
...
The rest of the code was used in a single place, so I've moved the code to the
appropriate library.
Change-Id: Idd0416bf7365e3de05f20ab1184428ae7ae614b2
Reviewed-on: https://dart-review.googlesource.com/54745
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-05-15 00:21:28 +00:00
Sigmund Cherem
3c22fc9216
Allow null nonce
...
This should fix the bots for FF and safari. (Chrome returns '', but FF and
Safari return a null value.)
TBR=sra@google.com
Change-Id: I9a402d3c9f4fed09b9181a8ec29f68ff6770e509
Reviewed-on: https://dart-review.googlesource.com/54714
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-05-11 20:41:59 +00:00
Sigmund Cherem
c7683ad41b
Support strict CSP in dart2js.
...
dart2js will now set the CSP nonce on scripts that are inserted for deferred
loads. Note that this change only applies to the default hunk loader. Custom
hooks need to set the nonce value manually.
Fixes https://github.com/dart-lang/sdk/issues/33061
Change-Id: I04abc7904dff22dad586690d175b87c77c3f1fe2
Reviewed-on: https://dart-review.googlesource.com/54702
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-05-11 17:41:07 +00:00
Stephen Adams
ef6e19a83a
[dart2js] Implementation of extractTypeVariables
...
Change-Id: I80272dade861e30440f64fe36c1bf4bb5cd2eb8a
Reviewed-on: https://dart-review.googlesource.com/54625
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-11 01:37:45 +00:00
Sigmund Cherem
3ec1b929e3
Remove dependencies on isolates.
...
This starts removing support for isolates. I've kept around the
isolate library for now, but I stopped injecting the isolate logic
unless you directly access an isolate API.
Concrete changes:
* Timer no longer uses the event queue: this was only used in worker
isolates, soon to be removed.
* Checking for whether the code is run within a worker is not dependent
on initializing the isolates global state. This was important to allow
deferred-loading to work without the isolate logic.
* Workers no longer track pending async calls correctly. This may make it possible
to terminate worker isolates early, again this wont be relevant shortly.
Bug: https://github.com/dart-lang/sdk/issues/32684
Change-Id: I05025418e05c3641ba1a3bc34ea75ca558a28fbd
Reviewed-on: https://dart-review.googlesource.com/54160
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-05-09 16:36:26 +00:00
Johnni Winther
27ae11e4d8
Filter instantiation stubs
...
Closes #32992
Change-Id: Ib0521f24eb734b42a1a55663119204220f263265
Reviewed-on: https://dart-review.googlesource.com/53740
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-05-08 07:46:33 +00:00
Johnni Winther
235b81d045
Remove MockCompiler
...
Change-Id: I476cb39f8fed068d7c47a15486419783f599a285
Reviewed-on: https://dart-review.googlesource.com/53806
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-07 10:07:40 +00:00
Johnni Winther
d13bf49870
Check type-variable bounds on generic methods
...
Closes #32711
Change-Id: I86c123f5a8b9eda393b276248cdd27d1b109354b
Reviewed-on: https://dart-review.googlesource.com/53201
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-03 09:36:58 +00:00
Johnni Winther
2a8c3515b2
Avoid strong+checked mode: strong mode supersedes checked mode
...
Change-Id: Ic68f429ec06d583a9e60b6ace1ec88ee83a4be5f
Reviewed-on: https://dart-review.googlesource.com/53202
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-02 08:33:28 +00:00
Johnni Winther
8351dd4928
Support constant instantiation
...
Closes #32774
Change-Id: I88090246d3fb39e3d3a1f9c3fdcc3b6fd6e0fa4f
Reviewed-on: https://dart-review.googlesource.com/53022
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-01 12:59:18 +00:00
Johnni Winther
d85c175a22
Register deferredLoadlibrary as backend impact
...
Closes #32998
Change-Id: If2a0a948f1209652925be360f7f145ebfdb3d60d
Reviewed-on: https://dart-review.googlesource.com/53008
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-01 11:05:31 +00:00
Johnni Winther
54b8ebd992
Support js-interop classes that implement generic types in Dart 2
...
This adds a special RTI representation for a type argument of a
(supertype of a) js-interop class, which effectively is the Dart 1
`dynamic` type.
Closes #32969
Change-Id: Ifd92b3fc6779d96d354ad929bd7c07a349299ae6
Reviewed-on: https://dart-review.googlesource.com/53002
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-01 08:37:11 +00:00
Johnni Winther
20c7725954
Handle deferred constant instantiations
...
Closes #32997
Change-Id: I31661bb223ca9d9bdee2e7cabe4e62bf18e87509
Reviewed-on: https://dart-review.googlesource.com/53007
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-05-01 08:31:01 +00:00
Johnni Winther
93511d523c
Track RTI for noSuchMethod
...
Change-Id: I1fd66c48061556f8950bad471744eab4e2f40eb7
Reviewed-on: https://dart-review.googlesource.com/52560
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-04-26 08:07:02 +00:00
Sigmund Cherem
004ee9cd12
Fix how we use Comparable.compare, so we have a function with the appropriate type in JSArray.sort
...
This is the same fix that was done here: https://github.com/dart-lang/sdk/blob/master/sdk/lib/collection/list.dart#L349
Change-Id: I6013dc96c67b487b0e96118028ef920a84f371b5
Reviewed-on: https://dart-review.googlesource.com/52701
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-04-26 00:32:02 +00:00
Johnni Winther
9c9a3544ec
Skip abstract methods in super access.
...
Closes #32928
Change-Id: I2834a9e34e4b8f4241e01f776be0bb22e375b30a
Reviewed-on: https://dart-review.googlesource.com/52222
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-23 08:28:59 +00:00
Johnni Winther
f74ee52c70
Optimize signature need computation.
...
Change-Id: Ied6dfbfe71a9d323e189dbcacdb5ae2985c3fbb8
Reviewed-on: https://dart-review.googlesource.com/52221
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-23 08:00:02 +00:00
Johnni Winther
74a69a03c4
Add tests for method/local function signatures
...
Change-Id: I608303b91e0a4ed0d83130841719f0f5116102de
Reviewed-on: https://dart-review.googlesource.com/52105
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-20 20:26:07 +00:00
Johnni Winther
c5f69dff2d
Include call on Closure in inference
...
Closes #32835
Change-Id: Ief2096544e01f74e6cc52abd6131a24a10ffe75f
Reviewed-on: https://dart-review.googlesource.com/50680
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-13 08:46:26 +00:00
Johnni Winther
b7cc1e7ce7
Fix stack overflow in RTI computation
...
Closes #32853
Change-Id: Ic759780799830dde655fafc7839c7d5387eb75d6
Reviewed-on: https://dart-review.googlesource.com/50943
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-04-12 17:45:39 +00:00
Johnni Winther
b00ae2ec5d
Fix dynamic call arguments computation
...
Closes #32828
Change-Id: Ic6307746d4d3c48b312cab74b383705d5892b408
Reviewed-on: https://dart-review.googlesource.com/50480
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-11 07:54:01 +00:00
Alexander Thomas
3851591642
[infra] Keep comments intact when updating status files.
...
* Preserve empty lines in the file header.
* Add empty entry to the tool's newly created sections.
* Remove extra empty line at the end of the file.
Change-Id: I271583774d5f5497025a9d85bcadf8b0b9e39e81
Reviewed-on: https://dart-review.googlesource.com/37600
Commit-Queue: Alexander Thomas <athom@google.com >
Reviewed-by: William Hesse <whesse@google.com >
2018-04-10 19:03:21 +00:00
Johnni Winther
969c0de335
Avoid crash on EOF error in file with Windows line encoding
...
+ start using spans from CFE (now that they're available)
Change-Id: I4fe82070d32948a64fb0fab527bd4cc857eebeb4
Reviewed-on: https://dart-review.googlesource.com/49841
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-04-09 12:16:20 +00:00
Johnni Winther
3d8524be3f
Propagate freeVariablesForRti through nested closures
...
Closes #32770
Change-Id: Id7a24d5a7ea98c786a27f2e952f6b37e8607778e
Reviewed-on: https://dart-review.googlesource.com/49960
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-04-06 19:22:02 +00:00
Johnni Winther
f2d609f522
Register type variables of is/as expressions in closures
...
Closes #32770
Change-Id: Id0fcb7731a9b3a1caaf4ad854c55d0a292b443dc
Reviewed-on: https://dart-review.googlesource.com/49640
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-04-05 20:05:33 +00:00
Stephen Adams
0c892a8bc8
Improve signatures of tear-offs
...
Signatures for static tear-offs cannot have free variables, so we can
always generate them in the types table.
Signatures for instance tear-offs can always use the existing
mechanism, since the type must be parameterized only by the class
instance type parameters.
Change-Id: I3ccfe8fc9220c57cfee07e1f7d9afbd5674b2b92
Reviewed-on: https://dart-review.googlesource.com/48841
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-31 01:30:21 +00:00
Sigmund Cherem
577b168c39
Fix jsinterop bug: we incorrectly added null values for js-interop constructor
...
calls.
Closes https://github.com/dart-lang/sdk/issues/32697
Change-Id: I7f372e9f32ec415f5d0e1472c04085029f41d5b9
Reviewed-on: https://dart-review.googlesource.com/48522
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-28 00:06:04 +00:00
Sigmund Cherem
c438f8b3f4
Dart2js defaults to the new common front-end
...
Change-Id: Id0f69d258b010a746b56e259335185bcca7dafec
Reviewed-on: https://dart-review.googlesource.com/45143
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-13 19:25:59 +00:00
Johnni Winther
ad62702e93
Update status
...
Change-Id: I6b231d18741045619315985e85ed04cf01181232
Reviewed-on: https://dart-review.googlesource.com/45701
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-03-09 09:39:35 +00:00
Johnni Winther
26e689de05
More work on signatures
...
Change-Id: Ifd8c20f1947149d60cca7c69e40ad85533519746
Reviewed-on: https://dart-review.googlesource.com/45700
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-03-09 08:30:28 +00:00
Sigmund Cherem
f3687198b8
Update dart2js_extra: normalize further and update to match runtime==chrome expectations
...
TBR=sra@google.com
Change-Id: I13408ae668c0163f1973ff2616c546b426b5bd1e
Reviewed-on: https://dart-review.googlesource.com/45368
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-03-07 03:39:16 +00:00
Sigmund Cherem
18aa6b570f
Delete recursive import test, improve comment of dummy_compiler_test.
...
recursive_import: was covering logic for the old frontend and it is no longer
relevant. dummy_compiler is not just about APIs, is about self-hosting.
TBR=sra@google.com
Bug: https://github.com/dart-lang/sdk/issues/30773
Change-Id: I56d094d9ecee47264c7a7a206f942d9e3dbdaadc
Reviewed-on: https://dart-review.googlesource.com/45364
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-07 03:36:54 +00:00
Sigmund Cherem
bde6603d92
Update dart2js_extra.status: now it correctly declares expectations for
...
non-minified, minified, host-checked, checked, and fast-startup
TBR=sra@google.com
Change-Id: I20159ff71bbb9b4e84304e4d560e5d06d0d41814
Reviewed-on: https://dart-review.googlesource.com/44661
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-02 01:13:58 +00:00
Sigmund Cherem
9ed595b4b3
Use $fasta instead of $dart2js_with_kernel in our status files.
...
Note: $fasta is true when passing --dart2js-with-kernel. This change will make it
easier to flip the default: the plan is that $fasta will be true by default
later on, and passing --dart2js-old-frontend will make it false.
TBR=sra@google.com
Change-Id: Ib917d55b2d14db954c56513af057dd9a37b9c825
Reviewed-on: https://dart-review.googlesource.com/44601
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-03-01 21:02:18 +00:00
Johnni Winther
6931a7a288
Use [localFunctionNeedsSignature] to determine when to add JSignatureMethod
...
Closes #32078
Change-Id: Ib1c9c08b1fdf33e3d94c02595135cf430357fed6
Reviewed-on: https://dart-review.googlesource.com/43742
Reviewed-by: Emily Fortuna <efortuna@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-27 12:33:53 +00:00
Johnni Winther
85cf0961ee
Include type arguments passed through generic calls in rti emission
...
Change-Id: Id757caaebb0bd802e8afa978c9a4bc5b4d6273fe
Reviewed-on: https://dart-review.googlesource.com/43670
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2018-02-27 10:01:14 +00:00
Sigmund Cherem
e33f4f7c2e
Fail if mirrors are really used.
...
Some legacy libraries may import dart:mirrors, but not use it. This CL turns them
into a runtime error temporarily to give some time for the library
maintainers to remove the import to dart:mirrors in the future.
Change-Id: I876133908d2a61300256915aab54730bdff51649
Reviewed-on: https://dart-review.googlesource.com/43640
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-02-27 04:57:27 +00:00
Johnni Winther
216c0ae8c2
Don't override .constructor property
...
- on named mixin applications with --fast-startup.
Change-Id: Ia58e1b8e9a06d2c8d2ce14b3435b3c76aeef6fbc
Reviewed-on: https://dart-review.googlesource.com/40743
Reviewed-by: Florian Loitsch <floitsch@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-02-26 09:39:43 +00:00
Sigmund Cherem
50db95f69b
Fixes for CSP: status lines and some test fixes.
...
These failures started showing up when we switched to use chrome instead of DRT
for CSP tests.
Change-Id: I53b70ce18eaef73e720e10fdac05245953131f7c
Reviewed-on: https://dart-review.googlesource.com/41480
Reviewed-by: Emily Fortuna <efortuna@google.com >
Commit-Queue: Sigmund Cherem <sigmund@google.com >
2018-02-14 21:54:53 +00:00
Johnni Winther
b7ef215604
Ensure no function type variables on constructors
...
Closes #32069
Change-Id: I9e8e35aad7844863717d19d6335da87b9c823375
Reviewed-on: https://dart-review.googlesource.com/39700
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2018-02-08 09:09:09 +00:00
Emily Fortuna
ef3c271542
Generate signature function in strong mode (previously was behind a flag).
...
Change-Id: Ia99623beb4f5cbba719833af2d710702d2caaa6d
Reviewed-on: https://dart-review.googlesource.com/38902
Commit-Queue: Emily Fortuna <efortuna@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-02-07 23:02:40 +00:00
Paul Berry
cca7b4419d
Replace $builder_tag == strong with $strong in status files
...
The `$builder_tag == strong` annotations were added before test.py
supported `$strong`. Now that `$strong` is supported, it's better to
use it directly to avoid confusion.
Change-Id: I715edecaee1e36ab8a26dbc96a6aa056e1be018f
Reviewed-on: https://dart-review.googlesource.com/39600
Reviewed-by: Alexander Thomas <athom@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-02-07 11:50:10 +00:00
Sigmund Cherem
2847a8b3af
Retain type arguments in closures if needed for .runtimeType
...
Change-Id: I07781ffaf19d1a2099c5a45509ec93545514e61a
Reviewed-on: https://dart-review.googlesource.com/39300
Commit-Queue: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Emily Fortuna <efortuna@google.com >
2018-02-06 21:54:58 +00:00
Dan Rubel
64374c1a83
Update status files
...
Change-Id: I1ab483c50bec5d373f31a7e2f946b0fd2433ee44
Reviewed-on: https://dart-review.googlesource.com/38660
Reviewed-by: Dan Rubel <danrubel@google.com >
2018-02-05 13:52:18 +00:00