Commit graph

13370 commits

Author SHA1 Message Date
Ryan Macnak a1fbf62742 [build] Place 'extern "C"' before __attribute__, as required by gcc.
Change-Id: I8a7ad221221e8b31a3a23aa9345686d08ba14da5
Reviewed-on: https://dart-review.googlesource.com/53465
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-02 22:14:27 +00:00
Ryan Macnak 258c5172df [vm] Remove dart_mirrors_api.h.
Its last user was Dartium's DevTools.

Change-Id: I86e1a2aacc7f2589be53418b3030accc0cef9a7d
Reviewed-on: https://dart-review.googlesource.com/53464
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-02 21:39:27 +00:00
Alexander Aprelev b298fc6d8f Revert "[kernel] Change dill representation of doubles"
This reverts commit 6e2536f585 as it
breaks flutter hot_reload test.

Bug: https://github.com/flutter/flutter/issues/17202
Change-Id: I36261a1aec5ec2196c3a02cc0da0dc0833337004
Reviewed-on: https://dart-review.googlesource.com/53460
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-05-02 20:25:58 +00:00
Alexander Aprelev 9a7e1f64a2 Revert "Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE.""
This reverts commit 24dd9b4176 as it broke
the presubmit buildbots.

Change-Id: If225ad7c5728413860ce7b5493e8a7fcd92f54e8
Reviewed-on: https://dart-review.googlesource.com/53461
Reviewed-by: Emily Fortuna <efortuna@google.com>
2018-05-02 19:48:25 +00:00
Ryan Macnak 61c226b4ea Only create Goma's analyzer on Linux.
Bug: https://github.com/dart-lang/sdk/issues/33011
Change-Id: I9bc294fb4cda2b2c8b2d552feb18c7ce6af28695
Reviewed-on: https://dart-review.googlesource.com/53341
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-02 16:27:15 +00:00
Samir Jindel 24dd9b4176 Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE."
This reverts commit 7d5025e814.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Fix incorrect handling of NSM forwarders and pull all logic into CFE.
> 
> The original implementation was designed around a shared misunderstanding
> of optional parameter handling in the spec. (which was also ambiguous about type parameters).
> 
> The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
> This behavior can be implemented without any backend support, as is done in this CL.
> 
> Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
> Reviewed-on: https://dart-review.googlesource.com/52802
> Commit-Queue: Samir Jindel <sjindel@google.com>
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>

TBR=dmitryas@google.com,sjindel@google.com

Change-Id: Ice6cd36cc62772e013bded83e0f589fe4b5e9d53
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/53400
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
2018-05-02 16:05:26 +00:00
Martin Kustermann 1fcd896ed9 [VM] Avoid deadlock by allowing us to run kernel isolate from a script snapshot, fixes all dartk-sim* builders
Currently on sim* architectures we use a script snapshot (and not an app
jit snapshot, as we normally do) for the kernel isolate.
  -> See utils/application_snapshot.gni:declare_args()

The change in [0] causes a deadlock where we try to compile the kernel
isolate (or rather a script snapshot of it) via the kernel isolate.

This CL fixes all the dartk-sim* builders by allowing us to run the
kernel snapshot from a script snapshot.

[0] https://dart-review.googlesource.com/52986

Change-Id: I513993f7c78310165d90f7622879482598f1e577
Reviewed-on: https://dart-review.googlesource.com/53380
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-02 13:52:46 +00:00
Samir Jindel 7d5025e814 Fix incorrect handling of NSM forwarders and pull all logic into CFE.
The original implementation was designed around a shared misunderstanding
of optional parameter handling in the spec. (which was also ambiguous about type parameters).

The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
This behavior can be implemented without any backend support, as is done in this CL.

Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
Reviewed-on: https://dart-review.googlesource.com/52802
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-05-02 12:18:30 +00:00
Jens Johansen b7698dcbce Update status for Windows
Change-Id: Ia7519522b962b39878c822035bc2d71d251420d0
Reviewed-on: https://dart-review.googlesource.com/53362
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-05-02 08:32:58 +00:00
asiva ce7329849d Fix build breakages
- use platform independent path specification is test so that
  it works on windows
