Commit graph

53132 commits

Author SHA1 Message Date
Zachary Anderson 379a1cf24a [infra] Roll clang toolchain forward
Change-Id: Id9c98520f47ce9660efd271bc81062b93fdc035f
Reviewed-on: https://dart-review.googlesource.com/33981
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-10 21:23:39 +00:00
Stephen Adams f756c5e71d Print names for generic method type parameters in function type
- Added JS_GET_FLAG('STRONG_MODE') allow the code to be tailored to
the type system version.

 - Split type stringifying code into V1 (existing logic) and V2
(strong mode Dart 2.0 logic).

The V1 code will eventually be deleted.

Change-Id: I78db91796040b6ecfa1bd5d6a9d64bd4c2bc4bcf
Reviewed-on: https://dart-review.googlesource.com/33680
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-01-10 21:00:48 +00:00
Samir Jindel 91cf506f03 Revert "[kernel] Support for the partial type application operator in the VM."
This reverts commit 4f265395e0.

Change-Id: I03785a4caf8a32db4a67e49c40fb80c0cfbf8c29
Reviewed-on: https://dart-review.googlesource.com/33883
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-01-10 20:51:28 +00:00
Konstantin Shcheglov 2ba489c65a Fix resynthesize tests for Windows.
Fixes #31832

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

Bug: https://github.com/dart-lang/sdk/issues/31832
Change-Id: Ie0b1dd9742415fe9cf97b3d3843eeaf3af878308
Reviewed-on: https://dart-review.googlesource.com/33982
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-10 20:24:39 +00:00
Martin Kustermann 7ab210e308 [VM] Allow EqualityCompare/RelationalOp/BinaryInt64OpInstr to take constants as inputs
Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: I3a64fc9e6a038ae28e3a98149b0494ebe254fd73
Reviewed-on: https://dart-review.googlesource.com/33780
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-10 19:29:28 +00:00
Alexander Thomas 2da64efb81 [infra] Update status files for new VM Kernel opt counter builder
Bug: https://github.com/dart-lang/sdk/issues/31838
Change-Id: I703319aebc135a7b219dc576c50f26f5feaabedf
Reviewed-on: https://dart-review.googlesource.com/33881
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-01-10 18:49:19 +00:00
Vijay Menon bedf7121e0 Wire build rules to generate ddc-kernel versions of SDK files
Change-Id: I7d39bce7a3382c7a332ecdc4886bb08dabfdf09a
Reviewed-on: https://dart-review.googlesource.com/33900
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-01-10 18:34:38 +00:00
Harry Terkelsen 3c77ef6738 Ensure types seen in annotations are resolved as they are seen
Change-Id: I138bb7904ff069f1b0df6c85d63ca6b7cbdaca3e
Reviewed-on: https://dart-review.googlesource.com/33664
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Harry Terkelsen <het@google.com>
2018-01-10 18:08:59 +00:00
Devon Carew 8a60ff77d3 Documentation updates for dart:developer.
Bug:
Change-Id: Ib866d4eb347938aebb6f0dca8a8b1ec2827830d8
Reviewed-on: https://dart-review.googlesource.com/32900
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-10 17:24:09 +00:00
Zachary Anderson 05684f6f54 [Fuchsia] Update test status file
related #31841

Change-Id: I462a5af9e4dccea119353fb1370558b72c624f7d
Reviewed-on: https://dart-review.googlesource.com/33920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-10 17:15:38 +00:00
Martin Kustermann 0ea33d4283 Revert "[kernel] Support for the partial type application operator in the VM."
This reverts commit 4f265395e0.

Reason for revert: A lot of failing precompilation builders.

Original change's description:
> [kernel] Support for the partial type application operator in the VM.
> 
> Change-Id: Ieaf5d936676a6e755dab69d70105dcce0bcbfdb6
> Reviewed-on: https://dart-review.googlesource.com/32540
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,sjindel@google.com,regis@google.com

