Commit Graph

13561 Commits

Author SHA1 Message Date
Alexander Aprelev 76163a9f4a Release kernel_program after we are done reloading the script
Bug: dartbug.com/30691
Change-Id: I9071ccae92162a47deeedb3f6655c637227a0e9f
Reviewed-on: https://dart-review.googlesource.com/5880
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-14 17:03:48 +00:00
Ryan Macnak ad7780d5c3 [vm] Ensure IMMEDIATE operations on Isolate.current take effect before returning to Dart code.
Change-Id: I18ced559a9eb0d4c93d98f82014892a15667d608
Reviewed-on: https://dart-review.googlesource.com/5600
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-14 16:53:34 +00:00
Carlo Bernaschina baffc87a7e Update memory dashboard
- Fix crash related to missing nodes in Heap Snapshot
- Disabled update on GC. With the new idle GC the page was updating too
  often.

Change-Id: I8a3aaf9540ff224a5e8119303c8e8ef79e8a73f1
Reviewed-on: https://dart-review.googlesource.com/5327
Commit-Queue: Carlo Bernaschina <cbernaschina@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-14 02:43:20 +00:00
Todd Turnidge 979bc2a634 Don't try to get inlined functions from the "megamorphic miss" function.
Closes #30584

Change-Id: Ibfb2f12c84002da2f6572877a4bd3bc5e677d363
Reviewed-on: https://dart-review.googlesource.com/5503
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Todd Turnidge <turnidge@google.com>
2017-09-13 21:35:49 +00:00
Alexander Aprelev 1fe2e4ffd1 Introduce callback parameter for Dart_ReadKernelBinary that would free kernel memory.
This is needed to support cases where memory with kernel binary was
allocated outside of Dart VM(for example, in Flutter Engine) has to be
released using appropriate mechanism too.

Bug:
Change-Id: I863db9e5a33469ba8fb5c1f8789c6498ddfbb385
Reviewed-on: https://dart-review.googlesource.com/5121
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-13 04:37:07 +00:00
Konstantin Shcheglov cb2fba6dbc Serialize and print typedef annotations.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com

Bug:
Change-Id: Icb3a4452603753de645b3fb4280152799f26bb61
Reviewed-on: https://dart-review.googlesource.com/5323
Reviewed-by: Paul Berry <paulberry@google.com>
2017-09-13 03:56:49 +00:00
Ryan Macnak 2d698cc4d0 [reload] Rehash constants before running new initializers.
Use of constants before rehashing can result in duplicate "canonical" constants.

Change-Id: I48c008b269267461c30933002c5a5e57005dfef5
Reviewed-on: https://dart-review.googlesource.com/5282
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-09-12 22:00:21 +00:00
Zachary Anderson 2275b6531f [Fuchsia] Use SSL_CTX_set_default_verify_paths() for trusted root certs
Change-Id: I72b6eaa1dde0b02d1db1d380d187e46b9499a6f4
Reviewed-on: https://dart-review.googlesource.com/5297
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-12 21:27:03 +00:00
Erik Corry 8b95626a11 [VM] Fix name of field offset function in kernel reader
R=vegorov@google.com

Cosmetic fix: Previously used offset of a different field that was
coincidentally at the same offset.
Bug:
Change-Id: I5a5c983b00b44b4eabbdfc91d9ed3931c89aa67a
Reviewed-on: https://dart-review.googlesource.com/5264
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2017-09-12 21:10:11 +00:00
Erik Corry 06abc845ea [VM] Fix x64 assembler for subl immediate instruction
R=regis@google.com

Bug:
Change-Id: I8344bce9b7b4bbafc48df98b7c212084826f5372
Reviewed-on: https://dart-review.googlesource.com/5221
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Erik Corry <erikcorry@google.com>
2017-09-12 21:08:51 +00:00
Zachary Anderson 15ba173993 [Fuchsia] Rename MG-nnn -> ZX-nnn
Change-Id: Ia84cd53ef3dcfd13a7feb22178583e00705a4e4b
Reviewed-on: https://dart-review.googlesource.com/5290
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-12 20:28:12 +00:00
Alexander Markov 0af232924c [VM, Compiler] Add initial implementation of check null instruction
This CL introduces new IL instruction, CheckNullInstr, for testing
if an object is null. This instruction will be used to ensure
correctness when AOT relies on strong mode types, which are nullable
by default (unless proven otherwise).