- skip test for precompiled and dartk builds as the test uses
  spawnUri which is not supported in these modes

Change-Id: I7b73222ae331f863a65e6f7ff30d244533f29880
Reviewed-on: https://dart-review.googlesource.com/53340
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-05-02 01:03:48 +00:00
asiva ee6351a147 [VM] Set up package config value when invoking the front end for compilation,
this should fix issue 32950 "(Isolate.spawnUri() ignores packageConfig
argument in Dart 2 mode.'

Bug:32950
Change-Id: I1247c87c171ac44d3da6e2a93212adba20c42e54
Reviewed-on: https://dart-review.googlesource.com/52986
Reviewed-by: Alexander Aprelev <aam@google.com>
2018-05-01 22:57:35 +00:00
Ryan Macnak 607f4f5769 [vm] Get more helpful errors from Dart_SetVMFlags and Dart_MakeIsolateRunnable.
Bug: https://github.com/flutter/flutter/issues/12939
Change-Id: I76ddf2a6d3bb3775637d2eef87c7875c650de0a4
Reviewed-on: https://dart-review.googlesource.com/29680
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-01 20:54:38 +00:00
Kevin Millikin 9371ca061c Remove all the contravariance bits
Change-Id: Ib43b32d12749ddac0a93795cb5e8543eb5131dd9
Reviewed-on: https://dart-review.googlesource.com/52867
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-05-01 10:56:11 +00:00
Jens Johansen 6e2536f585 [kernel] Change dill representation of doubles
Previously doubles was saved as strings in the string table,
with a DoubleLiteral holding a StringReference.