Change-Id: Iac6a9fe7fb7467cab3818da99043d310d1981c67
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/33940
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-01-10 17:05:39 +00:00
Konstantin Shcheglov 1514e3f276 Resolve labels while applying resolution.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I1d50d251e04a51a1ba0c6038592982988c3281b2
Reviewed-on: https://dart-review.googlesource.com/33666
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-10 16:53:09 +00:00
Martin Kustermann c06dd2e6a0 [VM] Implement UnboxInt64Instr::Canonicalize()
This allows us to convert UnboxInt64Instr's to UnboxedConstantIntrs if
the input is a constant.

Issue https://github.com/dart-lang/sdk/issues/31798

Change-Id: Ieefd28503059302817baa6f1a463a6e6a9a61398
Reviewed-on: https://dart-review.googlesource.com/33462
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-01-10 16:26:58 +00:00
Alexander Thomas 616d02ef65 Search runtime directory for status summaries
Change-Id: Id1b4010cb07883193ea3ef5726c3cb651c2e061b
Reviewed-on: https://dart-review.googlesource.com/33882
Reviewed-by: William Hesse <whesse@google.com>
2018-01-10 16:13:57 +00:00
Zachary Anderson 2e87c35c04 [infra] copy_tree.py should not blow away existing files
Otherwise, files calculated by ninja to be clean are deleted, but
not rebuilt.

related #31774

Change-Id: I5f0c2a3f6b06de20195d8a3b7320dd59df38fbdb
Reviewed-on: https://dart-review.googlesource.com/33700
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-01-10 15:46:08 +00:00
danrubel ec3c098ee0 Cleanup fasta recovery tests
Change-Id: I832d1b28c075351340ef0e94be51eab34d669c10
Reviewed-on: https://dart-review.googlesource.com/33640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-01-10 14:30:38 +00:00
Dan Rubel 729e7b2920 Refactor fasta parser modifier recovery
This CL extracts parsing modifiers from parsing types so that
parseModifiers just parses modifiers and a separate call is made
to parseType.

* Discard the ModifierContext object sooner
* Remove some places where findMemberName output was being
   used to determine which modifiers are present.

Currently, modifiers are parsed once by findMemberName,
again by parseModifiers, and sometimes a third time
by isFactoryDeclaration. This CL sets the stage for
improved modifier recovery and parsing modifiers exactly once.

Change-Id: Ieb8cd1156ed090ca4653258bd40afbac843b9b7c
Reviewed-on: https://dart-review.googlesource.com/33500
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-01-10 14:30:38 +00:00
Samir Jindel 4f265395e0 [kernel] Support for the partial type application operator in the VM.
Change-Id: Ieaf5d936676a6e755dab69d70105dcce0bcbfdb6
Reviewed-on: https://dart-review.googlesource.com/32540
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-10 13:57:28 +00:00
Jens Johansen 37c28f8661 Revert "Reapply "Partial static mode changes for vm-service and tests (part 3).""
This reverts commit c9f6e8695d.

Reason for revert: Change brakes Observatory:

```
$ out/ReleaseX64/dart --observe hello.dart
Observatory listening on http://127.0.0.1:8181/
Hello, world!
vm-service: isolate(348927110)  'hello.dart:main()' has no debugger attached and is paused at exit.  Connect to Observatory at http://127.0.0.1:8181/ to debug.
```

Going to the website I get
```
Unexpected exception:

NoSuchMethodError: method not found: 'castTo'
Receiver: ""
Arguments: [Instance of 'it']

StackTrace:

main.dart.js 2017:3     Object.f
main.dart.js 2203:30    Object.qn
main.dart.js 21316:11   b3.aQ
main.dart.js 20634:6    b3.c2
main.dart.js 20643:8    TZ.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
main.dart.js 36990:30   UC.$1
main.dart.js 36992:29   UB.$0
main.dart.js 36982:9    Ux.nq
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   b3.dart.ba.lE
main.dart.js 20621:112  b3.dart.ba.lE
main.dart.js 20603:22   b3.cD
===== asynchronous gap ===========================
main.dart.js 4840:12    Zh.e4
main.dart.js 3930:17    L.lK
main.dart.js 3932:28    L.ad
main.dart.js 20621:12   ms.dart.ba.lE
main.dart.js 20621:112  ms.dart.ba.lE
main.dart.js 15829:10   Y4.bs
```

