Commit graph

69977 commits

Author SHA1 Message Date
Jonas Termansen 4cd6243d77 [dart:io] Backport semantic changes from the dart:io NNBD migration.
The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports these
semantic changes to the unmigrated SDK so any issues can be discovered
now instead of blocking the future SDK unfork.

The Process class will now throw a StateError if the process is detached
upon accessing the stdin, stdout, stderr, and exitCode getters.

The Socket class will now throw a SocketException if the socket has been
destroyed or upgraded to a secure socket upon setting or getting socket
options.

Change-Id: I956fd07e713e51ebd479ebbfe4790d8d2fdf0744
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133989
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-03 15:10:45 +00:00
Johnni Winther 4d32ec8d21 [cfe] Non-nullify legacy types in opt-in libraries
+ preserve promotion for synthetic variables.

Closes #40255

Change-Id: I2ebe43c31a05ff0121d971205bf8ff5f0e084113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134161
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-03 14:52:55 +00:00
Johnni Winther 281ce7c14c [cfe] Rename LibraryBuilder.uri to importUri
Change-Id: If576b2b0bca0e27ec63891a53c760d870b2bcd01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133997
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-03 14:52:55 +00:00
Martin Kustermann ce27d1a539 [vm] Specialize TTS stubs only for legacy types
This is a follow-up to 62835950d which was using the condition
`type.IsNullable()` for determining whether to generate TTS stubs.

It turns out `type.IsNullable()` is false for legacy types (for whatever
reason, because legacy types are nulable).

Instead we'll change the condition to `type.IsLegacy()`.

Issue https://github.com/flutter/flutter/issues/49893

Change-Id: I4c8a728382c7b7c65ddb6bff41778b384634d83d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134164
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-03 14:07:55 +00:00
Johnni Winther 3210109ccf [cfe] Detects writes during initialization in late final field lowering
Closes #40219

Change-Id: I8519a35cef96262df0dc68101e43ec5ea8b9de3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133987
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-03 13:40:50 +00:00
Johnni Winther 8991dc33d2 Fix language/operator/invalid_operators_test
Closes #40415

Change-Id: If179bc6802e6193aea4c011d889f9ecbfa3020b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133993
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-03 13:35:15 +00:00
Dmitry Stefantsov 5af05598eb [cfe] Disallow non-nullable fields without initializers
Closes #40081.

Bug: http://dartbug.com/40081
Change-Id: I4032af18164af05034c2706cba8f62be39c636c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133994
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-03 13:32:45 +00:00
Johnni Winther 905a380258 [cfe] Handle explicit extension operator access from dill.
Closes #39938

Change-Id: I9798e02c243c1edfbeb1e6f5bb5564bcf9e74a05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133996
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-03 12:54:15 +00:00
Victor Lima d3b7909769 [vm] Remove flag unbox_numeric_fields
Change-Id: I57899b239fb942650460377ec0a6cecbb48c6926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133995
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
2020-02-03 12:43:05 +00:00
Aske Simon Christensen 76c6282de6 [vm/aot] Use a global dispatch table for instance calls in AOT.
This is a Dart-tailored implementation of the "row-displacement
dispatch table" technique for closed-world instance calls:

All interface targets in the program are grouped into selectors such
that all targets that could potentially be called from the same call
site have the same selector (currently just grouped by name).

Each selector is assigned a selector offset such that offset + classid
is unique for all selector/classid combinations where the class
implements the selector.

At every instance call site that has an interface target (i.e. where
the static type of the receiver is not dynamic), the selector offset +
receiver classid is computed and used as index into a global table of
entry points.

If the receiver can be null (as determined by the front-end TFA and the
VM type propagation), a null check is inserted before the call.

An arguments descriptor is provided (only) for selectors that need it
(those which have type parameters or optional/named parameters).

The dispatch table calls don't need the monomorphic entry code, so for
functions that are only called via dispatch table calls (i.e. never
called dynamically), the monomorphic entry code is left out.


Some future improvements to the table dispatch implementation are
mentioned in https://github.com/dart-lang/sdk/issues/40188


The table dispatch flag is disabled by default in this commit. A
separate commit enables the flag.

Change-Id: Ic2911742b4a2c9a8d3bc7df60605454cbe4c0714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126648
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-03 11:04:15 +00:00
Aske Simon Christensen de0ed1bd4e [vm] Share implementation of LoadClassIdInstr across architectures.
Also avoid executing the tagging instruction in the Smi case for
some LoadTaggedClassIdMayBeSmi implementations.

