Commit Graph

1743 Commits

Author SHA1 Message Date
Johnni Winther b1f2c2cd3a Register NativeBehavior from WorldImpact.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1957343002 .
2016-05-10 09:50:11 +02:00
Johnni Winther 24c548f5bd Skip spurious constants in deferred computation.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1955403002 .
2016-05-10 09:41:19 +02:00
Johnni Winther 6e491cf152 Only call .hasResolvedAst in assertions.
R=sra@google.com

Review URL: https://codereview.chromium.org/1949713004 .
2016-05-09 10:34:01 +02:00
Johnni Winther a5078ea5f2 Serialize ParameterElement.node and ParameterElement.initializer for type inference
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1945263003 .
2016-05-09 10:23:34 +02:00
Sigmund Cherem ed9826894a Do not evaluate on-demand to prevent breaking the deferred loading task
BUG= https://github.com/dart-lang/sdk/issues/26406
R=sra@google.com

Review URL: https://codereview.chromium.org/1950243002 .
2016-05-04 18:23:37 -07:00
Johnni Winther 3f11e131ae Report UNMATCHED_TOKEN instead of EXTRANEOUS_MODIFIER
Closes #25308

R=ahe@google.com

Review URL: https://codereview.chromium.org/1943723003 .
2016-05-04 13:42:29 +02:00
Sigurd Meldgaard e47e8af364 Fix missing functionality with --allow-native-extensions
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1945183002 .
2016-05-04 10:53:15 +02:00
Johnni Winther f79ff62b2e Don't crash on deserialized type inference.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1939703002 .
2016-05-03 11:29:24 +02:00
Johnni Winther 52b45145f0 Fix source information positions for deserialized patched elements.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1935933002 .
2016-05-03 10:52:33 +02:00
Erik Ernst 33478e2ab5 Rebased and retested version of CL 1915123008.
This CL is a rebased and retested version of CL 1915123008,
'Implements support for ignoring method type arguments in
resolution'. That CL caused failures on dart2js-jsshell but it is
now confirmed that the failures were caused by another CL.

Review URL: https://codereview.chromium.org/1942763002 .
2016-05-02 11:50:06 +02:00
Johnni Winther 832d87341f Handle deserialized compilation of closures
- and fix some errors in serialization and equivalence (test) of ResolvedAst

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1932183003 .
2016-04-30 11:20:20 +02:00
Johnni Winther edf7d43eba Serialize default constructors separately.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1929963005 .
2016-04-30 11:11:08 +02:00
Erik Ernst c2d18fe065 Revert "Implements support for ignoring method type arguments in resolution."
This reverts commit e44e667ca7, because that
commit introduced many timeouts on dart2js-jsshell, ia32.

Review URL: https://codereview.chromium.org/1933403002 .
2016-04-29 21:36:54 +02:00
Erik Ernst e44e667ca7 Implements support for ignoring method type arguments in resolution.
Extends `FunctionExpression` to hold the formal type variable
declaration syntax. Introduces `GenericElement` as a new superclass of
`TypeDeclarationElement`, allowing `FunctionElement` to have a getter
`typeVariables`. Changes `SignatureResolver.analyze` in several ways
to create and handle the new type variables. In order to avoid circular
ordering dependencies, introduced new scope classes such that the
function signatures can be computed without relying on themselves to
look up type variables (e.g., `FunctionSignatureBuildingScope`).

Finally, the mock_compiler and resolver_test.dart were adjusted to give
a `scope` argument to `new ResolverVisitor(..)` in order to get the
correct scopes in the new setup.

A few words about the approach:

The type of every method type parameter behaves as `dynamic`, because
its bound is (unconditionally, ignoring any bound syntax that might be
present) set to `const DynamicType()`. This preserves the property
that diagnostic messages about the type variables will refer to the
correct location in the source code.