and Observatory is completely broken.

From https://github.com/dart-lang/sdk/issues/31397 it seems that Observatory uses an "old" sdk, i.e. we cannot use new stuff as castTo.

Original change's description:
> Reapply "Partial static mode changes for vm-service and tests (part 3)."
>
> Fix dynamic mode static warnings.
>
> Bug: https://github.com/dart-lang/sdk/issues/31587
> Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
> Reviewed-on: https://dart-review.googlesource.com/33540
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: I775544cb5ab212cc836bc63181bdce31d19380b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/31587
Reviewed-on: https://dart-review.googlesource.com/33800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 12:21:53 +00:00
Dmitry Stefantsov 28757928b4 Run instantiate to bound on a per declaration basis, not per use basis
Change-Id: I59764334cb1befda9e0db0fd09fc83f6398f61da
Reviewed-on: https://dart-review.googlesource.com/32960
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-01-10 11:34:59 +00:00
Jens Johansen c04d873078 Mark new service test as RuntimeError in strong mode
Bug:
Change-Id: I4161c937375231a501901f5dcae15b3d7ee84992
Reviewed-on: https://dart-review.googlesource.com/33722
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 11:29:02 +00:00
Dmitry Stefantsov fd821941ad Update status file: some tests now pass due to recent changes
Change-Id: Iee6dd4337b2773da1ab7f8d7adf28fdcb593deb5
Reviewed-on: https://dart-review.googlesource.com/33762
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 09:24:20 +00:00
Dmitry Stefantsov 613c248a6d Skip resynthesize_kernel_test for now, until the timeout issue is solved
TBR=athom@google.com,jensj@google.com

Bug: http://dartbug.com/31832
Change-Id: I675be8bd7432f598d80ac79126f53ddfad318e42
Reviewed-on: https://dart-review.googlesource.com/33740
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 08:30:18 +00:00
Samir Jindel 28a0706e91 [kernel] Implement correct semantics of forwarding stubs in VM
This revision has been factored out of Revision 29300.

Change-Id: Idf579f0e5ffeea5764e2a9654c6812d69f6977c7
Reviewed-on: https://dart-review.googlesource.com/31921
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-10 07:39:31 +00:00
Jens Johansen b38f5930a4 [gardening] Update status file for app_jit service test
Bug:
Change-Id: I8b10adaf83643bc187b03521278d993aef11a9df
Reviewed-on: https://dart-review.googlesource.com/33720
Reviewed-by: Jens Johansen <jensj@google.com>
2018-01-10 07:37:49 +00:00
Peter von der Ahé bb9af782a7 Correct type arguments for NSM
Change-Id: I28623bed9d5d203e82d50c4b057803a89e76757d
Reviewed-on: https://dart-review.googlesource.com/33380
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-01-10 07:13:30 +00:00
Jens Johansen 11358378be [kernel] Change offset for IndexAccessor invocations
Add Observatory test to check debug positions for e.g. a[0]().
Non-kernel pipeline points to '(', whereas the (old) kernel behaviour
was to point to 'a'. This fixes the kernel behaviour to also point to '('.

Bug:
Change-Id: I9cd0a2f0cdd4428cd491d02ccc63c72caf285292
Reviewed-on: https://dart-review.googlesource.com/31982
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-01-10 07:07:39 +00:00
Leaf Petersen 5aea404159 Hide new core lib MapEntry class where it conflicts in kernel, and
suppress a hint on undefined imported name to make it backwards
compatible.

