Commit graph

38621 commits

Author SHA1 Message Date
Paul Berry 20056c3f45 In AST-based type inference, use function elements rather than variable elements.
This paves the way for including closures in type inference, since
closures are function elements that don't have an associated variable.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2014893004 .
2016-05-26 12:46:30 -07:00
Sigmund Cherem 91c8754a05 Preserve the original semantics in the poi tests.
R=het@google.com

Review URL: https://codereview.chromium.org/2016013002 .
2016-05-26 12:41:33 -07:00
Paul Berry 0548ae7f3f Fix circularity detection for AST-based type inference in the presence of closures.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2015833004 .
2016-05-26 12:00:58 -07:00
Konstantin Shcheglov 039f2a05c4 Resynthesize some more types lazily.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2010143002 .
2016-05-26 11:45:23 -07:00
Ryan Macnak e3f5760f66 Tree-shaker: drop imports/exports in a way that doesn't break the vm-service.
BUG=http://dartbug.com/26550
R=hausner@google.com

Review URL: https://codereview.chromium.org/2014913002 .
2016-05-26 11:29:27 -07:00
Florian Schneider 62f64eb312 Fix checked mode error in socket_bind_test.
BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2007133007 .
2016-05-26 20:14:51 +02:00
Harry Terkelsen 9850a83bdb fix poi test
Fixes #26538

Review URL: https://codereview.chromium.org/2012233003 .
2016-05-26 11:01:12 -07:00
Brian Wilkerson 08ce826f3b Gather and report stats on the number of times flushed results are recomputed
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2005403005 .
2016-05-26 10:58:32 -07:00
Florian Schneider b1ce8afde5 Fix a flaky failure in socket_bind_test.
Make the test more robust against the case where it use a IPv4 socket address
is already in use with IPv6 or vice versa by first finding a port that is free
for both.

BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2014893002 .
2016-05-26 19:38:32 +02:00
Ryan Macnak ef8baa8760 Add test harness option for app snapshots with unoptimized code.
./tools/test.py -m all -c dart2appjit -r dart_app --use-blobs

Rename 'dart_product' runtime to 'dart_app'.

Rename Dart_PrecompiledJITSnapshotBlob to Dart_CreateAppJITSnapshot and add documentation.

Remove out-of-date scripts in tools/precompilation.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1992703005 .
2016-05-26 10:37:47 -07:00
Konstantin Shcheglov 0a5ecc50ab Resynthesize return types lazily.
R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2007323006 .
2016-05-26 10:14:01 -07:00
Konstantin Shcheglov cdc0b17246 Resynthesize ParameterElementImpl.parameterKind lazily.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2015963002 .
2016-05-26 10:08:48 -07:00
Paul Berry e71e111b24 Summarize references to closure parameters properly.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2013093002 .
2016-05-26 10:04:27 -07:00
Paul Berry dcadf0b35c Store expression function closures summaries when needed for type inference.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2012263002 .
2016-05-26 09:26:40 -07:00
Ryan Macnak 48637d1010 Fix Dartium GOMA builds (-Werror,-Wmismatched-new-delete).
Review URL: https://codereview.chromium.org/2017663002 .
2016-05-26 09:15:55 -07:00
Paul Berry 6d2b7f4067 Refactor AST summarization logic for serializing initializer expressions.
This should pave the way for serializing the bodies of expression-type
function closures.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2017613003 .
2016-05-26 08:44:12 -07:00
Konstantin Shcheglov ac7f892cc4 Resynthesize FieldFormalParameterElementImpl(s) lazily.
And also resynthesize parameter types lazily.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2016543002 .
2016-05-26 08:36:41 -07:00
Paul Berry 8d43e02174 Migrate UnlinkedParam.defaultValue to UnlinkedExecutable.bodyExpr.
To do AST-based type inference involving function closures, we have
added a `bodyExpr` field to UnlinkedExecutable.  Since every
UnlinkedParam with a default value has a corresponding
UnlinkedExecutable representing its initializer, it makes sense to
store the constant expression there for uniformity.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2010993002 .
2016-05-26 08:12:39 -07:00
Florian Schneider 48134f9b66 VM: Remove unused script_ field from Library objects.
BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2016713002 .
2016-05-26 16:32:52 +02:00
Vyacheslav Egorov bfa8a7a2a3 VM: Field::IsConsistentWith should check unboxing state of the field.
R=fschneider@google.com
BUG=