Change-Id: I067b06ce404ffbba1981539ed3bfef72c4215e8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133584
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-03 11:04:15 +00:00
Devon Carew 5f5e1db141 [nnbd tool] move nnbd preview tool resources to individual files
Change-Id: I7f3690e34d94e3d7f361b31447a5ae60cf01a1ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134140
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-03 00:38:34 +00:00
Konstantin Shcheglov 1bfe26ea48 Extract CorrectOverrideHelper and use for checking mixin applications.
Change-Id: I33c7b2df51cda29721be56c624b44c4ed6126137
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134095
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-02 07:07:04 +00:00
Sigmund Cherem 07675de0c0 Fix type error within _EventStream.onData
The constructor was wrapping the onData handler to hide the type-mismatch. This
copies the same logic to the onData handler.

In non-nnbd code this code was not exercised. The migration of dart:async
made this code reachable on our tests. That's because Stream.first used to
do:

  var subscription;
  this.listen(() => ... cancel subscription here, ...)

it now avoids making subscription nullable by registering the onData handler
later:

  var subscrition = stream.listen(null, ...);
  subscription.onData(() => ... cancel subscription here);

This change fixes the following 6 html tests under nnbd:
html/history_test/history/history
html/transferables_test
html/transition_event_test
html/websocket_test
html/worker_test/functional/functional
html/xhr_test


Change-Id: I095ea8d545e65b047504af0367586884bba84d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134120
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-02 05:58:24 +00:00
Sam Rawlins e4ddd90cd1 NNBD Preview: Fixes for a few edit details
These are bugs found while looking at the collection package.

Change-Id: I5527c873cbe015e723f59f743952b5dc493c5c97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134108
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-02-02 03:33:53 +00:00
Devon Carew c8ed304e97 [dartdev] add a dartdev 'create' command
Change-Id: I95625a9c422335ba5de92c887afce9eb564d6a04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133460
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-02-02 02:23:13 +00:00
Mayank Patke ed441e48d0 Update all Slow tests to be Slow, Pass.
Change-Id: I610b272355b045eab80cf941210774fb12d775eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134103
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-02-01 00:17:42 +00:00
Sam Rawlins 89edf6443b Fix another windows test in analyzer
Change-Id: I675efd198ce7e803e2f9e7bdb62385116da22032
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133438
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-01-31 23:55:22 +00:00
Sigmund Cherem c693a9a093 fix dart2js golden file.
I believe the new errors are correct, they are just reported differently since
the changes in https://dart-review.googlesource.com/c/sdk/+/134120

Change-Id: I161eb37a59e755ff84d40741ca1c460564c67474
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134104
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-01-31 23:52:02 +00:00
Liam Appelbe b504faaefc [vm] Stop storing to temp in LoadLateField
Use an expression temp instead.

Change-Id: Ifa1de272a90448f376bdcac88b0c458c0ddd21b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134088
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-01-31 23:45:42 +00:00
Zichang Guo 91a3ea89c8 Revert "[dart:io] Stop forcing lower case on HttpHeaders"
This reverts commit b2b7337ad4.

Reason for revert: flutter build broke!!

Original change's description:
> [dart:io] Stop forcing lower case on HttpHeaders
> 
> This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501
> 
> HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.
> 
> This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.
> 
> The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.
> 
> Bug: https://github.com/dart-lang/sdk/issues/33501
> Change-Id: I6f7f2ef907b229773c283140c07f2de4cd500981
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119100
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=whesse@google.com,sortie@google.com,lrn@google.com,zichangguo@google.com

Change-Id: I4d4299393ad6549b250053df8823e726855e2baf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/33501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134102
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-01-31 22:32:22 +00:00
Janice Collins aa916d6367 Add path parsing to pub support.
Change-Id: Ib4edee4d247bc9bb525d63bc527cecebe4e4a5ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-01-31 22:17:32 +00:00
Sam Rawlins 147ed9e9e1 Load navigation programatically; use badges for edit counts; #40115
Change-Id: I83b1db7c95ea0edb8a8d3af0f125219659c6df1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134080
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-01-31 22:06:12 +00:00
Martin Kustermann 4650e22088 [vm/compiler] Mark Box instructions as non-speculative (since the inputs are always unboxed values and dont need to be checked)
Change-Id: I9f5cd0d1dcbc2164b74783cc7ba12e56c0d7a685
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133998
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-01-31 21:46:42 +00:00
Vijay Menon 7a85c7c895 [dartdevc/nnbd] enable co19_2 tests for legacy mode
Change-Id: Iaf1cd9f6833554a622ea8c97a7fefb7e09a9cd51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134089
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-31 21:42:13 +00:00
Jaime Wren d772141960 Initial RelevanceAnalyzer support in the completion_metrics.dart algorithm with an initial example implementation of RHSOfAsExpression
Change-Id: Icaf3e80cb4d634f5871d576d3344210d631641c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134092
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-31 21:41:47 +00:00
Martin Kustermann 7a6233ad51 [vm] Set Class::is_const() based on final fields instead of generative constructors (which can be shaken by TFA)
This fixes debug assertions in AOT.