Bug:
Change-Id: I9c92adcf685248fb8aae9da39c008968768ad29b
Reviewed-on: https://dart-review.googlesource.com/33662
Reviewed-by: Paul Berry <paulberry@google.com>
2018-01-10 01:59:48 +00:00
Ryan Macnak e14b3a86f0 Report errno on mprotect failure.
Bug: b/70275153
Change-Id: I81b868b25428b39835935846ba2c9f9f67b3e84d
Reviewed-on: https://dart-review.googlesource.com/33665
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-10 01:37:49 +00:00
Ryan Macnak 340995ec5d Remove unused Dart_SaveJITFeedback.
Change-Id: I6b4ce6b8f18ff2788b22873044572b2a81b7b7ef
Reviewed-on: https://dart-review.googlesource.com/30624
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-10 01:29:39 +00:00
Ryan Macnak c9f6e8695d Reapply "Partial static mode changes for vm-service and tests (part 3)."
Fix dynamic mode static warnings.

Bug: https://github.com/dart-lang/sdk/issues/31587
Change-Id: I966349f5409f911efacd11f08ffd469373bcd434
Reviewed-on: https://dart-review.googlesource.com/33540
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-10 01:28:39 +00:00
Leaf Petersen 116ecdcf11 Hide new core lib MapEntry class where it conflicts in fasta, and
suppress hints about the undefined name for backwards compatibility.

Bug:
Change-Id: I381af6a8ae5be040e3c149e0cf4b9d45faa8c630
Reviewed-on: https://dart-review.googlesource.com/33663
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2018-01-10 01:20:21 +00:00
Mike Fairhurst 4c1cbe1c8f Solve generic function serialization, but not type param scoping.
This is based on https://dart-review.googlesource.com/c/sdk/+/20481/10,
which required a rollback due to numerous secondary revealed issues.

Rather than deserializing function types with the proper scope, and
breaking inherited function type params, ie, `m(x)` where `x`
implicitly gets the type of `x` from `super.m(... x)`, deserialize
generic types incorrectly so that `const x = <Function<T>(T)>[]` fails
but `m(x)` works.

