Commit graph

46159 commits

Author SHA1 Message Date
Jacob Richman be6d22e015 Roll back files where the formatter made non-whitespace changes.
This is due to a bug in how the formatter handled generic functions.
BUG=

Review-Url: https://codereview.chromium.org/2822103002 .
2017-04-17 22:12:57 -07:00
Stephen Adams 0c83262a1e Use shorter names for some standard properties on closures.
BUG= https://github.com/dart-lang/sdk/issues/25003
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2820953002 .
2017-04-17 18:51:18 -07:00
Stephen Adams 835f06a488 dart2js: fast startup: cache common superclass in inheritance
- group classes by common superclass
- cache superclass in local to reduce property accesses

Shrinks minified large app by 0.2%

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2813743003 .
2017-04-17 14:57:50 -07:00
Jacob Richman b280a7803d Dev compiler debugger related tweaks.
Optimize dynamic call tracking using random sampling.
Apply source maps to improve dynamic call tracking accuracy.
Dynamic calls within the sdk are now attributed correctly.

Fix bug formatting modules where we were incorrectly flagging them as JS.

BUG=
R=jmesserly@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2811343002 .
2017-04-17 14:57:31 -07:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Konstantin Shcheglov 0adb817be2 Fix cast exception when a Handle gets a wrong element because of name conflict.
For example:

type 'TopLevelVariableElementImpl' is not a subtype of type 'FunctionTypeAliasElement' in type cast where
  TopLevelVariableElementImpl is from package:analyzer/src/dart/element/element.dart
  FunctionTypeAliasElement is from package:analyzer/dart/element/element.dart

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2824873002 .
2017-04-17 14:52:31 -07:00
Konstantin Shcheglov 62320cc838 Issue 25558. Report an error, but don't crash when AST it too deep.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25558