Change-Id: Ib688164498ad98d2b7bb4ce574cf6859922df3a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133999
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-01-31 21:38:37 +00:00
Sigmund Cherem 1349a64d6a Update check_nnbd_sdk to diff expectations directly in dart.
This makes the script properly produce an error message when
it detects a mismatch on windows (there `diff` is not available.)

Change-Id: Ibefe8c69023b42e8710e744f88257ff967d34bd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134094
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-01-31 21:33:42 +00:00
Vijay Menon 18f41ce9e5 [dartdevc] use var for top-level
This is a potential workaround for:

https://bugs.webkit.org/show_bug.cgi?id=199866

until a proper fix lands in Safari.  See:

https://github.com/dart-lang/sdk/issues/40380

Change-Id: I66f5aefefcc6c8f12fd3b747fcee587fc16d437d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133542
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-31 21:30:32 +00:00
Mayank Patke a5cfdf6586 [dart2js] Use flags to choose between legacy/NNBD in RTI.
Change-Id: I42705320aabcdfecc12098f40ca16a2c623a1033
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134091
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-01-31 20:04:52 +00:00
Nicholas Shahan 55b81b08bf [dartdevc] Add dart:io back to the sdk
Revert the changes made to DevCompilerTarget that allowed for optionally
excluding libraries when building the null safe SDK.

Fixes: #39698
Change-Id: I0ae3160e17ca60b7a078a905ea12c8538d2aa045
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134081
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-01-31 20:00:32 +00:00
Johnni Winther 54c8066f6f [cfe] Add new flags to AsExpression and IsExpression
Change-Id: I31eba9b4ced051a1067945fd68e60a09b1fa6ed7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133100
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-01-31 19:55:22 +00:00
Konstantin Shcheglov bb6cab29b9 Check for correct overrides as the specification requires.
Specifically, we replace types of covariant parameters with `Object?`
or `Object` and use subtype check. Then we check types of covariant
formal parameters and corresponding overridden formal parameters.

It looks that NNBD related changes that are coming now require
such more precise following to the specification rules.

Change-Id: Idfa4e3a118050a1be79acce8c708b3aac07b5051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134043
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-31 19:35:23 +00:00
Sigmund Cherem f07c805656 Fix based64 decoder.
The non-nnbd code doesn't have this extra `if`. It appears
that this conditional was added during the migration but
it is accidentally hiding the update to the _state.

This change restores the algorithm to how it was before
the migration and fixes lib_2/convert/base64_test/none

Change-Id: I72dd2e870056bb55158bbd053d8a3c8825a1d144
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134090
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-01-31 19:00:32 +00:00
Mayank Patke 023f286772 [dart2js] Update generic function subtyping.
We now test bounds for mutual subtyping rather than structural equality
up to renaming of bound type variables and equating all top types.

Change-Id: I7dd23a3211a1631e463ea90c3173f3deae46ca23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134042
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-01-31 18:33:02 +00:00
Sam Rawlins 8d874bbb1e NNBD preview: Add 'view' links to Edit List; #40115
Change-Id: Ia365fb43c6efc12c78a82841bcecffceefb501f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134086
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-01-31 18:06:52 +00:00
Brian Wilkerson bff11ba6ec Enable always_declare_return_types in analysis_server
Change-Id: I9b06753cf552c9f50ea2abd7f3fa5ba9adecb526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134085
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-31 17:45:24 +00:00
Brian Wilkerson d1ca36aa83 Enable empty_catches in analysis_server
Change-Id: Ic21556e8118a5b5d3b4a06ed6d3a7002f606f2ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134084
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-31 17:38:02 +00:00
Brian Wilkerson 9517c22b39 Improve the fix for empty_catch
The fix for empty_catch should not remove the catch clause if doing so
would leave the try statement invalid. It could remove the whole try
statement in such a case, but it isn't clear that that's a good solution
in general. This at least patches the issue until we can decide whether
additional work should be done.

Change-Id: I7c5190faba9fd5632c04708007bc65bb18d3db6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134087
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-31 17:37:22 +00:00
Zichang Guo b2b7337ad4 [dart:io] Stop forcing lower case on HttpHeaders
This is a breaking change. Request: https://github.com/dart-lang/sdk/issues/33501

