Commit Graph

106 Commits

Author SHA1 Message Date
Alexander Aprelev 6b3abe0a98 [vm/concurrency] Add --experimental_enable_isolate_groups_jit flag, make --enable_isolate_groups AOT only.
Issue b/177800357.

TEST=existing test suite
Change-Id: Id6b113932ab7014b8fa6c105845c5c490b60f5e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181320
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-27 17:11:29 +00:00
Ryan Macnak b1c09ecd8f [vm] Make naming more consistent when converting between handles, tagged and untagged pointers.
Currently we have things called XPtr which are not what you get from ptr().

Old world:
handle->raw() returns RawObject* (tagged)
raw_obj->ptr() returns RawObject* (untagged)

After 6fe15f6df9:
handle->raw() returns ObjectPtr
obj_ptr->ptr() returns ObjectLayout*

New world:
handle->ptr() returns ObjectPtr
obj_ptr->untag() returns UntaggedObject*

TEST=ci
Change-Id: I6c7f34014cf20737607caaf84979838300d12df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149367
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-15 23:32:02 +00:00
Martin Kustermann 0f76981bb1 [vm/concurrency] Change references to class_table/object_store/heap from Isolate to IsolateGroup
As part of making the compiler and other subsystems independent
of `Isolate` we have to move various state from `Isolate` to
`IsolateGroup`.

The class_table and object_store were already moved to `IsolateGroup`.

This CL only replaces usages of `Isolate::{object_store,class_table}`
with the equivalent in `IsolateGroup`.

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

TEST=Pure refactoring - relying on existing test coverage.

Change-Id: I34a0682d715b054d6c5faff077a513980f59a348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177126
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-01-06 15:22:11 +00:00
Ryan Macnak a4637cd81d [vm] Build canonical string and type tables after reading snapshots.
Prevents snapshots from including canonical strings and types with no real uses and only referenced from the canonical tables.

Prep for constants not all being in the root snapshot during snapshot splitting, which is why we fill the table during load instead of rebuilding tables during snapshot writing.

Removes the size of the tables from the snapshot.
flutter_gallery_app_so_size (Pixel 2)        -1.618% 7967664 8098736
flutter_gallery_app_so_gzip_size (Pixel 2)   -2.724% 2980344 3063788
flutter_gallery_app_so_brotli_size (Pixel 2) -3.530% 2561824 2655566

Bug: https://github.com/dart-lang/sdk/issues/41974
Bug: https://github.com/dart-lang/sdk/issues/43319
Change-Id: I4f3b62da1cea9ee17caa965e809f16856518c9a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164102
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-09-23 19:13:29 +00:00
Ryan Macnak ac6095a7cc [vm] Hash strings by UTF16 code unit instead of by rune.
The VM hasn't had UTF32 strings for many years, and it is cheaper to hash by code unit. In particular, it is convenient for hashing two-byte strings while they are being deserialized.

Change-Id: Icad3b4e7a5292bd45b0ae4f12861cd1ed20bf9ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160180
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-09-17 18:56:33 +00:00
Regis Crelier c0c66ab10f Reland "[VM/nnbd] Canonicalize TypeParameter objects in the VM."
This is a reland of 6a98e2719e

Original change's description:
> [VM/nnbd] Canonicalize TypeParameter objects in the VM.
> 
> Prior to this CL, type parameters were all assumed canonical, even duplicate ones.
> 
> Per a new convention introduced in this CL, the type parameter array in generic classes and generic functions contains canonical type parameters. As these type parameters get cloned with a different nullability, they are inserted in a new hash table of canonical type parameters.
> 
> This fixes performance issue https://github.com/dart-lang/sdk/issues/41421
> 
> Change-Id: I9086158fa6b6261e9997bb50edec6d7c54abbfa1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148223
> Commit-Queue: Régis Crelier <regis@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: I4a42d0f9d53c2244b1a638432ed2cd6a055fa72a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150266
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-11 00:44:05 +00:00
Régis Crelier c48263e901 Revert "[VM/nnbd] Canonicalize TypeParameter objects in the VM."
This reverts commit 6a98e2719e.

Reason for revert: Unexpected test failures

