Commit Graph

60 Commits

Author SHA1 Message Date
Paul Berry 23d3baddb6 Update source fingerprints for min and max functions.
This should fix debug build failures after 3e85ad23cf.

Change-Id: I05797004359bb88007077b5176aaa9499a2162bc
Reviewed-on: https://dart-review.googlesource.com/18519
Reviewed-by: Alan Knight <alanknight@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-11-03 23:12:34 +00:00
Martin Kustermann 56050f47fb [VM] Let FlowGraphTypePropagator know that LinkedHashMap.index is kTypedDataUint32ArrayCid
Now that we do eager rehashing of linked hashmaps we no longer have the
index field be `null` (which in the past signaled we needed rehashing).

This means we can teach the optimizer that loads from the index fied
always result in kTypedDataUint32ArrayCid.

Change-Id: Ic012881c12b2310a6337696521fa1355afd4069f
Reviewed-on: https://dart-review.googlesource.com/17447
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-11-01 15:52:14 +00:00
Alexander Markov c84e2968ac [VM] Avoid dynamic call in _Double.==
Change-Id: Iab301370f33c375db1cd52f8eb87500955dfab09
Reviewed-on: https://dart-review.googlesource.com/17722
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-10-31 22:01:09 +00:00
Alexander Markov 6505994d58 [VM] Correct return type of _setHash
Change-Id: I3f02d584d30fc7a2f3bd93858eaf77abe3c9f5b7
Reviewed-on: https://dart-review.googlesource.com/17720
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-10-31 22:01:08 +00:00
Kasper Lund 1db8615e29 Avoid just truncating to the nearby int in double.hashCode.
Preserves the property that doubles and ints that are equal
share the same hash code, but gives different doubles a much
higher chance of having different hash codes.

BUG=https://github.com/dart-lang/sdk/issues/2884

Change-Id: Ia97164087db568f26ffbbd6854ed9c19f81e9611
Reviewed-on: https://dart-review.googlesource.com/15140
Commit-Queue: Kasper Lund <kasperl@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-23 06:47:20 +00:00
Vyacheslav Egorov 826b48ee8a [VM] Clean up typing violations in the numerics implementation.
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I93d7bca2ff627431f1a316bb01a5dada1b5f2354
Reviewed-on: https://dart-review.googlesource.com/14522
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-10-17 21:00:24 +00:00
Alexander Markov 86fde60e4d [VM] Intrinsify Type.hashCode
This CL optimizes Type.hashCode similarly to String.hashCode, by
introducing intrinsic version of hashCode calculation which uses
hashcode stored in Type instance.

This is important for Flutter's .of pattern, which heavily uses
Maps with Type keys.

Results on Flutter stocks/build_bench.dart microbenchmark:
Before: 4906 µs
After:  4751 µs
(minimum of 5 runs, using tip of Flutter and Flutter engine)

Issue: https://github.com/dart-lang/sdk/issues/31011
Issue: https://github.com/flutter/flutter/issues/11572
Change-Id: Ifbaf721050007db49bbd969dc669d070f4ce839e
Reviewed-on: https://dart-review.googlesource.com/12622
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-10 23:46:09 +00:00
Vyacheslav Egorov 552d09715d [VM] Cleanup SIMD related IL instructions.
This CL unifies 31 diverse Simd instructions into a single flexible SimdOp instruction.

These instructions were not different enough to warrant being implemented 
as separate IL instructions. The separation did not bring any benefit but
instead we payed the price with considerable amounts of duplicated code 
across the pipeline.

Main motivation for this refactoring is to reduce the surface of our IL.

Bug:
Change-Id: Ie8e39fecd2a51cb8edffdfe9c22e76835f912a9b
Reviewed-on: https://dart-review.googlesource.com/10120
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-07 13:25:13 +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
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