Code generation of CheckNullInstr is implemented without major code
duplication between different CPUs using common macro-assembler
pseudo-instructions implemented by all platforms.

Also, code generation of GenericCheckBoundInstr is refactored in
the similar way.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: I35e9b556302fe7db98ce5167b3601f08ddbee642
Reviewed-on: https://dart-review.googlesource.com/4540
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-12 19:25:43 +00:00
Beeravolu Siva Chandra Reddy 33226b3055 [kernel] Ignore invalid dependencies when populating library imports/exports.
Bug:
Change-Id: If33b8a68b0ac939f06ba305284915bef1c7d55a0
Reviewed-on: https://dart-review.googlesource.com/5203
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2017-09-12 17:23:21 +00:00
Zachary Anderson 3470145529 [Fuchsia] Update to use new tracing API
Change-Id: Ied0bc594fe16f427be10444ad5739a30b7003acc
Reviewed-on: https://dart-review.googlesource.com/4062
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-12 16:42:07 +00:00
Régis Crelier 6614090f44 [VM generic functions reification] Emit code checking that the correct number of
type arguments are passed to generic functions, when this could not be checked
as part of the function resolution.
The error message printed from a thrown noSuchMethodError does not yet properly
reflect this kind of mismatch. It will be improved in a later cl.
The Invocation class has previously been updated so that noSuchMethod is already
able to process such mismatch.

Change-Id: I81a2966195593dc0d158a322f2a2a2219d225e78
Reviewed-on: https://dart-review.googlesource.com/5080
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-12 16:31:23 +00:00
Beeravolu Siva Chandra Reddy 4461c99c7c [kernel_loader] Reset show/hide names when loading imports and exports.
This missed in https://dart-review.googlesource.com/4381

Change-Id: I9d1bc8ec2a59bb6b39e423c32759fc04cd3bcf7c
Reviewed-on: https://dart-review.googlesource.com/5202
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-12 16:01:51 +00:00
Aske Simon Christensen 7eedcb71d1 Omit kernel data from AOT snapshot
Omit kernel function bodies when writing AOT snapshot. Saves 2.7MB (16%) on the snapshot size of Flutter Gallery.

Bug: https://github.com/dart-lang/sdk/issues/30616
Change-Id: I7ab40d13e43607fe7c68670f8e923807b9cea37f
Reviewed-on: https://dart-review.googlesource.com/5220
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Siva Chandra <sivachandra@google.com>
2017-09-12 13:26:31 +00:00
Vyacheslav Egorov 7259407f75 [VM] AllocationSampleBuffer constructor needs to NULL initialize free_sample_list_
Fixes https://github.com/dart-lang/sdk/issues/30668
Change-Id: I066478182c890fea199230047e31e111ad455704
Reviewed-on: https://dart-review.googlesource.com/5180
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-09-12 10:51:21 +00:00
Beeravolu Siva Chandra Reddy 004a515217 Populate library imports and exports when loading library from kernel.
Change-Id: If6cc94aa186948caa8798212d6161da650ff2d8e
Reviewed-on: https://dart-review.googlesource.com/4381
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-12 10:44:49 +00:00
Zachary Anderson 80d64d22c2 [standalone] Fix -D parsing leak
Change-Id: I39e398a0343b77238fbcab630bf8d64564a743ef
Reviewed-on: https://dart-review.googlesource.com/5040
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2017-09-11 21:49:54 +00:00
Vyacheslav Egorov c25ebfff96 [VM, Platform] Allow assigning names to mutexes.
Use this name when reporting errors.

We need this sort of debug information to better understand Isolate shutdown races like one in https://github.com/dart-lang/sdk/issues/28549

Bug: https://github.com/dart-lang/sdk/issues/28549
Change-Id: I24f27b4eef4faf4b2f80f82b269d88a6e5c3880b
Reviewed-on: https://dart-review.googlesource.com/4721
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-11 19:17:46 +00:00
Zachary Anderson d7845c6a6f [standalone] Clean up command line argument parsing
fixes #30534