HttpHeaders use lowercase by default for all headers, since it is supposed to be case insensitive. Some servers incorrectly treat case as significant, however, and expect headers with capitalization or in uppercase. The current implementation forces headers to be lower cases when adding values. Users cannot even manually modify the headers.

This change removes this restriction here so that users can modify the headers to whatever form they want. The new behavior is backwards compatible except if class was implemented. All headers inside http.dart are written as lower cases, adding values to HttpHeaders is still receiving lower cases input.

The other cl (https://dart-review.googlesource.com/c/http_multi_server/+/121411) migrates multi_headers.dart to be compatible with this change.

Bug: https://github.com/dart-lang/sdk/issues/33501
Change-Id: I6f7f2ef907b229773c283140c07f2de4cd500981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119100
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-31 17:08:52 +00:00
Zichang Guo 0ed9f7179d [vm] seperate error and unknown types for getStdioHandletype
Infer other types as kPipe which is sync with Win platform.

Bug: https://github.com/dart-lang/sdk/issues/40354
Change-Id: I8bf40a143573685833a689ff2c724a421b308234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133623
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-01-31 17:07:22 +00:00
Martin Kustermann bada62ba7b [vm/reload] Fix crash in scavneger / GC after reload on ia32
If generated code refers to a constant object (which are old and canonical), a pointer
to it will be embedded in the instruction stream on ia32.

If we now reload and morph this constant object and allocate the
morph'ed copy in new space, the become operation will make RX writable
and the slot in the instruction stream gets updated to point to a new
space object and the code gets added to the remembered set.

The next scavenge operation will scan the remembered set as roots, see
the poitner to a new object, move the object and updates the pointer in
the instruction stream.
  => We hit a SEGV trying to write the RX memory

We can avoid this problem by ensuring to morph old+canonical instances
always into old space on ia32.

Change-Id: Id63eb6ee1735bbb661dbeceb1e8d0c6ac92225ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133228
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-01-31 16:42:42 +00:00
Martin Kustermann 5ae5aff640 [vm/embedder] Add documentation to Dart_CompileToKernel
Change-Id: Ic858a010f77a05c47430ce13d2bd7ef80535a538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133990
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-01-31 15:03:42 +00:00
William Hesse 4e38df4255 [infra] Print correct configuration groups in failures link
We were printing groups of builder names, not configurations

Change-Id: Ia9a6791fbd25939f71a1aa227bc288197c838bd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133991
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-01-31 14:19:00 +00:00
Johnni Winther 42246f7f96 [cfe,analyzer] Disallow type parameters on operator methods
This was never supported by the grammar but unfortunately allowed by
both the analyzer and the CFE.

Change-Id: Id669c934fe08eda41973d6d2cef8340da2e7d72c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133591
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-01-31 14:05:02 +00:00
Jens Johansen dac412d545 [CFE] Don't issue export errors twice in incremental compiler
When loading from dill a library with export errors in it, the errors
would be reported when setting up that scope. There it would be reported
without a location.
Then - if not recompiling it and fixing it - it would be reported again
because of problemsAsJson (with a location).
It would thus be reported twice, one better than the other.

This CL updates the scope building for dill builders to have the option
to supress such errors and then use that option in the incremental
compiler where we use problemsAsJson to reissue problems.

Change-Id: I03430bf8b9996b6e8b7571b8e4e33f3f89f832a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133235
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-31 13:57:32 +00:00
Jens Johansen 94c21123a8 [CFE] Fix memory leak in incremental compiler
Change-Id: I5541707a4a4c7537a947d2b08cb6d3ee4ad6075d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133230
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-31 13:56:41 +00:00
Johnni Winther e0d8aa825a [cfe] Use fileUri in error reporting
+ add support for expectation testing of custom platform libraries

Change-Id: I1dfae23963ec25f2be11fad06c218e1c59fe181a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133920
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-01-31 13:46:22 +00:00
Jens Johansen 3d5530ff22 [CFE] Transformations can now tell of they changed the structure of a class
By allowing a transformation to tell if it change dthe structure of a
class we can make sure to update the class hierarchy accordingly,
making sure it's up to date for the next computeDelta call in the
incremental compiler.

Change-Id: Iefed3bb1ecbd17b142266ce4a9e1e477f9d2fc87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133222
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-31 13:45:12 +00:00
Victor Lima b68d95ec9e [vm] Reland support for real unboxed floating point fields in AOT
Issue https://github.com/dart-lang/sdk/issues/40404

Change-Id: Icfa801ff0640a6b27bb3c13d0b737c40452cbf7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133983
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-01-31 12:56:31 +00:00