Commit graph

56386 commits

Author SHA1 Message Date
Ryan Macnak edb1642709 [vm] Repair interpreter build.
Change-Id: I194b705523cec3ebb1c3edba6546561c337b28c9
Reviewed-on: https://dart-review.googlesource.com/58600
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-05 21:44:26 +00:00
Konstantin Shcheglov a9fef15ff3 Add FileResult and AnalysisDriver.getFileSync().
I thought that getSourceKind() might be not the best API. We are moving
away from Source, and it seems that we should stop using SourceKind as well.

R=brianwilkerson@google.com

Change-Id: I0fcff8dc8cefcd6d8fb899badab8037bf8d67775
Reviewed-on: https://dart-review.googlesource.com/58442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-05 20:51:37 +00:00
Ryan Macnak 787a43ec78 [vm] Fix some missing private name mangling in the kernel reader.
Bug: https://github.com/dart-lang/sdk/issues/32345
Bug: https://github.com/dart-lang/sdk/issues/33326
Bug: https://github.com/dart-lang/sdk/issues/33345
Change-Id: I89fb8f0332ef6f9f40de59c219af2a7c23e5943f
Reviewed-on: https://dart-review.googlesource.com/58400
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-06-05 20:14:46 +00:00
Alexander Aprelev 1cf348b29f Mark enum_private_test/02 as pass, crash
Filed dartbug.com/33339

Change-Id: Ic4c6ea34af7cc0700875c749d0f31b93f1c09c59
Reviewed-on: https://dart-review.googlesource.com/58540
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 19:59:27 +00:00
Doug Evans cc1a817faa Use ZX_THREAD_STATE_BASIC on state output of ZX_INFO_THREAD.
Change-Id: I0429ad208cddb0cb21db293fd798cb872f71b305
Reviewed-on: https://dart-review.googlesource.com/58560
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-05 19:53:21 +00:00
Alexander Aprelev 4e0e72a65f Fix map_insert_remove_oom_test.
Increase old gen heap size so that the test can start.

Bug: https://github.com/dart-lang/sdk/issues/33344
Change-Id: I1946d3c6d10a2a2504b7b290c6ea638c261cd5fe
Reviewed-on: https://dart-review.googlesource.com/58541
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 19:28:07 +00:00
Stephen Adams 8421e69fbb [js_runtime] Make _checkLength more likely to be inlined
Rewrite _checkLength to avoid weaknesses in type inference.

Change-Id: I1a254d021ff966fa51da7f8258c5cba7b3b10336
Reviewed-on: https://dart-review.googlesource.com/58542
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-06-05 19:03:26 +00:00
Paul Berry b66dd3d456 Stop using generic comment syntax in observatory.
In most cases the correct fix is to simply drop the generic comment
syntax (e.g. replace "List/*<Map>*/" with "List").  We can't use the
more precise type because the runtime type is actually more general
(e.g. when processing an object that came from the JSON parser, all
lists have runtime type List<dynamic>, even if their elements happen
to be uniform).  But we can introduce more precise types when handling
substructures.

Exception: all JSON-derived maps have type Map<String, dynamic> (since
JSON maps always have string keys), so we can use a more precise type
when dealing with JSON maps.
Change-Id: I48c9dbdda97c11530978212146f74db7b43f5197
Reviewed-on: https://dart-review.googlesource.com/58320
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-05 18:29:26 +00:00
Emily Fortuna b667be4861 Fix source maps strong mode runtime failure in dart2js.
Fix for https://github.com/dart-lang/sdk/issues/33332

Change-Id: I16c464b5dec85ccef55ecbe2e75d67dbf3481927
Reviewed-on: https://dart-review.googlesource.com/58480
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2018-06-05 18:04:37 +00:00
Vyacheslav Egorov 7b972a653b [vm/linearscan] Account for definitions with no SSA name when processing PairLocation outputs.
ToSecondPairVreg(kNoVirtualRegister) should be kNoVirtualRegister not 0.