This can cause overhead in both computation time
(converting the double to and from string) as well as size
(e.g. a single usage of the previously unused double 1000000.42
would use (at least)
* 10 bytes for the characters
* 1 byte for the size
* 1 byte for the reference to the string

whereas saving it as a double would simply save the 8 bytes.

On the other hand the string table doesn't contain duplicates so
many usages of the same double will use more space.

The SDK dill file size decreases slightly (< 1 KB).

On a Dart file with 1M different doubles (0.42, 1.42, ..., 999999.42)
added to a list:

Before:

compile and write via fasta (non-strong-mode): 0:12.18
Reading (via dart, eager): 2500-2600 ms
Writing (to null sink) (after reading): 1600-1800 ms
Output dill file (via fasta compile): ~62 MB

After:

compile and write via fasta (non-strong-mode): 0:11.76
Reading (via dart, eager): 2050-2350 ms
Writing (to null sink) (after reading): 400-550 ms
Output dill file (via fasta compile): ~54 MB

Running the dill file is ~the same time, but "Maximum resident set size
(kbytes)" (from /usr/bin/time -v) decreases with ~4%.

On the other side, if it's 1M of the same doubles (0.42), while
compiling is ~the same speed, the output dill goes from 43MB to 50MB.
Surprisingly the "Maximum resident set size (kbytes)" still decreases
though (~3%).

Running flutter test in flutter/packages/flutter:

Before:
```
02:33 +2425 ~18: All tests passed!
02:28 +2425 ~18: All tests passed!
02:28 +2425 ~18: All tests passed!
```

After:
```
02:12 +2425 ~18: All tests passed!
02:11 +2425 ~18: All tests passed!
02:12 +2425 ~18: All tests passed!
```

So that's -12.0267% +/- 3.15253%

File size of a dill file of an arbitrary test using flutter is reduced by ~44 KB (~0.3%).

Change-Id: I64151376cde1dae6f0d02b3d96991bc432a994ae
Reviewed-on: https://dart-review.googlesource.com/41660
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-05-01 09:35:21 +00:00
Ryan Macnak cff0e751a5 [vm] Add Dart_NewExternalTypedDataWithFinalizer.
Allows the finalizer to be associated with the correct object when creating ByteData. The finalizer should be associated with the underlying ExternalUint8List, since it can outlive the ByteData via byteData.buffer.asUint8List()

Bug: b/78150644
Change-Id: I3db58792bbe3abf7ed41d2adaf225fa554b8fb25
Reviewed-on: https://dart-review.googlesource.com/52860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-01 01:57:41 +00:00
asiva b64f2acfb9 Revert "[VM] Improve code generation for uint32"
Please see issue https://github.com/dart-lang/sdk/issues/33008 for more
details on the regression caused by this commit.

This reverts commit 9741c220f3.

It also effectively reverts

https://dart-review.googlesource.com/c/sdk/+/53006
https://dart-review.googlesource.com/c/sdk/+/53001

which were follow up CLs to the main commit.

Change-Id: Iac399c620a312ab3c3b27a3cba4e681742bcfe33
Reviewed-on: https://dart-review.googlesource.com/53164
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-05-01 00:25:01 +00:00
Ryan Macnak 82bf4bb135 [vm] Fail gracefully when a snapshot is loaded without the proper alignment.
Change-Id: Ie9164d54cbea08d0da5b36bfc36ef1a3e7a46b0b
Reviewed-on: https://dart-review.googlesource.com/53122
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-30 21:12:41 +00:00
Ryan Macnak 265ab831b6 [vm] Partial fixes for LTO.
Change-Id: Ic867777a7fc5df6631ce11030195d1323d7111ed
Reviewed-on: https://dart-review.googlesource.com/52983
Reviewed-by: Zach Anderson <zra@google.com>
2018-04-30 19:23:58 +00:00
Erik Corry 9eea773342 [VM] Remove assert code accidentally left in release
R=vegorov@google.com

Change-Id: I78e4fc35f1153b333a8fdc340ea78199f9cc6b27
Reviewed-on: https://dart-review.googlesource.com/53006
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-30 11:38:53 +00:00
Martin Kustermann 690b4f793b [VM] Be more defensive against constants coming from vmservice library (if we skip it)
Change-Id: I23900daadf030dcf46cec11008ec15e43245040f
Reviewed-on: https://dart-review.googlesource.com/52804
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-30 10:57:45 +00:00
Erik Corry a8b0a1a5fa [VM] Except SIMDBC from change for x64 and ARM64
R=vegorov@google.com
TBR=vegoroc@google.com
Change-Id: I1ddb72e0de13400d57dd6ca0a551a7273c4dea24
Reviewed-on: https://dart-review.googlesource.com/53001
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-04-29 18:15:03 +00:00
Erik Corry 9741c220f3 [VM] Improve code generation for uint32
Simplify by no longer using the signed unboxed int32 type on
64 bit platforms.

R=vegorov@google.com

Change-Id: Ic8eab7308f2ce01e5618344f50f72b95ce13a0dc
Reviewed-on: https://dart-review.googlesource.com/52762
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-29 12:41:43 +00:00
Erik Corry 580315af53 [VM] Fix bad assert in compactor that triggers on Mac
R=rmacnak@google.com
TBR=rmacnak@google.com

Change-Id: Ia9a783d7b8870b5482ff797487046e6ebea4eb3d
Reviewed-on: https://dart-review.googlesource.com/53000
Reviewed-by: Erik Corry <erikcorry@google.com>
2018-04-29 11:04:53 +00:00
Ryan Macnak aee4561882 [vm] Remove dependency of platform/assert.cc on vm/profiler.h
Change-Id: Ieab84b164ed620d5edca06e3c7b63b33bdcd6569
Reviewed-on: https://dart-review.googlesource.com/52943
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-27 23:30:48 +00:00
Ryan Macnak c354caa80d [vm, fuchsia] Build the VM as a shared library instead of a static library.
Change-Id: I791063fb0e32d56ca04de09486b41e4e98450c92
Reviewed-on: https://dart-review.googlesource.com/34304
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-27 21:14:37 +00:00
Sigmund Cherem 3c9d0858b0 dart2js: turn on sync-async by default
Closes https://github.com/dart-lang/sdk/issues/32869

Change-Id: I79b2d02d13adccdfbbd3a78158805244aceff7de
Reviewed-on: https://dart-review.googlesource.com/52061
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-27 19:48:46 +00:00
Ben Konyi 60f807baa5 [ VM / Hot-Reload ] Updated vm.status with more descriptive issue numbers.
Change-Id: I4d80ad745262aa81645dccccbfc43b874df1c213
Reviewed-on: https://dart-review.googlesource.com/52660
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-27 18:30:06 +00:00
Ryan Macnak 0cc70c4a7c [vm] Support for sharing parts of an app snapshot.
In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.

Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.

Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-04-27 17:42:16 +00:00
Alexander Markov cc968df178 [test] Fix analyzer warning in the recently added test
Change-Id: I808e1b32a8c3b7bcd1da257116c06926d391b987
Reviewed-on: https://dart-review.googlesource.com/52862
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-04-26 22:44:46 +00:00
Mike Fairhurst 5a9a479a73 Fix #32966 too little stack overflow context to be useful
Bug: 32966
Change-Id: I500cccd98d702d3938ff6ef1e415c74132e9d007
Reviewed-on: https://dart-review.googlesource.com/52840
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-04-26 22:16:36 +00:00
Alexander Markov 2786b9ff43 [vm/aot] Add detailed error messages and stack traces for null checks
This CL fixes error message in NoSuchMethodError thrown by null checks
and line numbers in corresponding stack traces (in AOT).

Name of the called function is placed into object pool, and metadata
for null check site is generated in CodeSourceMap.

Size of flutter gallery in release mode:
	  Before	 After
RW	  2165286	 2201642	(+1.68%)
RO	  2122192	 2168224	(+2.17%)
RX	  6871072	 6871072	(+0.00%)
Total	 11163079	11245467	(+0.74%)

Closes https://github.com/dart-lang/sdk/issues/32863

Change-Id: I5ad1190f2ec9452a669863f7dd114ea5f9092d52
Reviewed-on: https://dart-review.googlesource.com/52703
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-26 20:33:15 +00:00
Erik Corry 16be5d1e33 [VM] Fix missing update of off-heap class sizes
This fixes a test failure on SIMDBC64.

R=kustermann@google.com

Change-Id: I9f0633daea2acac96044b3145e595f28d778b9de
Reviewed-on: https://dart-review.googlesource.com/52780
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-04-26 11:19:37 +00:00
Erik Corry c8ad75d44a [VM] Make classes movable in sliding compactor
Store class sizes off heap so we can determine the size
of their instances even while the classes are moving.

R=rmacnak@google.com

Change-Id: I7b935114f76eb8b6aaa57d65e5b7cc0070afa75f
Bug: https://github.com/dart-lang/sdk/issues/30978
Reviewed-on: https://dart-review.googlesource.com/52104
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-26 09:38:25 +00:00
Vyacheslav Egorov 613c6d066c [vm][windows] Implement VirtualMemory::FreeSubSegment
Fixes #27505

This relands fc775b3e9b with a fix to

VirtualMemory::~VirtualMemory: on Windows the only way to release
virtual address mapping is to invoke VirtualFree(..., MEM_RELEASE) with the
original base pointer returned by VirtualAlloc - that is why we need to call
VirtualFree is size of the reservation is 0: the whole reservation might have
been decommitted by VirtualFree(MEM_DECOMMIT) but it is still present.
Change-Id: I7d1d444693c523b327d44266d5fe70f7a5d8f803
Reviewed-on: https://dart-review.googlesource.com/52642
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-04-25 23:39:52 +00:00
Erik Corry cf78da8a48 [VM] Reduce Smi size to 32 bit on 64 bit platforms
This reduces small tagged integers on 64 bit platforms from 63 bits to
31 bits plus one tag bit.
This is a step on the way to compile-time-optional compressed pointers
on 64 bit platforms.  See more about this at go/dartvmlearnings
This causes a slowdown for some uses of integers that don't fit in 31
signed bits, but because both x64 and ARM64 have unboxed 64 bit
integers now the performance hit should not be too bad.

This is a reapplication of
https://dart-review.googlesource.com/c/sdk/+/46244
It was reverted due to a compilation error on 32 bit
ARM with DBC.

R=vegorov@google.com

Change-Id: I943de1768519457f0e5a61ef0b4ef204b6a53281
Reviewed-on: https://dart-review.googlesource.com/51321
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-04-25 12:31:33 +00:00
Martin Kustermann e9ffc02663 Add partial instantiation support for constant evaluator [PartialInstantiationConstant]
Change-Id: Iaa93da60331737aaa6bceb4d2fe1d791dc7e95e9
Reviewed-on: https://dart-review.googlesource.com/52445
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-04-25 09:25:28 +00:00
Zach Anderson 7ed7933cd4 Revert "[vm][windows] Implement VirtualMemory::FreeSubSegment"
This reverts commit fc775b3e9b.

Reason for revert: Crashes in FreeVirtualMemory on the bots.

Original change's description:
> [vm][windows] Implement VirtualMemory::FreeSubSegment
> 
> related #27505
> 
> Change-Id: I3d500a041def348e8dd61bd16e0516cf5eaf38c2
> Reviewed-on: https://dart-review.googlesource.com/52520
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Commit-Queue: Zach Anderson <zra@google.com>

TBR=vegorov@google.com,rmacnak@google.com,zra@google.com

Change-Id: I2dd3fc163165773022b16735d415e11b0fa50f8e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/52540
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-25 02:49:00 +00:00
Michael Goderbauer 29d6e96370 Use softfp on 32bit ARM for iOS
Change-Id: I20ef6c998649aa041639feab93d49166570c53f4
Reviewed-on: https://dart-review.googlesource.com/52524
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-24 23:07:38 +00:00
Ben Konyi b641826ccf [ VM / CFE ] Removed changes introduced in c7e4a7d333 which allowed for dart:_internal to be imported for tests and updated DartAPI_InvokeNoSuchMethod to not depend on dart:_internal.
Change-Id: Ia861f7ef9eb6de0ee79743592d3517011c66327e
Reviewed-on: https://dart-review.googlesource.com/52266
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-04-24 22:14:48 +00:00
Nate Bosch 6d5e8e8f87 Build Observatory directly with dart2js
- Drop the `copy_observatory` and pub get steps. Use a checked in
  `dart2js.packages` file and build from the source tree.
- Invoke dart2js directly for the build command.
- Use the dart2js executable checked in to the SDK when it is available,
  otherwise fall back on the dart VM and dart2js source.
- Manually synthesize a filered `packages` directory out of the source
  directories for observatory and it's dependencies
- Remove transformer section of the pubspec since it's unused.


Bug: #32900
Change-Id: I35a19ffc8c3e732c68b65adf4595a6a51e28b94f
Reviewed-on: https://dart-review.googlesource.com/51740
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-04-24 21:56:09 +00:00
Zach Anderson fc775b3e9b [vm][windows] Implement VirtualMemory::FreeSubSegment
related #27505

Change-Id: I3d500a041def348e8dd61bd16e0516cf5eaf38c2
Reviewed-on: https://dart-review.googlesource.com/52520
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-24 21:50:48 +00:00
Aske Simon Christensen 9c2fcedaf4 Error on missing method implementation in non-abstract class
Bug: https://github.com/dart-lang/sdk/issues/32013

Change-Id: I163a84e70e94852a05ce99b07ec883c610ea788c
Reviewed-on: https://dart-review.googlesource.com/52320
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-04-24 13:07:54 +00:00
Zach Anderson c117aeea3b [dart:io] Check hostname when validating cert chains on MacOS
fixes #32936

Change-Id: Ic79ce7151cbeff1cf1d28908715c07c4e3b422d9
Reviewed-on: https://dart-review.googlesource.com/52342
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-04-23 22:39:32 +00:00
Régis Crelier ea14947aca [VM runtime] Remove assert requiring cloned type to be canonical (fix issue #32927).
Upper bounds are finalized in two steps, canonicalization coming second.

Change-Id: I0d7df9353fc26d91623eb7d8ee59a2c33a6eebf1
Reviewed-on: https://dart-review.googlesource.com/52200
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-04-23 16:46:20 +00:00
Alexander Markov ac7ca17652 [vm/kernel] Experimental: generate DBC-like bytecode in kernel binaries
To enable bytecode generation, toggle kEnableKernelBytecode flag at
the beginning of pkg/vm/lib/bytecode/gen_bytecode.dart.
This will also enable generation of bytecode in platform dill files.

Also, bytecode generation can be enabled using --gen-bytecode option of
pkg/vm/tool/gen_kernel.

In kernel binaries, the generated bytecode and constant pool are
placed into 'vm.bytecode' metadata attached to members.
pkg/vm/tool/dump_kernel tool can be used to disassemble
bytecode and print constant pool.

Differences between generated bytecode and original DBC are
described in pkg/vm/lib/bytecode/dbc.dart.

Format of constant pool is described in
pkg/vm/lib/bytecode/constant_pool.dart.

Currently, only a small subset of Dart language is supported.
Bytecode generator will not emit vm.bytecode metadata for a
member if its body has an unsupported operation.


Change-Id: I27d9a361dc779ea115e5676508ee757c1754e05d
Reviewed-on: https://dart-review.googlesource.com/49600
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-04-23 03:42:52 +00:00
Vyacheslav Egorov 375b32d621 [vm/compiler] Canonicalize more intermediate constants in IL.
* when building IL from Kernel use canonical double representation
instead of allocating new double objects;
* in constant propagation canonicalize immutable primitive constants
(strings, mints and doubles) before replacing instruction with its
constant value;

This relands 5909932d38 with the part
that was causing timeouts on flutter_test reverted.

See https://github.com/dart-lang/sdk/issues/32904 for more details.

TBR=aam@google.com

Change-Id: I0c128e44dd6c9689c4b7e9dd91832408214847f3
Reviewed-on: https://dart-review.googlesource.com/51460
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-04-20 16:59:49 +00:00
Aske Simon Christensen f06118ef8f Dart 2 fixes to various tests.
All fixes are related to the requirement that a concrete class must
implement its entire interface or have a non-trivial noSuchMethod
implementation.

Change-Id: I015e0565e5dd9cfa324c38bb43696e365c58329a
Reviewed-on: https://dart-review.googlesource.com/51880
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-04-20 12:57:19 +00:00
Ben Konyi cdb4a15732 [ VM / Kernel ] Implemented SourceFingerprint for Dart 2.
Change-Id: I567dda75b908895950329447fdf86df0d66b1984
Reviewed-on: https://dart-review.googlesource.com/50380
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2018-04-19 23:48:28 +00:00
Ryan Macnak 859a8748e0 Update status files to account for different type of failures in different modes.
Change-Id: Ibd808e8a7fd5ca2b33a63d4b9b16b371b11006ed
Reviewed-on: https://dart-review.googlesource.com/52080
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-19 23:18:08 +00:00
Ryan Macnak 66e66daf86 [fuchsia] Print error on failing fdio_ns_destroy instead of crashing.
Makes debug mode more useful.

Change-Id: Iccdb1be03d4abe23424cfb993c566fecb3d74ced
Reviewed-on: https://dart-review.googlesource.com/52021
Reviewed-by: Zach Anderson <zra@google.com>
2018-04-19 22:53:13 +00:00