Review-Url: https://codereview.chromium.org/2823993002 .
2017-04-17 14:46:55 -07:00
Zachary Anderson 9ce608e89d [dart:io] Adds ProcessInfo.{max,current}Rss. Adds OS::MaxRSS on Fuchsia.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2822943002 .
2017-04-17 14:41:40 -07:00
Zach Anderson d42f61155f [fuchsia] Use new mx_deadline_after interface
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2822833002 .
2017-04-17 13:49:49 -07:00
Devon Carew d02519aec4 Make the analysis server integration tests driver only.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2820893002 .
2017-04-17 11:23:38 -07:00
John McDole d22325025d Fix include paths in runtime/include (#29362)
* Fix include path 

"dart_api.h" is in the same directory as "dart_tools_api.h"

* Update dart_mirrors_api.h

* Update dart_native_api.h
2017-04-17 11:04:47 -07:00
Steve Messick b9f9ad24f1 Add completion for do-stmt, refactor for reuse
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2816943005 .
2017-04-17 10:56:26 -07:00
Kevin Moore 040c4bfdcf Also updated dartium deps
follow-up from https://codereview.chromium.org/2824783002/
fab7b0028f

R=het@google.com

Review-Url: https://codereview.chromium.org/2821993002 .
2017-04-17 10:47:43 -07:00
Kevin Moore fab7b0028f Update to the latest dart2js_info 0.5.4+2
Review-Url: https://codereview.chromium.org/2824783002 .
2017-04-17 10:42:13 -07:00
Stephen Adams cdba92a563 dart2js: --fast-startup: share defaultValues property for closures with no default values
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2820573005 .
2017-04-17 10:27:17 -07:00
Ryan Macnak 1c62b6b772 Make --trace-natives respect the isolate filter.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2818253002 .
2017-04-17 10:22:50 -07:00
Konstantin Shcheglov 63a6f83739 Issue 29360. Fix type name resolution for GenericTypeAliasElement.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29360

Review-Url: https://codereview.chromium.org/2827463002 .
2017-04-17 10:16:28 -07:00
Vijay Menon a3d2e49198 Revert "Revert "Report error if the same uri appears in multiple summaries.""
Relanding after fixing package_bundle_reader_test.dart.

Note, original CL (already reviewed here: https://codereview.chromium.org/2781483007/) is patch set 1.

Test fix is patch set #2.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2825503002 .
2017-04-17 10:11:21 -07:00
Ryan Macnak 29de769d98 Allow the resolved names cache to be lazily created like the exported names cache.
R=regis@google.com

Review-Url: https://codereview.chromium.org/2823633003 .
2017-04-17 10:07:27 -07:00
Konstantin Shcheglov 124f874b4a Make copy of the drivers list in SearchEngineImpl2 to avoid ConcurrentModificationError.
I think this happens when a driver is disposed why search is in
progress. So, we need to make defensive copies.

This also makes me realize that we don't handle situations when
a driver instance is disposed, but it has pending requests, such as
getResult(), getIndex(), etc - actually any getXXX(), and search. As
it is now, I think we just leave these Future(s) and they never
complete.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2818163003 .
2017-04-17 09:41:52 -07:00
Ryan Macnak 0733810528 Use to_snapshot when cluster serializing LibraryPrefixes.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2822843002 .
2017-04-17 09:04:13 -07:00
Régis Crelier fd5089c9e8 Remove parent_level field of function type parameters.
Add function_type_arguments field in closure instances.
Lots of other smaller changes, also related to generic function semantics.
This is still work in progress, with a change of direction in the design:
The type argument vector of a generic function will be prepended with the type
arguments of enclosing generic functions. The re-allocation and concatenation
will be done in nested generic function's prolog. This will greatly simplify
instantiation of types at run time without having to search the context for
parent function's type arguments. However, a closure instance now requires an
additional field. On the other hand, type parameters do not require a
parent_level field anymore.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2818273002 .
2017-04-17 08:58:24 -07:00
Vijay Menon dcdccf4750 Revert "Report error if the same uri appears in multiple summaries."
This reverts commit 2afa21bb2c.

Breaking the bots.

TBR=jmesserly@google.com
BUG=

Review-Url: https://codereview.chromium.org/2821933002 .
2017-04-17 08:07:36 -07:00
Vijay Menon 2afa21bb2c Report error if the same uri appears in multiple summaries.
Fixes #27025

R=brianwilkerson@google.com, jmesserly@google.com

Review-Url: https://codereview.chromium.org/2781483007 .
2017-04-17 07:32:59 -07:00
Devon Carew eb1839b8fd Minor changes to the generated spec, and display deprecated methods better.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2800283002 .
2017-04-15 13:43:36 -07:00
Ryan Macnak b810cb2fe5 Ensure resolved packages before _Dart_kResolveAsFilePath.
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2820853002 .
2017-04-14 15:55:03 -07:00
Stephen Adams b0599b2647 dart2js: eliminate useless conditionals
1. Simplify HPhi nodes that merge refinements of the same value.

2. Replace the condition of HIf with a constant when the HIf does nothing (no controlled statements or phis).

Together with existing optimizations, this can optimize `s?.toString()` to `s` when `s` is known to be a nullable String.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2823543002 .
2017-04-14 14:34:05 -07:00
Zachary Anderson e79354546d Update DEPS for BUILD.gn in func package
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2820713003 .
2017-04-14 13:26:35 -07:00
Stephen Adams 7e301f767b dart2js: Avoid inserting redundant HTypeKnown
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2815403004 .
2017-04-14 11:40:12 -07:00
Konstantin Shcheglov 2d0d000611 Flush on write in FileByteStore.
We see (rarely, but still) situations when FileState attempts to read
a *.unlinked file, but the file is empty. We think that this happens
when the user's machine crashes, so files are created, but not fully
written to disk.

This change has its cost - increase of FileByteStore.put() CPU usage
from 7% to 10% on Mac.

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

Review-Url: https://codereview.chromium.org/2821683002 .
2017-04-14 10:53:22 -07:00
Kevin Moore 1120d10daf Finish cleaning up analyzer warnings
Also Updated pubspec to use the SDK version of kernel

Closes https://github.com/dart-lang/sdk/issues/28454

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2815383003 .
2017-04-14 10:28:07 -07:00
Jennifer Messerly b76e2d67cf fix #29346, ensure all nodes are implemented by DDC's code generator
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2822633003 .
2017-04-14 10:10:50 -07:00
Mike Fairhurst 37aeef8d6e Tick angular analyzer DEPS to 0.0.8
BUG=
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2814793006 .
2017-04-14 08:22:57 -07:00
Brian Wilkerson fcac30e080 Reland: Fix more parser bugs
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2812243006 .
2017-04-14 07:26:29 -07:00
Konstantin Shcheglov 95cfe76812 Add a flag for caching all analysis results in the driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2818623003 .
2017-04-13 19:17:48 -07:00
Emily Fortuna 93a908fde0 Remove BackendClasses and JavaScriptBackendClasses.
BUG=
R=johnniwinther@google.com, sra@google.com

Review-Url: https://codereview.chromium.org/2813093002 .
2017-04-13 17:22:54 -07:00
Stephen Adams a7a1811f18 dart2js: type analysis: yield escapes its argument
BUG= https://github.com/dart-lang/sdk/issues/29046
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2811993006 .
2017-04-13 13:41:01 -07:00
Stephen Adams d15da7d900 dart2js: Capture typedef arguments once
The type Map<T, Foo<Set<T>>> contains one type variable referenced twice,
so there are two inputs into the HTypeInfoExpression instruction.

If Foo is a typedef, T can be reused, e.g.

    typedef E Foo<E>(E a, E b);

As the typedef is expanded (to Function(Set<T>, Set<T>) => Set<T>) it
should not consume additional types from the to-level input.  We
prevent this by capturing the types and using the captured type
expressions inside the typedef expansion.

TODO: We should make the type subexpression Foo<...> be a second
HTypeInfoExpression, with Set<T> as its input (a third
HTypeInfoExpression). This would share all the Set<T> subexpressions
instead of duplicating them. This would require HTypeInfoExpression
inputs to correspond to type variables AND typedefs.

BUG= https://github.com/dart-lang/sdk/issues/28749
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2812393003 .
2017-04-13 12:45:32 -07:00
Ben Konyi c8e1e2aad7 Fixed spelling mistakes in HttpRequest documentation.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2805133002 .
2017-04-13 11:49:34 -07:00
Ben Konyi d7c55fb926 Updated status file to allow for RuntimeErrors in raw_synchronous_socket_tests temporarily while the cause of flakiness is found.
BUG=
R=alanknight@google.com

Review-Url: https://codereview.chromium.org/2822523002 .
2017-04-13 11:29:35 -07:00
Mike Fairhurst bffe47e678 First stab at #29153 range check in as-casts. Mostly working.
Having an issue forwarding Symbol::InTypeCheck into dart and back;
without it, the exceptions that are thrown are `TypeError`s and not
`CastError`s.

Certainly a bit longform to read, as well.

Committing for feedback/suggestions/help

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2805903004 .
2017-04-13 10:44:57 -07:00
Mike Fairhurst d55dc29727 Temp fix to allow plugins to serve the getErrors APIs.
Had to allow a means of supplementing existing errors/line info, but
then also for where dart has no response whatsoever (like html), need a
way to provide analysis options and line info in addition to errors.

Happy to clean it up, but also not very motivated to make it perfect
since it should be temporary.

BUG=
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2815643004 .
2017-04-13 10:37:39 -07:00
Alan Knight 7bf59fac63 Revert "Fix more parser bugs"
This reverts commit 65f8d25aa0.

BUG=

Review-Url: https://codereview.chromium.org/2821483003 .
2017-04-13 10:07:40 -07:00
John McCutchan 6f039b508b Kill dead code
BUG=

Review-Url: https://codereview.chromium.org/2819573002 .
2017-04-13 09:55:13 -07:00
Brian Wilkerson 65f8d25aa0 Fix more parser bugs
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2817873003 .
2017-04-13 09:26:31 -07:00
John McCutchan 7399d4bdec DBC follow up CL
- [x] Hoist handle out of loop.
- [x] Avoid allocating a handle.

BUG=

Review-Url: https://codereview.chromium.org/2819523003 .
2017-04-13 07:38:15 -07:00
Brian Wilkerson b277f1023c Fix parser error
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2809213005 .
2017-04-13 06:14:05 -07:00
Ben Konyi cf6165c767 Fixed status file to not expect a raw_synchronous_socket_test crash on the analyzer bots.
TBR=zra@google.com
BUG=

Review-Url: https://codereview.chromium.org/2811363003 .
2017-04-12 16:16:35 -07:00
Ryan Macnak 00c2af904f GN: Remove dead target 'libdart' and dead flag 'dart_experimental_interpreter'.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2819453002 .
2017-04-12 16:05:37 -07:00
Ryan Macnak 39040a8a15 Never erase parameter types in the JIT.
Even in unchecked mode with mirrors disabled, we need to be able to forward parameter types to lazily generated implicit closure functions.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2808763008 .
2017-04-12 15:40:42 -07:00