Revert fe28a2939a which updated statuses for
crashing tests.

Fixes https://github.com/dart-lang/sdk/issues/33329

Bug: https://github.com/dart-lang/sdk/issues/33329
Change-Id: I48e95bcb6f95555ec9ac51adc1f61619fbf40139
Reviewed-on: https://dart-review.googlesource.com/58461
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-06-05 17:41:34 +00:00
Alexander Aprelev 09fc582bfd Fix EvalExpression test.
Instance::Evaluate was replaced with EvaluateCompiledExpression. This fixes the test.
Change-Id: Ie5aba0a7ef25209a3319a07d45d76f347f6f3e95
Reviewed-on: https://dart-review.googlesource.com/58440
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 17:40:59 +00:00
Alexander Aprelev f2883d1b4f Fix test error message expectation on Windows.
This fixes buildbot failure:
```
Running "vm" command: set DART_CONFIGURATION=ReleaseX64 & pkg\vm\tool\dart2.bat --sync-async --ignore-unrecognized-flags --packages=C:\b\s\w\ir\.packages C:\b\s\w\ir\out\ReleaseX64\generated_tests\lib_2\mirrors\initializing_formals_test_none.dart
FAILED: dartk-vm release_x64 lib_2/mirrors/dynamic_load_test
Expected: Pass
Actual: RuntimeError
--- Command "vm" (took 03.000953s):
set DART_CONFIGURATION=ReleaseX64 & pkg\vm\tool\dart2.bat --sync-async --ignore-unrecognized-flags --packages=C:\b\s\w\ir\.packages C:\b\s\w\ir\tests\lib_2\mirrors\dynamic_load_test.dart
exit code:
255
stdout:
IsolateMirror on 'dynamic_load_test.dart:main()'
LibraryMirror on 'dynamic_load_success'
InstanceMirror on 1
InstanceMirror on 2
LibraryMirror on 'dynamic_load_success'
InstanceMirror on 3
InstanceMirror on 4
tests/lib_2/mirrors/DOES_NOT_EXIST: Error: The system cannot find the file specified.
stderr:
Unhandled exception:
Expect.isTrue(false) fails.
#0      Expect._fail (package:expect/expect.dart:605:5)
#1      Expect.isTrue (package:expect/expect.dart:133:5)
#2      main (file:///C:/b/s/w/ir/tests/lib_2/mirrors/dynamic_load_test.dart:45:10)
<asynchronous suspension>
#3      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:279:19)
#4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
--- Re-run this test:
python tools/test.py -m release -c dartk --strong --output-directory C:\b\s\w\iodxgot1 lib_2/mirrors/dynamic_load_test
Done dartk-vm release_x64 lib_2/mirrors/dynamic_load_test: fail
```

Change-Id: Ib042899894ab903bc6c21fc3600a5b5b83916f4d
Reviewed-on: https://dart-review.googlesource.com/58521
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 17:33:29 +00:00
Alexander Aprelev 8bfbce33f1 Mark cc/Profiler_CodeTicks as failing on Windows, dartk x64 config
Change-Id: I44ab656634500cdd1dc43f2710c964e87dbffd4e
Reviewed-on: https://dart-review.googlesource.com/58520
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 17:32:54 +00:00
Konstantin Shcheglov a8c2263d3f Issue 33336. AnalysisDriver.discoverAvailableFiles() should notify the scheduler that there is work to do.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/33336
Change-Id: I543179853cc529f3919214a0bbe952026a45d816
Reviewed-on: https://dart-review.googlesource.com/58500
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-05 17:07:19 +00:00
Aart Bik b7493b663e [vm/inliner] Inline small int convertors.
Rationale:
Always inline int convertors that don't do
much more than testing and anding.
For example, force inline
  v26 <- StaticCall:66( _toUint8@6027147<0> v4 T{Type: class 'int'?}) T{Type: class 'int'?}