Change-Id: I5e721e5d24de32f0cb85f7bd96890913cf788f81
Reviewed-on: https://dart-review.googlesource.com/4608
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-09-11 18:58:39 +00:00
Alexander Markov 48f76f6b41 [VM, Compiler] Refactor and reuse token kind recognition
This CL moves method token kind recognition from kernel_to_il.cc
to method_recognizer.cc and reuses it in aot_call_specializer.cc.
Also, similar code in il.cc (TryFastPathSmiOp) is refactored to use
token kind.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: Ic7e75537259732daf2f87bce334deccf194bbca3
Reviewed-on: https://dart-review.googlesource.com/4602
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-09-10 23:54:03 +00:00
Alexander Markov 691845c4dc [VM, Compiler] Optimize certain operations using strong mode types
This CL is a draft implementation of optimizing 'is', int and double
operators using statically known strong mode types in Dart VM AOT.
As of now, not all cases are handled and null checks are not inserted
(required for correctness). The new logic is added under
--experimental-strong-mode flag.

The primary reason for submitting this code is to keep up with ongoing
refactoring of Dart VM compiler.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: Ia441fa3e346a184a1e5c87d0749aec652e2cde0a
Reviewed-on: https://dart-review.googlesource.com/4144
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-09-08 16:50:32 +00:00
Jens Johansen 8b1deeb02b Don't reuse va_list on Android
Before it was used twice (to write to stderr and to forward to logcat.)
The result: The logcat one (which is what you actually get when running
on Android) prints arbitrary data.

Now it only forwards to logcat and the output is as expected.

Bug:
Change-Id: I12eecab93f883164765711994ab7f014030bf3a0
Reviewed-on: https://dart-review.googlesource.com/4422
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-09-08 14:37:32 +00:00
Zachary Anderson fc41a57a93 [dart:io] Allow an embedder to disallow certain operaions
Fuchsia's Dart and Flutter content handlers share the implementation of
dart:io with the command line embedder, but would like to disable
some operations that don't make sense for them, like exiting thoe whole
process, which may be hosting multiple unrelated Isolates.
Change-Id: I825ece49c685471ff85802873b1c0f974c507aed
Reviewed-on: https://dart-review.googlesource.com/3687
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-08 05:02:07 +00:00
Carlo Bernaschina 7b56ef96e2 Fix include path for aot_call_specializer.h
While the path runtime/vm/compiler/... works in the Dart-SDK the Flutter
Engine build was not able to find the correct file.

TBR=rmacnak@google.com

Change-Id: I6b15ebd55e70928fbd1ed689583b4756e2efb6c6
Reviewed-on: https://dart-review.googlesource.com/4201
Reviewed-by: Carlo Bernaschina <cbernaschina@google.com>
2017-09-08 00:50:54 +00:00
Carlo Bernaschina 84b2323e6c Fix memory leak in TimelineEventArguments
TBR=zra@google.com

Change-Id: I0bc8d4da9d38e9deb459ffe7cce5703184546f62
Reviewed-on: https://dart-review.googlesource.com/4240
Reviewed-by: Carlo Bernaschina <cbernaschina@google.com>
2017-09-07 23:00:22 +00:00
Ryan Macnak 8e89cd046f [gen_snapshot] Allow blank lines and shell-style comments in entry point manifests.
Change-Id: I7074e2bd16c951c978bbdd90defd7af2d7978791
Reviewed-on: https://dart-review.googlesource.com/3760
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-07 21:52:06 +00:00
Carlo Bernaschina bf358a7c27 Add searchBar to VirtualCollections in Observatory
With CTRL+F (or CMD+F on Mac) virtual-collection elements properly
configured with a search helper will show a search bar which allows to
navigate between the results of the current query.

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

Change-Id: Ia18207b1cb451a39f314a3477a38a2337ca73f8b
Reviewed-on: https://dart-review.googlesource.com/3860
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-07 20:54:44 +00:00
Carlo Bernaschina 0e32851cfd Add Timeline Dashboard hidden page in Observatory
- Refactoring of the TimelinePage in order to remove the
  dependencies from the Service objects.