Original change's description:
> [VM/nnbd] Canonicalize TypeParameter objects in the VM.
> 
> Prior to this CL, type parameters were all assumed canonical, even duplicate ones.
> 
> Per a new convention introduced in this CL, the type parameter array in generic classes and generic functions contains canonical type parameters. As these type parameters get cloned with a different nullability, they are inserted in a new hash table of canonical type parameters.
> 
> This fixes performance issue https://github.com/dart-lang/sdk/issues/41421
> 
> Change-Id: I9086158fa6b6261e9997bb50edec6d7c54abbfa1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148223
> Commit-Queue: Régis Crelier <regis@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I0ca3b6b66e2281c285eba6b564f78c0e6b2f2217
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150265
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-06-05 23:36:45 +00:00
Regis Crelier 6a98e2719e [VM/nnbd] Canonicalize TypeParameter objects in the VM.
Prior to this CL, type parameters were all assumed canonical, even duplicate ones.

Per a new convention introduced in this CL, the type parameter array in generic classes and generic functions contains canonical type parameters. As these type parameters get cloned with a different nullability, they are inserted in a new hash table of canonical type parameters.

This fixes performance issue https://github.com/dart-lang/sdk/issues/41421

Change-Id: I9086158fa6b6261e9997bb50edec6d7c54abbfa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148223
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-05 22:56:50 +00:00
Martin Kustermann 7706afbcf5 [vm/concurrency] Optimize access to symbol table & remove isolate-specific symbol lock.
The most common case is to access the symbol table in read-only mode
outside a safepoint. This CL ensures that this use case is fast.

Furthermore it fixes a potential issue where one thread accesses the
symbol table using exclusive access via RW lock and is half-way-through
updating the symbol table while another thread requests a safepoint
operation, and updates the symbol table.

There is a remaining TODO item to not hold a safepoint while allocating
a symbol.

It increases performance by 10x for e.g. vm/dart/isolates/fibonacci_call_test
(26 seconds to 2.6 seconds).

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

Change-Id: I0b4e26aaffc613bed336a8845d12b7c7ee84b146
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148323
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-05-19 12:10:20 +00:00
Ryan Macnak 6fe15f6df9 [vm] Represent tagged pointers as C++ value types instead of C++ pointer types.
This works around bugs in UndefinedBehaviorSanitizer and Clang.

Bug: b/28638298
Change-Id: I6be595f9664516019d28017d24559583a1ae3a21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144354
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-25 05:21:27 +00:00
Alexander Aprelev 9c4a322b08 Reland "[vm/isolates] Introduce fast isolate spawn in AOT."
This reverts commit 922ea3e9b6 in patchset 1, fix for assertion triggered in https://ci.chromium.org/b/8883214567628884960 in patchset 2, fix for deadlock around symbols table mutex in patchset 4.

Original commit description:

Speed up is achieved by sharing most of the dart code, object store
and class table between isolates in single isolate group. So
instead of bootstrapping isolate from the snapshot, isolate is
initialized by setting pointers to existing data structures already
set up for first isolate, and only few isolate-specific structures (moved
to newly introducted isolate_object_store) are created.

To allow for safe cross-isolate switchable call site, type test cache
mutations additional synchronization via RunWithStoppedMutators(that
relies on safepoints) was added.
Besides switchable call sites, no other mutation to the dart code is
done in AOT, which allows such sharing.

Bug: https://github.com/dart-lang/sdk/issues/37835
Bug: https://github.com/dart-lang/sdk/issues/36097
Change-Id: I655e337198214c9dfacbe76f7852b941b5a7e910
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143462
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-04-17 03:02:27 +00:00
Alexander Aprelev 922ea3e9b6 Revert "Reland "[vm/isolates] Introduce fast isolate spawn in AOT.""
This reverts commit fdd7a2c616 as there
seem to be sporadic dartkp crashes like https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-precomp-linux-product-x64/7454

Change-Id: I4218b8ff629630991ad1ff94f217489bb16228d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143383
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-04-14 20:37:29 +00:00
Alexander Aprelev fdd7a2c616 Reland "[vm/isolates] Introduce fast isolate spawn in AOT."
Original revert in patchset 1, fix for deadlock issue in patchset 2: avoid reentrant calls to RunWithStoppedMutator.
Further review comments addressed in successive patchsets.

This reverts commit 8ef508ba36.

Original commit description:

