This mainly prevents Strings that will eventually be turned into
symbols anyway from being allocated in new space.
Picks up a couple percent during kernel loading.
Possibly avoids triggering a scavenge?
Change-Id: Ide3dca13306981131e6152004e068c2154f9fc4c
Reviewed-on: https://dart-review.googlesource.com/77484
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This is causing deadlocks e.g. when a new space allocation triggers
a scavenge during kernel loading, and (what looks like) the
background compiler creating a lock cycle if it runs during kernel
loading.
Change-Id: Ie69ef630f77f41da56994b3f2554a4f711b493ab
Reviewed-on: https://dart-review.googlesource.com/77482
Commit-Queue: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Hardcoding the paths to dart compiler and runtime
ensures the proper binaries are used or an error
is reported (before we could silently fall back
to another toolchain if the first part of PATH
failed, but alternative followed in a later part).
Change-Id: Ib8d2c4f3fd7ab9b78c8d11585017d506e2812333
Reviewed-on: https://dart-review.googlesource.com/77001
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
TFA is improved to detect if a method was called using dynamic selector,
was ever called not via this, and whether the tear-off was taken.
This information is used to remove parameter type checks in AOT.
Less accurate selector-based analysis, which was used previously to get
this information, is now used only if TFA is disabled.
Also, precompiler is improved to omit method extractors and implicit
closure functions if analysis proved that tear-off is not taken.
Flutter gallery snapshot size: -0.8%
Change-Id: Iec01257dfdc78104752104df14e2ce078d326a96
Reviewed-on: https://dart-review.googlesource.com/77005
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
- use core snapshot when initializing an isolate (CorelibIsolateStartup benchmark moves from 39s to 2s)
- remove use_dart_frontend flag from the isolate specific flags
- the script snapshot API functions now return an error
Change-Id: Ia562e007fdbfd1d3ebd8e1a0c8feee238bada00b
Reviewed-on: https://dart-review.googlesource.com/76709
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Unlike the assembler, the register allocator is in a position to avoid a move. Use the call result register since it is the most popular value source.
This pattern will also be needed to get the write barrier slot into a fixed register for card-marking, since X64 and ARM don't have a TMP2.
dart2js aot product:
X64 Instructions(CodeSize): 9049952 -> 8994240 (-0.62%)
ARM Instructions(CodeSize): 9772096 -> 9711696 (-0.62%)
ARM64 Instructions(CodeSize): 10185056 -> 10122496 (-0.61%)
Bug: https://github.com/dart-lang/sdk/issues/34002
Change-Id: Id2e9dd7b3d86069a9da3ba4e141720511ce6399e
Reviewed-on: https://dart-review.googlesource.com/76307
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The new argument order matches the runtime call and requires less copying.
Simplify Function::HasCode()
Remove obsolete workaround when updating type test cache.
Change-Id: I57c988f97ee2259a22730f445f336cd2a085959e
Reviewed-on: https://dart-review.googlesource.com/76584
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This is the follow-up fix for
https://github.com/dart-lang/sdk/commit/f81709c3e34438201682237e4faf6cb886094129
As part of that change, merging of known cid and abstract type in
LoadFieldInstr::ComputeType() was done less precisely, loosing a chance
to calculate a more accurate abstract type if cid is known.
This change fixes the problem by resetting abstract type if cid is known.
Similar change is also applied to LoadStaticFieldInstr::ComputeType().
Change-Id: I2b7dfa961e26c0ea98e66aaf9b9afb235dfa5684
Reviewed-on: https://dart-review.googlesource.com/76723
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
When class in one library gets updated, all derived classes types across different libraries have to be finalized as well.
Change-Id: Ie86af6174a5ad22fc4e19a80a072f81ea3f8a9f5
Reviewed-on: https://dart-review.googlesource.com/76442
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
This reverts commit 4cf2d3990b.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> [VM runtime] Store Smi instance type in type test cache when using the interpreter.
>
> Instances of type Smi are handled in generated code and not looked up in
> type test cache. The interpreter does not implement this special handling and
> relies on the cache for Smi instances as well.
>
> Change-Id: I3a8501efcbadfcbe848871ad0f6ada444414be43
> Reviewed-on: https://dart-review.googlesource.com/76305
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Régis Crelier <regis@google.com>
TBR=vegorov@google.com,alexmarkov@google.com,zra@google.com,regis@google.com
Change-Id: I3cb0ced7520a62295e75ee92e4de2b5d41770676
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/76583
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
- Add generation of AppJIT snapshots (from a trace rather than a training run).
- Add generation of AppJIT snapshots under the constraint of not generating a new instructions segment.
- Remove generation of script snapshots (no longer used by Flutter).
Change-Id: I2a7cb4b7cd681fae5d33bc896107b3ea903f35d1
Reviewed-on: https://dart-review.googlesource.com/75390
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Stanislav Baranov <sbaranov@google.com>
Rather than during class finalization.
before:
$ ./out/ReleaseX64/run_vm_tests GenKernelKernelLoadKernel
GenKernelKernelLoadKernel(RunTime): 35558
after:
$ ./out/ReleaseX64/run_vm_tests GenKernelKernelLoadKernel
GenKernelKernelLoadKernel(RunTime): 27650
Change-Id: I2a89f75c3082d7e8fbe20f4e832a609cffae43d8
Reviewed-on: https://dart-review.googlesource.com/76420
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
Instances of type Smi are handled in generated code and not looked up in
type test cache. The interpreter does not implement this special handling and
relies on the cache for Smi instances as well.
Change-Id: I3a8501efcbadfcbe848871ad0f6ada444414be43
Reviewed-on: https://dart-review.googlesource.com/76305
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
In the future, newly created VMOs on Fuchsia will not be mappable as
executable by default. In preparation for that, start using
zx_vmo_replace_as_executable to mark Fuchsia's VMOs as executable as
needed.
SEC-42
TEST=CQ
Change-Id: I9df86bbb33b02042260727d64e74b7146eb1d1a6
Reviewed-on: https://dart-review.googlesource.com/76304
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
In VM, 'new List' is equivalent to either 'new _GrowableList' or
'new _List' depending on the number of arguments.
This change does the transformation early (on kernel AST), in order
to have specialized representation in TFA and in bytecode.
Change-Id: I46f0db8cc19efb3a53fdbe971ac26bdd2736fbda
Reviewed-on: https://dart-review.googlesource.com/76283
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dsymutil is unable to merge line number programs will different values of default_is_stmt, and either it or the linker is implicitly adding one where this value is true.
Change-Id: I68d55ff46f97bfdeb83ca71fcc9a1069f460a107
Reviewed-on: https://dart-review.googlesource.com/76306
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2
Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>