- Implemented TimelineRepository to abstract the communication layer
- Structured new TimelineDashboardPage with simplified UI and event
  filtering

The VM returns lists of events which are forwarded to Catapult.
Some events are white-listed for the common user.
Due to limitations in the way the events are generated the only way to
attach the white-list flag to the events is by adding an extra argument.
By setting the hash of timeline.html to #basic we inform JavaScript that
we require the activation of the filter which forwards just the events
white-listed to Captapult, while preserving all the others during
dumping operations.

See https://docs.google.com/document/d/1sDKI3ROYM1ORaKhelt063ayfveF_6WC8aq9MiqHjYBs/edit#

Change-Id: I38435d8d32f37305ce3c366daf55f82e8287959d
Reviewed-on: https://dart-review.googlesource.com/3346
Commit-Queue: Carlo Bernaschina <cbernaschina@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-07 20:38:19 +00:00
Vyacheslav Egorov d6eb8c6c27 [VM, Compiler] Deduplicate JIT and AOT call specializing passes and rename them.
Originally these passes were a single confusingly named flow_graph_optimizer
pass, they later were completely split by duplicating flow_graph_optimizer
twice as jit_optimizer.cc and aot_optimizer.cc and tweaking them in few
places.

Duplication has been done in anticipation that these passes will diverge
considerably, however simple diffing reveals that in 2 years they have
not actually diverged much at all.

Diffing also reveals numerous bugs and inconsistencies between jit_optimizer
and aot_optimizer.

It does not make sense to keep these files duplicated so this change merges
them back together - extracting most of their common behaviour into
CallSpecializer base class.

The separation is not entirely clean - for simplicity we introduce
the knowledge about precompiled_mode into CallSpecializer base class.

You can look for FLAG_precompiled_mode and FLAG_use_field_guards in the
call_specializer.cc to see where base class has to be aware about both AOT and
JIT mode.

This change also renames XyzOptimizer to XyzCallSpecializer because the main
optimization these classes were doing was specialization of calls based on
type feedback or inferred types.

Bug: https://github.com/dart-lang/sdk/issues/30575
Change-Id: I0b062c4b7549d08b1bee9303d92a3fb549f54e21
Reviewed-on: https://dart-review.googlesource.com/3640
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-07 16:52:54 +00:00
Carlo Bernaschina 9f545cd315 Do not combine by default in allocations profile
Change-Id: Idaf9de685f7c0473d4e0a597959e6bca0df6077b
Reviewed-on: https://dart-review.googlesource.com/3823
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-07 01:06:44 +00:00
Régis Crelier e0300086d1 [VM precompiler generic functions] Fix previous bad commit.
Generic functions cannot be called via monomorphic checked entries, because
the argument descriptor is lost. This limitation was removed by error and not
properly tested. It is reintroduced in runtime_entry.cc.
Changes in other sources are merely clean up and non-critical.

Change-Id: I7967950c1ad008b50e8691d59f4a9d5cd1c9f885
Reviewed-on: https://dart-review.googlesource.com/3761
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-06 23:27:36 +00:00
Jens Johansen bb33a42e72 [kernel] Give random access to included source
Before this CL to read the source (and line endings etc) for a specific
file index, one had to read at least part of the data for all previous
file indexes (e.g. read all the line endings).

This CL introduces an index to the included sources meaning that we have
random access based on file id, i.e. can go to the data concerning a
specific file id in constant time.

Benchmarks run with "time python tools/test.py -m release -cdartk language -j6"
shows that - of 5 runs - the runtime has changed as follows:

real: -3.93% +/- 1.03%
user: -3.41% +/- 0.54%
sys: No difference at 95%

(statistics by math stolen from ministat)

So it is ~4% faster to run the language tests (with above command),
shaving approximately 9 seconds off the real runtime.

Change-Id: I9e60a16958356b16b3da0bf6c01ffc5619deb976
Reviewed-on: https://dart-review.googlesource.com/3180
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-06 11:59:17 +00:00
Jens Johansen 3e599229b9 [kernel] Don't scan strings up front when serializing.
Currently serializing the ast for kernel is done in two passe:

