Find a file
Vyacheslav Egorov 3f6c87d5ac [vm/compiler] Do not use Constant(#null) to reserve space on the expression stack.
Given IL like this:

  t3 <- Constant(#null)   <--\
  // ... do something ...    |
  StoreLocal(:temp, t4)   ---/
  // Do something else
  StoreIndexed(t1, t2, t3)

Graph builder would use Constant(#null) as an input definition for
StoreIndexed - which leads to wrong generated code in unoptimized mode
on X64 where StoreIndexed has specialization for constant values. In
optimized code SSA renaming would actually replace t3 with a correct
reaching definition.

This CL introduces a new IL instruction MakeTemp(...) which has exactly
the same effect as Constant(#null) on the expression stack, but is
not treated as a constant value by the backend.

The bug was unnoticed because of the loose assertions in the SSA
renaming which permitted replacing Constant-s with non-Constant
reaching definitions. This CL also tightens those assertions to
catch this issue.

Also cleanup the code in SSA renaming a bit to make it a bit easier
to understand.

Fixes https://github.com/dart-lang/sdk/issues/33195

Bug: 33195
Change-Id: I7c914c836d4af7a50e8a8e1a02d03e9413f87779
Reviewed-on: https://dart-review.googlesource.com/56112
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-05-22 18:05:14 +00:00
.github Add an issue template to the SDK 2018-04-05 13:05:09 +00:00
build [fuchsia] Use Fuchsia prebuilts 2018-05-17 20:54:06 +00:00
client Remove old annotated_steps buildbot scripts and dispatcher 2017-05-23 16:17:02 +02:00
docs Update spec on interface, mixin and async. 2018-05-16 19:09:52 +00:00
pkg Add Forest support for assert statements and initializers 2018-05-22 17:59:24 +00:00
runtime [vm/compiler] Do not use Constant(#null) to reserve space on the expression stack. 2018-05-22 18:05:14 +00:00
samples [infra] Keep comments intact when updating status files. 2018-04-10 19:03:21 +00:00
samples-dev Make cast do the same things as retype. 2018-05-09 08:00:08 +00:00
sdk [js_runtime] Fix for 'o is FutureOr<T>' with function type T 2018-05-22 16:43:54 +00:00
tests Skip expressions by parsing them with a no-op listener. 2018-05-22 16:51:29 +00:00
third_party [vm] Roll tcmalloc forward 2018-05-15 21:07:57 +00:00
tools [infra] Specify chrome version used by builds running on the test matrix 2018-05-22 16:17:34 +00:00
utils [GN] Hack around Dart 2 application_snapshot deps issue 2018-05-22 17:47:16 +00:00
.clang-format VM: Re-format to use at most one newline between functions 2017-07-13 08:08:37 -07:00
.gitattributes Avoid crash on EOF error in file with Windows line encoding 2018-04-09 12:16:20 +00:00
.gitignore Git ignore vscode project files. 2017-03-23 15:26:06 -07:00
.gn Starting work on full GN build 2016-09-23 07:47:36 -07:00
.mailmap Add .mailmap file. 2015-05-18 19:33:16 +02:00
.packages Readd web-components: it is used for unit tests of dart:html 2018-04-03 20:13:19 +00:00
AUTHORS Add Cristian Almstrand to AUTHORS 2015-07-16 09:51:56 -07:00
BUILD.gn [VM] Make runtime-kernel the default build target. This ensures that kernel_services snapshot is built and available. 2018-05-14 14:59:43 +00:00
CHANGELOG.md [release] Prepare changelog for 2.0.0-dev.56.0 2018-05-22 14:35:50 +00:00
codereview.settings Update codereview.settings to Gerrit (dart-review.googlesource.com) 2017-09-04 12:52:09 +00:00
dartdoc_options.yaml Update dartdoc to v0.18.0 and tag library categories. 2018-03-27 16:19:34 +00:00
DEPS Update dependencies on async, collection, http_throttle packages 2018-05-19 01:46:09 +00:00
LICENSE Remove the Dromaeo and TodoMVC samples. 2016-01-11 13:09:26 -08:00
PATENTS Move LICENSE, AUTHORS, PATENTS into the dart directory. 2014-02-10 06:48:47 +00:00
PRESUBMIT.py Fix presubmit on Windows. Dart executable is not called .bat 2018-05-02 08:40:59 +00:00
README.dart-sdk remove docgen from the sdk 2015-09-18 13:18:10 -07:00
README.md [gardening] Whitespace change to trigger bots. 2017-04-28 10:08:58 -07:00
WATCHLISTS Creates a watchlist for sdk/lib/_http and adds me to it 2018-01-02 18:39:53 +00:00

Dart

Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.

Using Dart

Visit the dartlang.org to learn more about the language, tools, getting started, and more.

Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.

Building Dart

If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.

There are more documents on our wiki.

Contributing to Dart

The easiest way to contribute to Dart is to file issues.

You can also contribute patches, as described in Contributing.

License & patents

See LICENSE and PATENTS.