Speed up is achieved by sharing most of the dart code, object store
and class table between isolates in single isolate group. So
instead of bootstrapping isolate from the snapshot, isolate is
initialized by setting pointers to existing data structures already
set up for first isolate, and only few isolate-specific structures (moved
to newly introducted isolate_object_store) are created.

To allow for safe cross-isolate switchable call site, type test cache
mutations additional synchronization via RunWithStoppedMutators(that
relies on safepoints) was added.
Besides switchable call sites, no other mutation to the dart code is
done in AOT, which allows such sharing.

Change-Id: I6a0279d9812020ad7a5c2b7851980b6a29b95b9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143327
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-04-14 18:42:45 +00:00
Alexander Aprelev 8ef508ba36 Revert "[vm/isolates] Introduce fast isolate spawn in AOT."
This reverts commit 61c0960a8b as it broke
vm-kernel-win-release-ia32 buildbot test https://ci.chromium.org/b/8883214567628884960

Change-Id: I6377fd622a3c7d808f46fd9c541c64d343ecc269
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143260
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-04-12 15:59:41 +00:00
Alexander Aprelev 61c0960a8b [vm/isolates] Introduce fast isolate spawn in AOT.
Speed up is achieved by sharing most of the dart code, object store
and class table between isolates in single isolate group. So
instead of bootstrapping isolate from the snapshot, isolate is
initialized by setting pointers to existing data structures already
set up for first isolate, and only few isolate-specific structures (moved
to newly introducted isolate_object_store) are created.

To allow for safe cross-isolate switchable call site, type test cache
mutations additional synchronization via RunWithStoppedMutators(that
relies on safepoints) was added.
Besides switchable call sites, no other mutation to the dart code is
done in AOT, which allows such sharing.