1) Scan the program to find and index all strings. These are then
   sorted based on frequency and assigned an id. All string-
   references are refering to that id. As small numbers use less
   space in the binary than big numbers, sorting the numbers by
   frequency saves a certain amount of space.
   In addition the string indexing is "hijacked" for the
   "LimitedBinaryPrinter" to also perform some CanonicalName
   re-indexing.

2) We then serialize the entire thing.

This CL gets rid of a pass by not indexing the strings up-front.
Whenever it is asked to serialize a string it adds it to the index
(if not already there). The serialization is otherwise the same.
This means that:

1) Strings are not sorted by frequency, i.e. the binary output size
   can by bigger (numbers below).

2) The stringindex and canonical names are moved to the end of the
   binary instead of the front. As we still need it up front for
   deserialization some additional data is added to the
   ProgramIndex.

3) The "hijacking" done in "LimitedBinaryPrinter" is replaced by
   an alternative.

4) We don't spend time on walking the tree twice.

The cost is the binary size. Compiling helloworld with fasta,
as well as looking at outline.dill, platform.dill and
vmservice_io.dill reveals these numbers:

* helloworld.dill is 0.657248732% bigger (26573 bytes)
* outline.dill is 1.686911399% bigger (9395 bytes)
* platform.dill is 0.657062238% bigger (26565 bytes)
* vmservice_io.dill is 0.44991899% bigger (19147 bytes)

The cost does thus not appear to be very big.

The gain is the serialization time.