to
  v47 <- Constant(#255)
  ..
  CheckSmi:10(v4 T{Type: class 'int'?})
  v45 <- BinarySmiOp:10(&, v4 T{_Smi}, v47 T{_Smi}) T{_Smi}

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

Change-Id: I595d9a64365e16ae244480b5e27f8be23c43d164
Reviewed-on: https://dart-review.googlesource.com/58061
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-05 16:54:19 +00:00
Alexander Markov 6b71414296 [Test status] Update status of several triaged lib_2/mirrors tests
Change-Id: Ie90688ea7a9fd95a939c87b4c619213b74c904c1
Reviewed-on: https://dart-review.googlesource.com/58422
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-05 16:24:09 +00:00
Brian Wilkerson 1f03109200 Proposed replacement for SourceFactory
Change-Id: Iadcb71a4f9682d4cb9636aea6bb0b91f3bf040f9
Reviewed-on: https://dart-review.googlesource.com/58160
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-06-05 16:09:49 +00:00
Paul Berry 60631b0944 Remove unnecessary casts from observatory.
Change-Id: I2ad59645471b41ce0c8530665b9dc2bcd3e56e7d
Reviewed-on: https://dart-review.googlesource.com/58321
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-05 15:55:00 +00:00
Erik Ernst bfa8be887a Extending dartLangSpec.tex with super-bounded types and variance.
Change-Id: I09d01a21f8b227d46ddafedea223b1c765a1d29c
Reviewed-on: https://dart-review.googlesource.com/56981
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-06-05 15:23:06 +00:00
Dan Rubel daee781179 Revise beginTypeVariable event in event sequence
This is the first CL in a series aimed at removing the need to reparse type variables in
https://github.com/dart-lang/sdk/blob/master/pkg/front_end/lib/src/fasta/kernel/body_builder.dart#L3669
and ultimately improving recovery by removing parseType.

* Move calls to listener.beginTypeVariable after parsing metadata and identifier
* Pass variable name via beginTypeVariable rather than via handleIdentifier
* Add additional check in test for issue 31846

Change-Id: I983b9d17675fc899c83df69fa1777059903e3f52
Reviewed-on: https://dart-review.googlesource.com/58300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-06-05 15:11:00 +00:00
Alexander Aprelev e0ca1514a2 Mark test as failing.
Post a5e41681e5, the method Instance::Evaluate is now redundant in dart2 mode. Instead Instance::EvaluateCompiledExpression should be used.

The https://dart-review.googlesource.com/c/sdk/+/58440 should fix the test.

Change-Id: I18ee49174f51b46a87a56324be054ebc832a04df
Reviewed-on: https://dart-review.googlesource.com/58441
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-06-05 06:25:10 +00:00
Alexander Aprelev a5e41681e5 Add support for expression compilation via service.
If there is registered expression compiler, VM debugger uses it to compile expressions. Otherwise, it will fallback to use kernel service compiler.
This is needed to support Flutter use case where compiler is running on developer's host machine, not on the device where VM is running.

Bug: dartbug.com/31981
Change-Id: I8bdfc8ab45a57c306169abe189f1e24e1b0bcf40
Reviewed-on: https://dart-review.googlesource.com/57520
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-05 04:16:39 +00:00
Emily Fortuna c499e0021a Remove unnecessary class type parameters now that we only have ir.Node.
Fixes https://github.com/dart-lang/sdk/issues/33328
a Dart 2 strong mode runtime error.

Change-Id: I10d52a6360f932cf4ab4592dfd1fb01c263fffb4
Reviewed-on: https://dart-review.googlesource.com/58423
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Emily Fortuna <efortuna@google.com>
2018-06-05 01:23:09 +00:00
Alexander Markov fe28a2939a [Test Status] filter crashes for #33329
Issue: https://github.com/dart-lang/sdk/issues/33329
Change-Id: I16a9241631b081cf9db97d7a6065ed805daaac95
Reviewed-on: https://dart-review.googlesource.com/58420
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-04 23:57:19 +00:00
Ryan Macnak ade0e93090 [vm] Normalize external string finalizers.
- Remove a level of indirection when accessing code units.
 - Require a finalizer when constructing an external string.

Change-Id: I3f65246bf0ac50ffad900e2c338623a7684a9d3d
Reviewed-on: https://dart-review.googlesource.com/54300
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-06-04 23:44:39 +00:00
Paul Berry 648f62a170 Rename Function to ServiceFunction, since creating a class called Function is deprecated.
Change-Id: Ia052b1663252a8786f94577626e631a66d69dff5
Reviewed-on: https://dart-review.googlesource.com/58280
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 22:02:29 +00:00
Zach Anderson 9847c06e76 [observatory] Top-level observatory_archive rule copies to root_out_dir
Change-Id: I165d5391f8ae36ec4201d25907c90a526d8b8c6b
Reviewed-on: https://dart-review.googlesource.com/58360
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 21:35:39 +00:00
Konstantin Shcheglov 6449e67c5d In getElementAtOffset() try first to find the element as if it is the nameOffset.
IntelliJ sends us the file and offset of the declaration of the element,
not the file and offset where the element is referenced (and where the
user actually requested search). It uses navigation information to do
this. Unfortunately this means that in the most case the unit that
defines the element is not a priority one, so we have to resolse it
from scratch. But we know that we are always given the name offset,
so we can look first into the element model and avoid performing
expensive unit resolution.

If the search is not successful, or the file is a priority one,
we use resolved unit anyway.

R=brianwilkerson@google.com

Change-Id: Ic6a32d3d8f9e61b245b1dd9f7fdf626c809f5fd5
Reviewed-on: https://dart-review.googlesource.com/58322
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-04 21:14:49 +00:00
Stephen Adams 38467cca03 Track always-initialized-to-null fields
Change-Id: Idb4d3a0395ce73eaaa4fc15a8df3bceaa4821b4f
Reviewed-on: https://dart-review.googlesource.com/57525
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-06-04 21:05:01 +00:00
Ryan Macnak 53f7bb175e Revert "Make --sync-async the default for the VM."
This reverts commit 1ddf553eb6.

Reason for revert: Failing service tests

Original change's description:
> Make --sync-async the default for the VM.
> 
> Change-Id: Ic6d7bbc27835ea7b197cccf05724adb99e95dd51
> Reviewed-on: https://dart-review.googlesource.com/57580
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=vegorov@google.com,kustermann@google.com,floitsch@google.com

Change-Id: I062cb40badf0d1cf1808bee152fdd4074b00179d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/58380
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-06-04 21:04:20 +00:00
Alexander Markov c3b5939965 [vm] Remove --limit-ints-to-64-bits option and old _Bigint class
Closes https://github.com/dart-lang/sdk/issues/33306

Change-Id: I7088d8b7143edbe24f5cefe4be037ad2006e0625
Reviewed-on: https://dart-review.googlesource.com/58101
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 20:10:40 +00:00
Alexander Thomas 839c03e092 [release] Prepare changelog for 2.0.0-dev.60.0
TBR=whesse@google.com

Change-Id: Ie14d3fab5f5fdc8e3e25660496cd677fcee1f645
Reviewed-on: https://dart-review.googlesource.com/58340
Reviewed-by: Alexander Thomas <athom@google.com>
2018-06-04 20:01:22 +00:00
Zach Anderson b0f622a143 [vm] Fix GC assert
Saw this assert hit on the bots, so switching back to max with 0.

Change-Id: Idafcd55d99dd441131dd3ac9aeb57ec102f28569
Reviewed-on: https://dart-review.googlesource.com/58323
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-04 19:07:39 +00:00
Alexander Markov 5bfe8d454e [vm/kernel] Set active class when evaluating Dart annotations, take 2
In 4fb0c60938
active class was set in StreamingDartTypeTranslator, but it turns out
this is not enough. This CL sets active class in StreamingFlowGraphBuilder;
all dependent helper objects should pick it automatically.

Fixes https://github.com/dart-lang/sdk/issues/33259

Change-Id: If16afff35de32cbdba23f6260dac0e0fd7e9786a
Reviewed-on: https://dart-review.googlesource.com/57524
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-06-04 19:05:33 +00:00
Régis Crelier 57dc25c6f6 [VM interpreter] Initial version of stack walking of interpreted frames.
Various improvements and bug fixes.

Change-Id: Ice0ce0ba8db8c9f78b9fad89f951218c90c831b7
Reviewed-on: https://dart-review.googlesource.com/57443
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-06-04 18:37:30 +00:00
Florian Loitsch 1ddf553eb6 Make --sync-async the default for the VM.
Change-Id: Ic6d7bbc27835ea7b197cccf05724adb99e95dd51
Reviewed-on: https://dart-review.googlesource.com/57580
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-06-04 18:05:20 +00:00
Paul Berry a518d3c6dc Use int.tryParse rather than deprecated onError parameter of int.parse.
Change-Id: I20943a59e367fa6bd328604063b4a736ec300c0e
Reviewed-on: https://dart-review.googlesource.com/58260
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-04 17:49:39 +00:00
Ryan Macnak 2b5de60888 [vm] Improve --verbose-gc.
- Track mark-compact as a GC type instead of a GC reason.
 - Track external allocation as a GC reason.

Change-Id: Id79bf6a582109e3ebb97954822aefeffe68959e2
Reviewed-on: https://dart-review.googlesource.com/58002
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-04 17:33:03 +00:00
Zach Anderson 0bec11a4f2 [vm] Control growth of external allocations
Previously, GC would only be triggered by external allocations on
reaching a limit indicated by a flag. This limit was too large
and not set thoughtfully by anyone.

This CL triggers GC when external allocations in old gen grow
larger than some limit based on results of previous GC, similar
to how Dart heap growth triggers GC. GC is triggered for new gen
when external allocations reach 4x the current new gen
capacity.

FL-61

Change-Id: I1d4da467bc2aab64058f25296aefdd73eebc38e6
Reviewed-on: https://dart-review.googlesource.com/58100
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-04 17:24:18 +00:00
Martin Kustermann 35b17f3730 [VM] Consistently use ValidationPolicy in frame iteration APIs
Previously there were places in the code where an API accepted a
`bool validate_frames` and call sites passed an enum value (which
implicitly got converted to a bool).

By changing the APIs to require an enum, the compiler will tell us if a
caller doesn't pass one.

Change-Id: I29fcd0b018e6cdd7e00b5bb03e83b9636d1345d4
Reviewed-on: https://dart-review.googlesource.com/57823
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-06-04 14:46:26 +00:00
Paul Berry e59cf89fa3 Clean up FunctionTypeImpl constructors.
Previously, FunctionTypeImpl.elementWithNameAndArgs was used for two
purposes: (1) when creating a FunctionTypeImpl for an executable
element, to initialize _typeArguments to the types of the type
parameters that are in scope, and (2) when creating a FunctionTypeImpl
for a typedef, to supply the type arguments necessary to instantiate
the typedef.  (1) turns out to be unnecessary, since the
FunctionTypeImpl.typeArguments getter automatically gathers type
arguments from enclosing elements if necessary, and (2) makes more
sense to do as part of the .forTypedef constructor.  So this CL
removes FunctionTypeImpl.elementWithNameAndArgs and updates its
callers to use the unnamed constructor or the .forTypedef constructor,
as appropriate.

Also, a check is added to make sure that the unnamed constructor is
never accidentally used for typedefs.  So now FunctionTypeImpl has
just three public constructors, each with a clear use case, enforced
either by an assertion or by the type system:

- The unnamed constructor (for executable elements, not typedefs)

- The .forTypedef constructor (for typedefs only)

- The .fresh constructor (for creating one FunctionTypeImpl from
  another by binding fresh type parameters)

Finally, the public constructors for FunctionTypeImpl are all changed
to factories so that client code can't inadvertently FunctionTypeImpl.
(It shouldn't anyway, since FunctionTypeImpl is defined inside src/,
but this gives an extra level of safety).

Change-Id: I5f7abc1ca114eb612cbf539c1d61fc0cace5a4dd
Reviewed-on: https://dart-review.googlesource.com/58043
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-06-04 14:05:46 +00:00
Martin Kustermann 1fe279d859 Fix _FutureListener.handleError() to use explicit type for Zone.runBinary
Change-Id: I1606b0039a535e5fd65e76848a2743b6d27a3dc0
Reviewed-on: https://dart-review.googlesource.com/58209
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-06-04 13:17:54 +00:00
Alexander Thomas a9257d05fb [vm] Prepare status files for dartk reload/rollback builders (#33126)
Change-Id: I954debb9f258eb94de227f6772ff08b53daba322
Reviewed-on: https://dart-review.googlesource.com/57623
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-06-04 11:30:21 +00:00
Kevin Millikin 6ac6baae8e Record interfaceTargets for calls on dynamic receivers
When calling Object methods on dynamic receivers, record the
interfaceTarget it Kernel.  Back ends will use this to treat the call
as a statically typed one.  This is half of the problem in
https://github.com/dart-lang/sdk/issues/33293

Bug: https://github.com/dart-lang/sdk/issues/33293
Change-Id: I8d05903e5b85370a4e697ad3afc494cbc14bcc6a
Reviewed-on: https://dart-review.googlesource.com/57820
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-06-04 09:47:21 +00:00
Johnni Winther 82755aa303 Rename ClosedWorld to JClosedWorld and merge it with ClosedWorldRefiner
Change-Id: I858695194fe4b0dffb7c85a93e2d6bcc04dd6229
Reviewed-on: https://dart-review.googlesource.com/58022
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-04 09:22:41 +00:00
Johnni Winther b58cc36ddc Extract KClosedWorld from ClosedWorld.
Change-Id: I2db59cea5081fde2f0b35c6518d6b618df617ac1
Reviewed-on: https://dart-review.googlesource.com/57827
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-04 09:22:41 +00:00
Martin Kustermann 9a193853d4 [VM] Mark a few tests as passing
They are passing since  315a186

Change-Id: Iee40f0c50160b87763fb031bb74d2499ef578807
Reviewed-on: https://dart-review.googlesource.com/58181
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-06-04 08:50:32 +00:00
Konstantin Shcheglov 5c2cec0e19 Make _FilesReferencingNameTask faster by using maintained FileSystemState.knownFiles list.
This makes the task itself 1.4 times faster, and search 15% faster.

R=brianwilkerson@google.com

Change-Id: I35444d46ee220fdb960d299f007739f044a20813
Reviewed-on: https://dart-review.googlesource.com/58143
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-03 20:47:46 +00:00
Konstantin Shcheglov 5269e21913 Fix for MockSdk on Windows.
TBR

R=brianwilkerson@google.com

Change-Id: I8d25f64615d4c1ac620b6d5f52771bf3c3c351c2
Reviewed-on: https://dart-review.googlesource.com/58161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-06-03 20:17:42 +00:00
Konstantin Shcheglov d0b28d2040 Fix analysis_server tests on Windows.
R=brianwilkerson@google.com

Change-Id: I9e66a81a8aab249ce4174085e2432e4ed53d943d
Reviewed-on: https://dart-review.googlesource.com/58142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-06-02 21:40:16 +00:00