Review URL: https://codereview.chromium.org/2012183003 .
2016-05-26 15:14:48 +02:00
Florian Schneider 6afbb17cec VM: Fix assertion failure from background compiler.
The background compiler expects only cloned Field objects.

BUG=#26540
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2016653002 .
2016-05-26 12:18:36 +02:00
Johnni Winther 326af10bc8 Add names and support for preserialized data to serialization tests
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2013763002 .
2016-05-26 09:36:32 +02:00
Ryan Macnak 7bdf01560a Speculatively revert "Make the object store visible in Observatory."
This reverts commit 2eb8408969.

TBR=turnidge@google.com

Review URL: https://codereview.chromium.org/2002253005 .
2016-05-25 17:33:52 -07:00
Sigmund Cherem 266ad7fd0f Remove reference to compiler from libary loader, fix analyzer warning
R=het@google.com

Review URL: https://codereview.chromium.org/2009773004 .
2016-05-25 15:27:32 -07:00
Paul Berry f1bd126241 Migrate UnlinkedVariable.constExpr to UnlinkedExecutable.bodyExpr.
To do AST-based type inference involving function closures, we will
need to be able to store closure body expressions in unlinked
summaries--this requires adding a `bodyExpr` field to
UnlinkedExecutable.  Since every UnlinkedVariable with a body
expression has a corresponding UnlinkedExecutable representing its
initializer, it makes sense to store the constant expression there for
uniformity.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2013883003 .
2016-05-25 15:22:49 -07:00
Paul Berry b1afdec64c Fix type errors introduced by 8fdeb785fd
TBR=srawlins@google.com

Review URL: https://codereview.chromium.org/2016533002 .
2016-05-25 15:20:42 -07:00
Sam Rawlins 8fdeb785fd Add label support to ExitDetector
BUG=https://github.com/dart-lang/sdk/issues/26534
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2008363002 .
2016-05-25 14:04:22 -07:00
Ryan Macnak 4aaf810d25 Add --dump-megamorphic-stats. Lower megamorphic cache load factor to 50%.
R=iposva@google.com

Review URL: https://codereview.chromium.org/2007233002 .
2016-05-25 14:03:27 -07:00
Paul Berry 3d00d5d7d1 Fix AST-based type inference via interfaces.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2012023002 .
2016-05-25 13:27:41 -07:00
Konstantin Shcheglov 3934c9c3b0 Create lazy (Const)FieldElementImpl.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2014713002 .
2016-05-25 13:16:07 -07:00
Jacob Richman 6cb121f847 Make sort method generic. This eliminates a large number of dynamic calls that slow down sorting under ddc.
BUG=
R=leafp@google.com

Review URL: https://codereview.chromium.org/2008373002 .
2016-05-25 12:33:41 -07:00
Harry Terkelsen 779465d862 fix warning in noSuchMethod registry
BUG=

Review URL: https://codereview.chromium.org/2006143007 .
2016-05-25 11:38:13 -07:00
Ryan Macnak 2eb8408969 Make the object store visible in Observatory.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2005983002 .
2016-05-25 11:12:32 -07:00
Ryan Macnak 18c87ab02c Add timeline event for weak handle processing.
R=asiva@google.com

Review URL: https://codereview.chromium.org/2010673002 .
2016-05-25 10:55:45 -07:00
pq 53fe39137f Embedder support refactoring (phase 1).
A bunch of changes to pave the way for emebdder SDK summary creation.

* Moves _embedder.yaml processing into the embedder SDK (out of the resolver).
* Changes EmbedderUriResolver to compose rather than extend a DartUriResolver.
* Fixes the wierd handling (dropping to add back) of `dart:` URIs.
* Fixes the incorrect overriding docs for `SDKLibraryImpl.shortName`.
* Updates embedder test to include a definition of `dart:core` in anticipation of adding some embedder SDK tests.

