Commit Graph

11 Commits

Author SHA1 Message Date
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
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson 2e4dfd3a2d clang-format runtime/lib
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2468093007 .
2016-11-04 12:14:41 -07:00
Florian Schneider caceddba8f VM: New, faster default Map construction.
Replace the C++ implementation of the default Map constructor with a
Dart version that uses the existing native setters to initialize members.

This avoid the expensive runtime transition when doing "new Map()".

BUG=#26046
R=asiva@google.com

Review URL: https://codereview.chromium.org/2278273003 .
2016-08-25 17:51:45 -07:00
Daniel Andersson ea46192ca3 VM-internalize the default Map implementation.
Make the compact linked hash map, which is the default implementation for Map
(including map literals), a VM-internal class.

This makes it easy to have more efficient serialization of maps (although for
now, the implementation is straight-forward).

Refactor the compact hash class hierarchy to enable the VM-internal class and
the rest (also the Set classes) to share a maximal amount of code, by using
two different bases for implicit/explicit fields.

Remove existing proof-of-concept, C++-based internal VM-class.

BUG=http://dartbug.com/22982
R=asiva@google.com

Review URL: https://codereview.chromium.org//1151523002
2015-05-28 09:32:54 -07:00
koda@google.com 784c1e4f88 Replace Linked{Identity,Custom}Hash{Map,Set} with compact implementation; remove old code and flag.
R=iposva@google.com

Review URL: https://codereview.chromium.org//983703003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44294 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-06 15:13:01 +00:00
koda@google.com 574028165f Ensure hash pattern is non-zero. Re-enable compact hash map/set.
BUG=dart:22520
TBR=vegorov@google.com

Review URL: https://codereview.chromium.org//946893002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43940 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-22 03:04:35 +00:00
koda@google.com 018ec1cb83 Temporarily disable compact hash map/set to see whether it fixes Dart2JS flaky faliures.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//942003004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43921 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-20 17:27:06 +00:00
koda@google.com c6e3dd73c2 Default to compact Map/Set implementation.
Also adjust unit tests accoringly to maintain coverage, and remove some redundant ones.

R=iposva@google.com

Review URL: https://codereview.chromium.org//936613007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43894 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-19 21:28:56 +00:00
koda@google.com 1d7ca12fdc Compact LinkedHashMap/Set implementation.
Add GC-friendly replacement for default Map/Set:
* open-addressing hash table, avoiding the overhead of chained entries
* index separate from the keys/values, allowing more of it to fit in the cache
* new keys are always appended, to allow insertion-order iteration
* spare bits in index entries are used to store hashes
* index is typed data, so can be ignored by GC

Enable it with --use_compact_hash (disabled by default).

Reduces Dart2JS compilation time for huge codebase (N=200) by ~30%, due to reduced time in GC. Slightly slower for small maps and maps with deletions: json benchmarks regress by ~5%.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//915323002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43840 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-18 13:58:32 +00:00
koda@google.com 1cdcb12b4e Add VM class for Map/LinkedHashMap.
Introduces a new internal class for the most common case, the default Map.

Passes all functionality tests.
Slow: Dart side simply calls into runtime for now.
Hidden behind "--use_internal_hash_map".

Add copies of hash map tests to exercise this implementation.

R=asiva@google.com

Review URL: https://codereview.chromium.org//380333002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38588 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 20:04:11 +00:00