Type arguments passed in send expressions are parsed but not added to
the abstract syntax and therefore not passed on to the resolution
phase; this means that all sends are treated as if they had no actual
type arguments, even when they do have them. Hence, actual method type
arguments are completely ignored.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1915123008 .
2016-04-29 19:46:12 +02:00
Johnni Winther 8e70d3bd83 Avoid use of NonConstantValue in SSA
BUG=

Review URL: https://codereview.chromium.org/1934553002 .
2016-04-29 13:33:28 +02:00
Johnni Winther b361d8ce97 Support compilation of Hello World
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1927963002 .
2016-04-29 12:57:45 +02:00
Johnni Winther 4822bd4c0b Fix invariant breakage on erroneous constant variables.
BUG=

Review URL: https://codereview.chromium.org/1936463002 .
2016-04-29 10:57:22 +02:00
Johnni Winther 4c563fecbf Serialize more properties of ConstructorElement.
Review URL: https://codereview.chromium.org/1924053003 .
2016-04-29 10:00:53 +02:00
Johnni Winther 4acfa253d3 Add toStructuredText to ConstantExpression and align method names with ConstantValue
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1916053003 .
2016-04-27 12:48:50 +02:00
Johnni Winther 833c73d3cd Handle discrepancy Dart and JS constant expressions.
BUG=

