Commit Graph

4698 Commits

Author SHA1 Message Date
Johnni Winther b3f8cd31a0 Handle use of constant constructors with default values.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1994613004 .
2016-05-20 11:40:35 +02:00
Johnni Winther 529c251546 Handle redirecting factories.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1992733002 .
2016-05-20 11:26:25 +02:00
Johnni Winther bfb8a077e2 Fix ForwardingConstructorElementZ.computeEffectiveTargetType
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1981313002 .
2016-05-20 11:20:23 +02:00
Johnni Winther 9ce98cada8 Support serialized dart:core in batch-mode
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1973333002 .
2016-05-18 13:05:09 +02:00
Johnni Winther 627c18a7e7 Use ResolvedAst in constant initializers
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1979613002 .
2016-05-18 12:23:45 +02:00
Johnni Winther f3ff2a6302 Handle explicit constructor.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1969313007 .
2016-05-18 12:13:20 +02:00
Johnni Winther 6571bdb95e Support (de)serialization from command-line
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1975153002 .
2016-05-18 11:52:32 +02:00
Jacob Richman be5c8e1a33 Fix "break" vs "continue" bug in js interop codegen that was the real source of missing js interop stubs not using codegenWorld vs resolutionWorld.
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1982413002 .
2016-05-17 10:42:26 -07:00
Johnni Winther 039473f349 Store ResolvedAst on AstElement
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1970703002 .
2016-05-17 14:00:03 +02:00
Johnni Winther 50b85640b3 Change dart2js.dart to use compiler_new.dart
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1973753004 .
2016-05-17 12:27:23 +02:00
Jacob Richman 07cc57d110 Switch to using resolverWorld from codegenWorld to determine whether JS interop interceptors need to be generated as codegenWorld is incorrectly reporting that some JS interop methods are not invoked even when they are.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1975133004 .
2016-05-13 17:20:19 -07:00
Harry Terkelsen 1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Greg Littlefield cd8124cdcf JS: Use direct function invocation when possible for calls with 4 or 5 args (#26268)
* Use direct function invocation when possible for calls with 4 or 5 args

* Add test for Function.apply called with 0-5 arguments
2016-05-13 10:13:46 -07:00
Johnni Winther fdb49caefd Fix inference reference to .initializer
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1966763003 .
2016-05-12 10:10:58 +02:00
Johnni Winther cb2fcd8117 Check closure data for serialization
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1967073002 .
2016-05-12 09:59:02 +02:00
Erik Ernst a76745e18f Revert "Adjusts dart2js SSA builder to tolerate method type arguments."
This reverts commit ee926fac8d.

Also revert "Removed generic method tests from status file.",
commit fa48b7e17b.

Review URL: https://codereview.chromium.org/1971763002 .
2016-05-11 16:15:01 +02:00
Erik Ernst ee926fac8d Adjusts dart2js SSA builder to tolerate method type arguments.
This CL changes `Types.getClassContext` to return null for method type
arguments (indicating that the given `type` does not contain any type
variables, which fits the current "ignore them" approach to that kind
of type variable). It introduces a new class `MethodTypeVariableType`
which models a method type variables and ensures that it is treated
as `dynamic` (such that type annotations are permissive, and usages
as a type expression `T` in `.. is T` or `.. as T` are treated like
a malformed type). For RTI, method type variables are ignored (such
that no additional classes are claimed to be needed for RTI due to
method type variables, no matter how they are used). Finally,
`SsaBuilder.addTypeVariableReference` generates code yielding the
value `dynamic` for method type variables.

Adresses issue 26436.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1969753002 .
2016-05-11 15:04:15 +02:00
Johnni Winther 681c3e6a89 Register mixin use from modelz.
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1961323002 .
2016-05-11 09:53:40 +02:00
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