I have work towards fixing this issue, but it is incomplete (#31804),
and had to be rolled back and the fix is only getting more tangled:
https://dart-review.googlesource.com/c/sdk/+/33582.

For now, this will allow people to use Function types *without* type
parameters with no issues, and introduce no secondary issues, and
hopefully be a more straightforward change in and of itself.

-- From Rolled Back CL --

Remove field formal parameter test from other branch


Test genericFunctionType summarization deeper: params, return.

Didn't see a standard way of testing 'void' in the test so far, so I
followed some other tests and used isNotNull, which could be improved.

Fix type arguments vs parameters.

Fix #30858, generic function types not serializable when const.

Previously declaring for instance const lists (or even final lists) of
generic function types ie `final x = <void Function()>[]` would throw
errors during summarization.

The type parameters don't seem correctly stored yet, but that is an
edge case. Left a TODO, for now this should go in to prevent the
analyzer crash.

One thing I changed as well is that `serializeType` assumed it was
getting a type name, and `serializeTypeName` accepted types but threw
when it didn't get a type name. I flipped the names so that
`serializeTypeName` accepts a type name and `serializeType` accepts a
type in general and decides whether its a type name or a generic
function type to proceed with specialization.

Bug:
Change-Id: I98f5a362c9b2e8b3a7e87532ff4645b5963277ab
Reviewed-on: https://dart-review.googlesource.com/33660
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-01-10 00:16:19 +00:00
Konstantin Shcheglov 527f91a11d Throw FileSystemException from Analyzer's implementation of FileSystem.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I3c7ea1995085380025b0abb7350b20d20ce16d16
Reviewed-on: https://dart-review.googlesource.com/33584
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-09 21:30:29 +00:00
Konstantin Shcheglov 4e9e5d0569 Assign analyzer codes to several FrontEnd errors.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I2cf2a948048245e016f0f3d316dcf889c4bde31d
Reviewed-on: https://dart-review.googlesource.com/33583
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-09 21:25:48 +00:00
Konstantin Shcheglov 8ed12e00ce Use FrontEndCompiler in ResynthesizeKernelStrongTest.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: Ia27b1a4cd85c5ae50e22870e895edfa9f03a3cd5
Reviewed-on: https://dart-review.googlesource.com/33560
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-09 21:03:39 +00:00
Alexander Thomas 89bd41d19a [infra] Simplify vm-kernel configurations in test matrix
This also adds the missing vm-kernel opt-counter builder.

Bug: https://github.com/dart-lang/sdk/issues/31753
Change-Id: I0199218f83d227cfc52505c213d7b689acd9c43e
Reviewed-on: https://dart-review.googlesource.com/31984
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-01-09 20:59:49 +00:00
Stephen Adams 8e3da7df7c js_runtime: Make CastErrorImplementation more like TypeErrorImplementation
I also added safe-printed irritant to the message, which in the case
of a primitive value or closure would tell you what value is causing
the problem.

Bug:
Change-Id: I530f5185f06d54ddc2ad4d45e11fa08b71213338
Reviewed-on: https://dart-review.googlesource.com/33260
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-01-09 20:49:09 +00:00
Alexander Thomas c637a34a5a [gardening] Mark timing out test as "Slow"
TBR=whesse@google.com

Change-Id: I080c700e6c7e76aad0a70419e21021d92c295f3f
Reviewed-on: https://dart-review.googlesource.com/33464
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2018-01-09 20:26:58 +00:00
keertip 2d8802b5d0 Update barback and html deps.
Bug:
Change-Id: Ic2e1fccf874dcc29008e8b8e199c06146a7505f9
Reviewed-on: https://dart-review.googlesource.com/33581
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2018-01-09 20:23:39 +00:00
Ryan Macnak 2d22b6ee6b Report errno on munmap failure.
Bug: b/70275153
Change-Id: I78724a72adb25dff38168436a5c1b34a1acff0c2
Reviewed-on: https://dart-review.googlesource.com/33220
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-01-09 20:03:49 +00:00
Zachary Anderson e625b39414 [infra] Add env var for extra GN args
Change-Id: Ifcc61f8c242c7e69e963187b9bae379f7d5b7f0f
Reviewed-on: https://dart-review.googlesource.com/33480
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-01-09 19:26:58 +00:00
Konstantin Shcheglov a6792904bf Don't append ErrorToken.lexeme, this causes an exception.
R=brianwilkerson@google.com, paulberry@google.com

Bug:
Change-Id: I23a590761b07254a37d7dc64b55ff18580a4c767
Reviewed-on: https://dart-review.googlesource.com/33541
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-09 18:52:39 +00:00
Konstantin Shcheglov d66d08280f Tests for inference of 'void' type for variables.
This must have been already fixed before.
This CL just adds tests to the suite that we use for the top-level issue.

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

Bug: https://github.com/dart-lang/sdk/issues/31638
Change-Id: Ic57c35abd4c31d86e58feeb9fa0c831df94d9ec6
Reviewed-on: https://dart-review.googlesource.com/33520
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-09 18:13:38 +00:00
Mike Fairhurst 428b2013ee Fix new finding from https://dart-review.googlesource.com/c/sdk/+/20481
new errors since the parameter type inference logic was changed:

analyzing pkg/analyzer...
  error • Inconsistent declarations of 'getAncestor' are inherited from
<E>(dynamic) → E, <E extends Element>((Element) → bool) → E at
pkg/analyzer/lib/src/fasta/mock_element.dart:174:16 •
inconsistent_method_inheritance
  error • Inconsistent declarations of 'getAncestor' are inherited from
<E>(dynamic) → E, <E extends Element>((Element) → bool) → E at
pkg/analyzer/lib/src/fasta/mock_element.dart:262:16 •
inconsistent_method_inheritance
  error • Inconsistent declarations of 'getAncestor' are inherited from
<E>(dynamic) → E, <E extends Element>((Element) → bool) → E at
pkg/analyzer/lib/src/fasta/mock_element.dart:315:16 •
inconsistent_method_inheritance
  error • Inconsistent declarations of 'getAncestor' are inherited from
<E>(dynamic) → E, <E extends Element>((Element) → bool) → E at
pkg/analyzer/lib/src/fasta/mock_element.dart:467:16 •
inconsistent_method_inheritance
  error • Inconsistent declarations of 'getAncestor' are inherited from
<E>(dynamic) → E, <E extends Element>((Element) → bool) → E at
pkg/analyzer/lib/src/fasta/mock_element.dart:488:16 •
inconsistent_method_inheritance
  error • Inconsistent declarations of 'getAncestor' are inherited from
<E>(dynamic) → E, <E extends Element>((Element) → bool) → E at
pkg/analyzer/lib/src/fasta/mock_element.dart:501:16 •
inconsistent_method_inheritance
6 errors found.

Bug:
Change-Id: I48b98e287bd6496b0745a1fcb42f87450cbfba9c
Reviewed-on: https://dart-review.googlesource.com/33180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-01-09 16:58:09 +00:00
Konstantin Shcheglov bb52d1afaa Type inference should always infer the return type of operator []= as void.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/31779
Change-Id: I1c396cce3f148585218e02ff4e41bc2f85cc924a
     https://github.com/dart-lang/sdk/issues/31638
Reviewed-on: https://dart-review.googlesource.com/32687
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-01-09 16:57:59 +00:00
Samir Jindel b264dc6fc3 Fix implementation of StoreIndexedUnsafe instruction on ARM64.
Change-Id: I95780486bd092f297407fd96cc89f82eba6f2b84
Reviewed-on: https://dart-review.googlesource.com/33420
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-01-09 14:22:18 +00:00
Johnni Winther 966168ba67 Pass type arguments to dynamic calls
This only works for inlining of dynamic methods. Stubs are not created yet.

Change-Id: Ia138117d503b69774984ce9070a3298b87fdbe78
Reviewed-on: https://dart-review.googlesource.com/32766
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-09 13:44:37 +00:00
Jens Johansen f72603ab45 [fasta] Allow --dump-ir to print error program
For instance, with the program snippet from issue #31409 one would not
get any other output than the errors, and one would have to explicitly
dump the dill file afterwards to see what was actually generated.

This CL changes this, so the error-library is also printed (in addition
to the, at least in the case of issue #31409, empty list) as in

```
$ pkg/front_end/tool/fasta compile tmp.dart --dump-ir

tmp.dart:2:4: Error: Expected a function body or '=>'.
Try adding {}.
V();
   ^
tmp.dart:3:5: Error: Duplicated definition of 'V'.
var V;
    ^
tmp.dart: Error: Duplicated name: 'V'.
tmp.dart:2:1: Error: Duplicated name: V
V();
^
library;
import self as self;

static method #main() → dynamic {
  throw "tmp.dart:2:1: Error: Duplicated name: V\nV();\n^";
}
```

Bug:
Change-Id: I8739be43137f098e6dc50df27f4d1d8628bea469
Reviewed-on: https://dart-review.googlesource.com/32602
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-09 13:11:58 +00:00
Jens Johansen 426d94785d [gardening] Mark timing out tests as slow
It seems that f99d3628d1
(CL https://dart-review.googlesource.com/33144)
caused these 5 tests to time out on the pkg builder as well as the try
bots.
Locally the tests take ~40 seconds, so giving it a bit more time (i.e.
marking them as slow) seems likely to turn things green again.

Bug:
Change-Id: I90526b1d7060309d8f1cf902bd9d52c71927f1ed
Reviewed-on: https://dart-review.googlesource.com/33340
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-01-09 12:57:28 +00:00