Review URL: https://codereview.chromium.org/1927533002 .
2016-04-27 11:46:24 +02:00
Johnni Winther d1ca90aba6 Store constant variable initializers in elements.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1919143002 .
2016-04-27 10:01:58 +02:00
Sigurd Meldgaard d56b1c6928 Make support for async/await syntax optional in the frontend.
patch from issue 1899293005 at patchset 20001 (http://crrev.com/1899293005#ps20001)

Modified to fix issue with synthetic Scripts

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1918903004 .
2016-04-27 09:58:12 +02:00
Stephen Adams 7684794b8b Fix for issue 26243 - illegal motion of assignments in instruction merging
Fix by treating some HLocalGet instructions as pure and others as
impure.  Simply making HLocalGet impure caused a lot of code quality
regressions with the single-assignment exception and stack-trace
variables.

R=kmillikin@google.com, sigmund@google.com

Committed: https://github.com/dart-lang/sdk/commit/e9b06a9cd7e41c80b1a60cb20ea45f21b46ac40f

Reverted: https://github.com/dart-lang/sdk/commit/5fd51e63400c9e201ced8835c1d2c3c7924be975

Review URL: https://codereview.chromium.org/1914623002 .
2016-04-26 15:26:37 -07:00
Peter von der Ahé 33253905e7 Use Zone to correctly measure async operations.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1898043004 .
2016-04-26 14:27:41 +02:00
Peter von der Ahé 188cb396c0 Remove invalidated elements from enqueuer and resolution.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1910473003 .
2016-04-26 13:17:53 +02:00
Johnni Winther 4c9e6ff345 Replace _analyzeElementEagerly with Resolution.ensureResolved
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1917863002 .
2016-04-26 09:54:24 +02:00
Stephen Adams 5fd51e6340 Revert "Fix for issue 26243 - illegal motion of assignments in instruction merging"
TBR=sigmund@google.com
BUG=

Review URL: https://codereview.chromium.org/1913843003 .
2016-04-25 11:53:14 -07:00
Stephen Adams e9b06a9cd7 Fix for issue 26243 - illegal motion of assignments in instruction merging
Fix by treating some HLocalGet instructions as pure and others as
impure.  Simply making HLocalGet impure caused a lot of code quality
regressions with the single-assignment exception and stack-trace
variables.

R=kmillikin@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/1914623002 .
2016-04-25 10:20:27 -07:00
Peter von der Ahé f3498e4c9d Associate compile-time errors with elements.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1911443002 .
2016-04-25 16:28:42 +02:00
Peter von der Ahé 217329a2c2 Add LibraryLoader.resetLibraries
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1911453002 .
2016-04-25 15:42:02 +02:00
Peter von der Ahé 74144aece4 Make backend and reporter customizable.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1897863007 .
2016-04-25 14:31:09 +02:00
Johnni Winther 09c242e729 Reinsert (and test) handling of exceptions from user code.
Closes issue #26304

R=ahe@google.com

Review URL: https://codereview.chromium.org/1914973002 .
2016-04-25 12:56:10 +02:00
Johnni Winther 8b39e67ac4 Derive source information from ResolvedAst.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1902363002 .
2016-04-25 11:23:35 +02:00
Johnni Winther 7c20fa24d2 Serialize more native data.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1902753002 .
2016-04-20 10:30:19 +02:00
Johnni Winther 1cb70133af Update ClosureScope.toString
R=sra@google.com

Review URL: https://codereview.chromium.org/1901053002 .
2016-04-20 09:39:19 +02:00
Johnni Winther de1d473529 Store and serialize NativeBehavior in TreeElements.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1896843002 .
2016-04-19 11:04:11 +02:00
Johnni Winther 4b01f4136e Support deserialization of ResolutionImpact for members of unnamed mixin applications
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1901683002 .
2016-04-19 10:26:42 +02:00
Johnni Winther 553eec6047 Fix serialization of forwarding constructors.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1891193003 .
2016-04-19 10:09:47 +02:00
Johnni Winther 2ccfcf438a Support deserialized compilation of the empty program.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1892093003 .
2016-04-18 10:36:34 +02:00
Johnni Winther ea4a562517 Fix some issues in element serialization.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1888393002 .
2016-04-18 09:31:23 +02:00
Harry Terkelsen ce37fbcb3d Refactor Parsing to remove compiler dependency
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1892183002 .
2016-04-15 13:03:02 -07:00
Stephen Adams b887563dff dart2js: Reduce calls to Uri.toString()
Uri.toString() shows up at 2% of a full dart2js compile.
Avoid by using Uri components or reusing result of toString()

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1887313002 .
2016-04-15 09:00:11 -07:00
Johnni Winther 14baf6b37b Support serialization of all resolved asts from dart:core
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1888803002 .
2016-04-15 10:34:14 +02:00
Florian Loitsch bcd8ef3dea Enable conditional directives by default.
R=brianwilkerson@google.com, iposva@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/1851753002 .
2016-04-14 19:02:41 +02:00
Erik Ernst 377b806bbc Adds support for remaining generic method syntax constructs.
CL https://codereview.chromium.org/1863053003/ added support for most
syntactic constructs in relation to generic methods/functions, and
this one adds the missing ones: Declarations of function typed arguments
with type parameters, declarations of generic local functions, and
declarations of generic literal function expressions. It also adds
support for `super` bounds, because they were discussed recently and
may be quite useful (and it turns out to be no problem to parse them).
Finally, a new test file is added to tests the additional constructs.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1878253002 .
2016-04-14 15:25:44 +02:00
Johnni Winther eecf628d29 Serialize JumpTarget and LabelDefinition.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1883863002 .
2016-04-14 10:51:29 +02:00
Harry Terkelsen 8f3e4cff01 dart2js: remove references to compiler in ResolvedUriTranslator
BUG=
R=johnniwinther@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/1884793002 .
2016-04-13 13:49:59 -07:00
Harry Terkelsen 01e839c732 dart2js cleanup: remove unused imports and variables
BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1880323002 .
2016-04-13 09:11:39 -07:00
Harry Terkelsen acf33e480c dart2js: use IdGenerator for all id generation
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1881293002 .
2016-04-13 09:02:06 -07:00
Johnni Winther 7e8e01610e Expand ResolvedAst to handle synthetic constructors.
Main change is to add [ResolvedAstKind] to support ResolvedAst for default and forwarding constructors.

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1881013002 .
2016-04-13 12:45:14 +02:00