Bug: https://github.com/dart-lang/sdk/issues/37835
Bug: https://github.com/dart-lang/sdk/issues/36097
Change-Id: I64c86525f4ef9cb30567a49a106bfe700355942b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136780
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-04-12 14:57:09 +00:00
Régis Crelier ebd9af9043 [VM/precompiler] Relax assert when compacting symbols (fixes #39298).
Canonical recursive types are not guaranteed to be unique.

Change-Id: Ic659f5e563c63ec8ee56dc0c9ae9a117fce8be07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125231
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-11-15 00:15:32 +00:00
Matthew Dempsky 4ce3aa7af1 [vm] Replace ^= assignments with = where possible
Change-Id: I04ac2e9c4b8bb654b7c660e728be3867aa4e1513
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100923
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Matthew Dempsky <mdempsky@google.com>
2019-05-01 00:04:44 +00:00
Ryan Macnak 971f4845d7 [build] Remove last platform -> vm and bin -> vm dependencies. Fix some ODR violations.
Change some static_libraries to source_sets to make ODR violations link-time errors.

This is needed to enable (stop suppressing) -fvisibility=hidden in Fuchsia product builds.

Change-Id: I699cec8d4b516beab9cebf9db0a522a7ff99e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99822
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-22 20:15:43 +00:00
Ryan Macnak fba89f9f64 [vm] Don't change the content of the VM isolate's snapshot based on what was loading into a core or app snapshot.
Ensures, by default, multiple core or app snapshots are capable of being loaded into the same process. Flags that affect stub generation can still create incompatibilities. A later CL will internalize VM isolate snapshot generation to the VM build and ensure compatibility.

Change-Id: I247063d5a3a611b04963b8e8ab2ac8a1f20ea57a
Reviewed-on: https://dart-review.googlesource.com/c/93962
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-26 19:04:50 +00:00
Ryan Macnak 3afac84840 [vm, aot] Remove KernelProgramInfo etc before Symbols::Compact.
Eliminates some symbols that were memory-reachable but not snapshot-reachable.

Compact the canonical type and type arguments tables along with the symbol table.


flutter_gallery, Android release
Total(CodeSize): 11158045 -> 11055480 (-0.92%)

Change-Id: I63bd1353906ea66c6f82a932cff57f7c25331200
Reviewed-on: https://dart-review.googlesource.com/c/92221
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-08 17:16:26 +00:00
Zichang Guo 5a0dd76be0 #35222 Return null and Print Error with invalid UTF8 input
Change-Id: Ic186d8139b6466cbace3db51c662ce8951462e89
Reviewed-on: https://dart-review.googlesource.com/c/87460
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2018-12-19 22:04:45 +00:00
Ryan Macnak 1a890ff07d [test] Dump symbol and type tables in determinism test.
Bug: https://github.com/dart-lang/sdk/issues/35092
Change-Id: I0647d8e4fe14a3ea19298dbe8b839f2db28755ab
Reviewed-on: https://dart-review.googlesource.com/c/84685
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-11-19 19:03:38 +00:00
Ben Konyi 07852532e3 [ VM ] Additional cleanup in Dart_Initialize and Dart_Cleanup
Change-Id: I6dc02b3d9de16cc176eb97613bc0c7f0bb9b16eb
Reviewed-on: https://dart-review.googlesource.com/77013
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
2018-09-28 23:18:59 +00:00
Ryan Macnak 9b5a931b06 [vm] Replace most runtime/vm uses of OS::Print with OS::PrintErr.
Leave --print-snapshot-sizes on stdout because it is parsed by Flutter benchmarks.

Replace all runtime/bin uses of OS::Print with Log::Print.

Bug: https://github.com/dart-lang/sdk/issues/32134
Change-Id: I74aacfb410cdfa9270d06e7f6ab0534520c7c7ba
Reviewed-on: https://dart-review.googlesource.com/60021
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-13 19:51:40 +00:00
Ryan Macnak 558a931409 [vm] Move some string utils from runtime/vm to runtime/platform.
Change-Id: I552086445a7e07792f9da85afa5edf23b6c450d5
Reviewed-on: https://dart-review.googlesource.com/44402
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-01 02:07:46 +00:00
Ryan Macnak 9174a627f5 [vm, gc] Ensure BackgroundCompiler can't be deleted during a safepoint.
Previously, the background compiler was deleted by the thread pool, which could have raced ahead of the mutator clearing its reference. Now it is deleted by the mutator.

Change-Id: Id353a96022f699131ee60fe31156cd0404dfd285
Reviewed-on: https://dart-review.googlesource.com/24342
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-30 22:59:51 +00:00
Erik Corry ae2d84e51e VM: Speed up output of UTF8 for 1-byte strings.
For 1-byte strings we don't need the full power of UTF-8 conversion with
support for 3 and 4-byte sequences and reassembly of UTF-16 surrogate pairs.

This optimization was originally intended to improve the reverse-complement
benchmark.  It also seems to have a positive effect (ca. 1% on average) on
dart2js.

After implementing this it doesn't seem worth having a special case in
ToCString for ASCII strings. That special case would allocate the string twice
for all Latin1 strings, which feels unfortunate.

R=vegorov@google.com

Bug:
Change-Id: If852f3ecb4e06118da8357cfa2c843ad0df0edb9
Reviewed-on: https://dart-review.googlesource.com/8920
Commit-Queue: Erik Corry <erikcorry@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-23 10:43:59 +00:00
Zachary Anderson 09456bfb6f [vm] Reset vm isolate symbol table load factor
fixes #30371

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2999743002 .
2017-08-09 10:03:52 -07:00
Ryan Macnak 466385ceb6 [vm, gc] Require a safepoint for heap iteration.
Assert a safepoint operation can only be started from a thread in the VM state. Fix several unit tests missing a native-to-vm transition.

R=asiva@google.com, danunez@google.com

Review-Url: https://codereview.chromium.org/2995543004 .
2017-08-07 17:51:25 -07:00
Zachary Anderson c4b821cc81 [vm] Higher vm snapshot symbol table load factor
This saves a bit less than 100KB in memory footprint in hello world
on Fuchsia's content handler:  3640KB -> 3552KB

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2989283002 .
2017-08-04 09:22:40 -07: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
Ryan Macnak dcb1d51f33 Compact the symbol table when creating core snapshots or JIT app snapshots.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2638173002 .
2017-01-19 10:49:24 -08:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Ryan Macnak 326af5e9d7 Move Zone's destructor out of a header file.
This unburdens users of StackZone from needing to include handles_impl.h. A new use of StackZone was recently added to heap.cc without a include of handles_impl.h, and this caused link-time errors on some versions of gcc.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2362573002 .
2016-09-22 13:16:36 -07:00
Ryan Macnak 1e8fdaee68 Support for taking full snapshots from 'dart', not just 'dart_bootstrap'.
- Don't create rival copies of the predefined symbols in isolates in dart_bootstrap.
 - Don't do work to save these rival copies during symbol table compaction.
 - Create unified symbol table just before writing the vm isolate.
 - Create unified list of scripts to include in the vm isolate.
 - Ignore object ids of the old vm isolate when writing a new one.
 - Ensure token stream private keys are hashed.
 - Use the type of isolate we are writing instead of an object's current isolate to decide if vm isolate objects are written symbolically.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1944213002 .
2016-05-10 10:13:33 -07:00
Siva Annamalai 29d79258f1 Fix precompile build issue with IsString change.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1953803003 .
2016-05-05 12:53:02 -07:00
Siva Annamalai 65c4aaee17 - Add a new constructor to the hash table classes that allow handles to be passed in instead of creating new ones for every lookup/insertion
- Use reusable handles in Symbols::New and Symbols::Lookup with the new constructor defined above

R=hausner@google.com

Review URL: https://codereview.chromium.org/1934263003 .
2016-05-02 17:07:31 -07:00
Siva Annamalai fc3156db11 Add usage and collision details to the hash table data structure in order to determine effectiveness of the hash function.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1882763002 .
2016-04-13 09:08:52 -07:00
Ivan Posva 80f0f13fcd - Streamline comparisons in symbol table.
- Avoid String::Equals method which considers the canonical bit.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1885433002 .
2016-04-12 15:03:24 -07:00
Siva Annamalai 5828e3eb6f Provide a mechanism for naming a hash table so that it can be used in DumpStats to identify the table.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1873283003 .
2016-04-12 13:38:08 -07:00
Ivan Posva 23a4e3da53 - Ensure that we do not enter symbols twice: Set the canonical bit
on a String once we know it is canonical.
- Bug fix in hash set implementation.

BUG=

Review URL: https://codereview.chromium.org/1876363003 .
2016-04-11 22:05:43 -07:00
Ivan Posva 5be5d54529 - Refactor Symbol allocation to expect a thread parameter.
- Preallocate all tokens as symbols to avoid repeated lookups.
- Pass thread/zone where useful while doing this change.
- Avoid allocating symbols for error messages.

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1870343002 .
2016-04-11 16:28:29 -07:00
Srdjan Mitrovic 40d8eee81e Remove unnecessary isolate argument from some visitors
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org/1838373002 .
2016-03-29 14:47:51 -07:00
Siva Annamalai 5322692506 Add a SafepointMutexLocker class so that it is possible to have scopes inside the MutexLocker which could potentially trigger safepoints.
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1717803002 .
2016-02-19 16:03:52 -08:00
Ivan Posva 9c0c6cb5c2 Add product mode:
- Add PRODUCT define and build mode to gyp configurations.
- Add product mode to test harness.
- Start to unify list of flags.
- Allow flags to be constant for particular build configurations.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1663863002 .
2016-02-03 21:10:30 -08:00
Ryan Macnak c7efe5a756 Precompilation: compact the symbol table.
Also, don't leak handles out of the precompiler.

dart2js/x64:
symbols 62126 -> 38668 (-37.8%)
snapshot 22534723 -> 21740838 (-3.5%)

R=asiva@google.com

Review URL: https://codereview.chromium.org/1638143002 .
2016-01-28 10:23:14 -08:00
Srdjan Mitrovic 8d618766a8 Remove isolate argument from handle allocation: Part II
BUG=
R=regis@google.com

Review URL: https://codereview.chromium.org/1389353004 .
2015-10-12 14:06:50 -07:00
Srdjan Mitrovic 771f2dfb52 Symbols::NewFormatted and old space allocation.
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1322973006 .
2015-09-04 10:59:28 -07:00
Srdjan Mitrovic d4365bc6f4 Lookup getter/setter symbols before alllocating them, thus eliminating extra String allocations in new space.
Various old space allocations, cleanups.
Add a test for Symbols concatenation.

BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1320673012 .
2015-09-03 14:09:34 -07:00
Ivan Posva 6446cc5096 - Do not access the first character in zero-length strings.
- Make sure to print all 64-bits of the Dart_Port if necessary.

R=ricow@google.com

Review URL: https://codereview.chromium.org//1326853003 .
2015-09-02 23:22:16 -07:00