Some API work TODO in a follow-up CL (notably the way we check for the presence of embedders by querying the resolver is odd).

BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2009303002 .
2016-05-25 10:52:53 -07:00
Brian Wilkerson a3ed9fe569 Optimize more megamorphic dispatch sites
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2015513003 .
2016-05-25 10:49:11 -07:00
Konstantin Shcheglov 3b865560a9 Add ElementImpl.typeParameterContext getter.
When we need to resynthesize types of variables and parameters, we
need to know the type parameter context.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2008353002 .
2016-05-25 10:29:57 -07:00
Harry Terkelsen b5fbea4f4a accept null type casts in dummy noSuchMethod checks
Fixes #23843

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2009853003 .
2016-05-25 10:14:53 -07:00
Harry Terkelsen 7476560209 run dartfmt on dart2js
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2007353002 .
2016-05-25 10:14:02 -07:00
Ryan Macnak df4e0d5ac6 ARM/ARM64: Fix smashed CODE_REG in intrinsics with InvokeMathCFunctionInstrs.
X64: Fix smashed ARGS_DESC_REG.

IA32: Remove unnecessary preservation of ICREG.

BUG=http://dartbug.com/26516
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2003403003 .
2016-05-25 10:02:21 -07:00
Sigmund Cherem b741e3f0df Make CompilerTask independent of compiler.
Now this base class only has logic for measuring time.

R=het@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org/2000323006 .
2016-05-25 09:11:08 -07:00
Florian Schneider 374baf4979 Remove timeout status for some tests to check if they pass now.
BUG=#24596
R=zra@google.com

Review URL: https://codereview.chromium.org/2015533002 .
2016-05-25 17:35:05 +02:00
Brian Wilkerson 7eddfb7394 Fix cross-partition dependency handling (issue 26466)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2008133002 .
2016-05-25 07:43:01 -07:00
Florian Schneider 3344a6f6f4 Avoid leaking objects that should be collected after tree-shaking.
Added handle scopes to ensure that no objects leak through handles
to after tree-shaking where we expect no instances of dropped classes
being around.

BUG=dartbug.com/26515
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2009513002 .
2016-05-25 16:15:38 +02:00
Vyacheslav Egorov 0ce50b865f Fix x64 debug precompiled runtime build.
R=fschneider@google.com
BUG=

Review URL: https://codereview.chromium.org/2006313006 .
2016-05-25 14:00:10 +02:00
Florian Schneider 80d6af1e0c Revert "Fix capturing variables in optimized compilations"
This reverts commit 4dca5d0e01.

It seems to cause at least one additional test failure:

Repro:
    python tools/test.py -mrelease -asimarm64 --write-debug-log --write-test-outcome-log --copy-coredumps -cprecompiler -rdart_precompiled --exclude-suite pkg -t480 language/async_star_regression_fisk_test

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2004373004 .
2016-05-25 13:30:24 +02:00
Johnni Winther 42435f2643 Support multiple resolution inputs from command line.
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2004833003 .
2016-05-25 11:02:34 +02:00
Erik Ernst acc5f59a99 Changes dart2js to warn at reified usage of method type variables.
This CL changes the response to `x is T`, `x is! T`, `x as T`, and `T`
used as a type expression (say, `foo(T)`) where `T` is a method type
variable: It will now emit a warning in these cases.

Test examples associated with `TYPE_VARIABLE_FROM_METHOD_NOT_REIFIED`
have been activated and corrected, such that this behavior is tested.

As a result 'language/generic_methods_type_expression_test.dart' will
now cause warnings when compiled with `dart2js`.

Note that this does not break any tests, because `dart2js` does not make
the compilation fail when there is a warning (also, the analyzer and the
vm are unaffected because this is about a change to `dart2js`, not a
change to the test file).

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/2001093006 .
2016-05-25 10:46:50 +02:00
Alan Knight 088dd409fc Add types on internal DateTime accessors
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2008163002 .
2016-05-24 17:36:33 -07:00
Ivan Posva ff47c8ab7f Fix flaky test failure:
- Do not interpret the header as a RawObject*.

BUG=

Review URL: https://codereview.chromium.org/2005423002 .
2016-05-24 16:03:25 -07:00