From 20 runs of an instrumented VM/serialization, running numbers
through calculations stolens from ministat
(https://www.freebsd.org/cgi/man.cgi?query=ministat) reveals the
following:

* Serialization time: -21.69% +/- 1.44%

* Total time spend in relevant parts of bootstrap_nocore.cc,
dart_api_impl.cc (Dart_LoadKernel), bootstrap_nocore.cc,
dart_api_impl.cc (LoadKernelProgram) as well as serialization:
-14.01% +/- 1.58%

From 5 runs of
"time python tools/test.py -m release -cdartk language -j6"
(again run through ministat calculations):

* real: -4.18% +/- 0.5%
* user: -4.2% +/- 0.29%
* sys: No difference at 95%
* user+sys: -3.3% +/- 0.36%

Change-Id: I1c220eac083496994f0a9f1e2a2445b3707c9a93
Reviewed-on: https://dart-review.googlesource.com/2880
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-06 11:55:16 +00:00
Alexander Thomas 9278d252e7 Re-enable Mac try builders
Skip tests failing on CQ but not on buildbot
Replace some timeouts with skips to speed up the tests

Bug:
Change-Id: I101e922bd18e522d0efd69cdf8329e2ca8f9829e
Reviewed-on: https://dart-review.googlesource.com/2920
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2017-09-06 09:46:14 +00:00
Régis Crelier beedd2e103 [VM generic function reification] Fix megamorphic cache lookup when calling
reified generic function.
Clean up code to avoid similar issue in the future, i.e. make it clear whether
the passed type argument vector is counted or not by using better names.

Change-Id: I60fd6f6acb302235d8c1ae4f2bc4bf459724421e
Reviewed-on: https://dart-review.googlesource.com/3400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-06 00:36:19 +00:00
Carlo Bernaschina 36226f722e Restore default tcp port in Observatory
Change-Id: I94174685918c584c8b9f4b0448e5c46bcbfdaa9f
Reviewed-on: https://dart-review.googlesource.com/3360
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-05 22:14:27 +00:00
Ryan Macnak eb565009aa [vm] Fix iOS ARM32.
Change-Id: I5cc7a30767b149e35d2415ed0cd54bdf12b5fdf0
Reviewed-on: https://dart-review.googlesource.com/3380
Reviewed-by: Zach Anderson <zra@google.com>
2017-09-05 21:15:28 +00:00
Zachary Anderson 05dc2936bb [Fuchsia] Update include path for netconfig.h
Change-Id: I0853256e0684d2c312d8d8747c203ba9adb36e72
Reviewed-on: https://dart-review.googlesource.com/3308
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-09-05 19:23:09 +00:00
Alexander Markov 5f886940c4 [vm] Add more assertions to compiler
This CL adds a couple of new assertions to the compiler:

1. Check for 'use_speculative_inlining' in FlowGraphCompiler::AddDeoptStub
enables early detection of the deopt path generation in AOT.
Although this condition is also detected later (in precompiler),
it is much more obvious and easy to debug it with early assertion
failure, pointing directly to the place which triggered deopt generation.

2. Check register assignment in UnboxInstr::EmitLoadFromBox() for ia32
and 32-bit arm to ensure the correctness of generated code.

Also, this CL includes minor refactoring of UnboxInstr::ComputeCanDeoptimize()
to more closely match UnboxInstr::EmitNativeCode().

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: Icf6129d54f3da50c043aab84e5e3ee524c264aec
Reviewed-on: https://dart-review.googlesource.com/3305
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-09-05 18:35:37 +00:00
Ryan Macnak 0eb98b32b7 [vm] Remove dead flag --heap_growth_rate.
Change-Id: Ie3e9a8025786aacb83d6bb89b72ee38509943d31
Reviewed-on: https://dart-review.googlesource.com/3304
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-05 18:23:25 +00:00
Ryan Macnak a456515c6e [ios] Use mach_absolute_time instead of boot time for the monotonic clock.
Allows for direct conversion between ftl::TimePoint and Dart_TimelineGetMicros().

Change-Id: I253c9f109f9b80f86aee8e8ed5202a4d6e8b7a85
Reviewed-on: https://dart-review.googlesource.com/3301
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-05 16:49:35 +00:00
Erik Ernst 5e4e734f4a Adjusted status cf. https://github.com/dart-lang/sdk/issues/30621
Change-Id: Ia53c6863d4514f90b89649bc40e77ddec233f8fc
Reviewed-on: https://dart-review.googlesource.com/3122
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-09-05 09:45:27 +00:00
Vyacheslav Egorov 8a179fb953 [VM, Compiler] Move compiler to a separate folder.
New folder structure (nested under vm/):

- compiler/
-   jit/         - JIT specific code
-   aot/         - AOT specific code
-   backend/     - all middle-end and back-end code (IL, flow graph)
-   assembler/   - assemblers and disassemblers
-   frontend/    - front ends (AST -> IL, Kernel -> IL)

compiler/README.md would be the documentation root for the compiler
pipeline

Bug: https://github.com/dart-lang/sdk/issues/30575
Change-Id: I2dfd9688793bff737f7632ddc77fca766875ce36
Reviewed-on: https://dart-review.googlesource.com/2940
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-09-04 15:15:18 +00:00
Jens Johansen cac814a203 [kernel] Don't output a -1 token position, it will crash observatory.
Before this, for instance clicking on "dart:async" under "libraries"
would give a stacktrace and not show the source of "dart:async".
The cause was a "no position" (-1) mapping to column 0
(in what is supposed to be a 1-indexed world), thus becomming -1 in a
0-indexed world, being passed as the start index to indexOf yielding
an out-of-range exception.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/3005113002 .
2017-09-04 13:29:36 +02:00
Jens Johansen e1d7e33aad [kernel] const constructor type arguments
```
class A<T> {
  const A();
  Type get type => T;
}

class B extends A<String>{
  const B();
}

main() {
  print(const B().type);
}
```

Should print "String".
Before this CL it printed "dynamic", now it prints "String".

See dartbug.com/30588 for more information.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/3007123002 .
2017-09-04 13:24:27 +02:00
Aske Simon Christensen 8cb752f73b Revised "Eliminate dependencies on assemblers and code stubs in precompiled runtime."
Explicitly clear unbox_numeric_fields flag in PRODUCT builds. Fixes code bloat introduced by previous CL. New changes in Patch Set 2.

BUG= https://github.com/dart-lang/sdk/issues/30045
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/3006923002 .
2017-09-04 13:13:26 +02:00
Erik Corry aa1a9ef686 [VM-GC] Add a flag to abort on allocation failure
This is added to help investigate memory usage. By setting an
old-space limit with --old-gen-heap-size and setting the new
--abort-on-oom it is possible to test whether a program can
run in a certain size. Using binary search one can determine
what the minimum size is. Without this flag the VM will slow
down to a crawl when it tries to exceed its heap limit.
R=vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2995063002 .
2017-09-04 12:32:30 +02:00