Jacob Richman
c3870fc93f
Fix mocking native classes and add a regression test.
...
BUG=
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2656363003 .
2017-01-27 14:34:19 -08:00
Vijay Menon
50ccf6d9b5
Fix DOM constructors in inline JS
...
R=jacobr@google.com
Review-Url: https://codereview.chromium.org/2659063002 .
2017-01-27 09:47:13 -08:00
Jennifer Messerly
0e00b3e5c8
fix #28008 , fix #28009 implement FutureOr<T>
...
This implements FutureOr<T> in strong mode, otherwise it's ignored (treated as `dynamic`.
Also fixes strong mode's inference subtype function incorrectly treating `void` as a malformed type. This had the consequence of allowing `void` to be inferred as a type argument.
R=leafp@google.com , paulberry@google.com
Review-Url: https://codereview.chromium.org/2647833002 .
2017-01-25 15:32:57 -08:00
Jacob Richman
d90ed8c295
Fix noSuchMethod handling of methods that are also extension methods. Fix noSuchMethod handling of methods with names that are rewritten in DDC e.g. "_get" instead of "[]" Fix some mirror system handling of symbols with names that are rewritten in DDC
...
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2623053004 .
2017-01-24 11:16:21 -08:00
Konstantin Shcheglov
b206c84210
Reland c9e1b88 and 56726fc with a DDC fix.
...
Revert "Revert "Use single InputPackagesResultProvider, without SdkSummaryResultProvider.""
This reverts commit b701ad6453 .
R=brianwilkerson@google.com , vsm@google.com
BUG=
Review-Url: https://codereview.chromium.org/2647323006 .
2017-01-24 09:13:26 -08:00
Jacob Richman
d6063ca391
Closes https://github.com/dart-lang/sdk/issues/28291
...
Fix extending a JS class and add a test to ensure it
continues to work from DDC. Note this behavior will never
be supported in Dartium and is not yet supported by Dart2JS.
BUG=
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2654583002 .
2017-01-24 07:20:31 -08:00
Vijay Menon
b701ad6453
Revert "Use single InputPackagesResultProvider, without SdkSummaryResultProvider."
...
This reverts commit c9e1b888a3 .
Revert "Remove parent from SummaryResynthesizer."
This reverts commit 56726fcce0 .
TBR=scheglov@google.com
Review-Url: https://codereview.chromium.org/2648213007 .
2017-01-24 06:21:38 -08:00
Konstantin Shcheglov
c9e1b888a3
Use single InputPackagesResultProvider, without SdkSummaryResultProvider.
...
Each SummaryResynthesizer is now responsible for creating its TypeProvider.
And with the new AnalysisDriver we stop using SDK CachePartition.
For now we add SDK's summary bundle into SummaryDataStore.
Eventually we will get rid of it and add individual SDK libraries.
R=brianwilkerson@google.com , paulberry@google.com , vsm@google.com
BUG=
Review-Url: https://codereview.chromium.org/2652823002 .
2017-01-23 16:54:17 -08:00
Leaf Petersen
8ae2f82dce
Eliminate redundant signatures.
...
The check to see that a method signature was redundant was not
handling generics correctly. This CL fixes it, so that we no
longer emit redundant signatures for methods on generic
classes. This should help with startup and code size a bit.
Fixes https://github.com/dart-lang/sdk/issues/28432
BUG=
R=rnystrom@google.com
Review-Url: https://codereview.chromium.org/2640793007 .
2017-01-19 12:44:39 -08:00
Bob Nystrom
590a188066
Use "Object" as the reified type of covariant override parameters.
...
This ensures the runtime type is of the tear-off expression's static
type, even when accessed through a superclass.
I also moved the two tests into a subdirectory so they are easier to
find. (It is inscrutable to me why we would have a single directory
with 1,868 test files in it.) That involved enabling recursive
directory listing in codegen_test, which exposed a couple of things.
Fix #27484 .
R=leafp@google.com
Review-Url: https://codereview.chromium.org/2641543003 .
2017-01-18 14:48:42 -08:00
Vijay Menon
5b34e47f40
Fix subtyping check on number
...
language_strong/null_is_test started failing on Konstantin's recent change. Another test started passing.
Does this fix make sense to you guys?
TBR=leafp@google.com ,scheglov@google.com
Review-Url: https://codereview.chromium.org/2638393004 .
2017-01-18 13:27:27 -08:00
Brian Wilkerson
22f561e914
Reapply "Add support for generic function type syntax, part 1"
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2622303006 .
2017-01-11 14:10:05 -08:00
Brian Wilkerson
85b1e7abbe
Revert "Add support for generic function type syntax, part 1"
...
Review-Url: https://codereview.chromium.org/2624283003 .
2017-01-11 13:30:52 -08:00
Brian Wilkerson
1cd918533d
Add support for generic function type syntax, part 1
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2613383003 .
2017-01-11 13:12:10 -08:00
Vijay Menon
df45dacb88
Fixes #28338
...
Fix await/cascade bug and corresponding test.
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2628053002 .
2017-01-11 12:37:18 -08:00
Vijay Menon
46b7f79fd5
Defer all recursive mixins
...
This defers mixins along with the supertype. It passes Leaf's example on the bug. Will add that as a proper test.
Fixes #28334
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2625913003 .
2017-01-11 10:32:23 -08:00
Vijay Menon
be95523221
Cleanup references to the old DDC repo
...
Reachable issues migrated over.
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2621543004 .
2017-01-10 12:56:29 -08:00
Leaf Petersen
83fc4b6b46
Put a TypeProvider on the TypeSystem implementations.
...
Adding a TypeProvider instance to TypeSystem to avoid needing to
thread it through the various APIs, and to avoid having to change
the API every time a method which previously did not need to
access the TypeSystem suddenly does.
BUG=
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2590883004 .
2017-01-09 02:40:10 -08:00
Dan Rubel
55ef6e193c
support --options flag and other analysis options flags in DDC
...
This updates DDC options processing to support:
* --options /path/to/analysis/options/file.yaml
* --enable-strict-call-checks
* --supermixin
* --no-implicit-casts
* --no-implicit-dynamic
As well as general refactoring and cleanup of DDC options processing
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2598593003 .
2017-01-04 18:15:21 -05:00
Jacob Richman
7f26211c26
Correct handling of cross-frame functions in ddc.
...
Misc fixes of dart:js support on ddc.
Work around issue with Blob constructor on ddc.
Fix incorrect dart:js test on dart2js (fixes https://github.com/dart-lang/sdk/issues/26197 )
BUG=
R=alanknight@google.com , leafp@google.com , rnystrom@google.com
Review-Url: https://codereview.chromium.org/2587203002 .
2016-12-19 15:00:55 -08:00
Dan Rubel
13bd1ad0bf
DDC/AnalyzerCLI common cmdline option processing
...
Refactor DDC and Analyzer CLI command line option processing
to use common createContextBuilderOptions method
and ContextBuilderOptions to hold common options.
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2584293003 .
2016-12-19 16:24:20 -05:00
Jennifer Messerly
77f53f609f
fixes #27385 , implement virtual fields in DDC
...
If a field is marked @virtual in Analyzer, DDC will allow it to be overridden as well
also fixes #28114 , abstract getters/setters broke generation of forwarding getters/setters
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2571363002 .
2016-12-15 11:39:25 -08:00
danrubel
a105d89e2b
refactor DDC and Analyzer CLI parser option declaration
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2580933002 .
2016-12-15 14:10:09 -05:00
danrubel
5b84611856
refactor DDC to support --ignore-unrecognized-flags
...
* add --ignore-unrecognized-flags to DDC
* refactor Analyzer CLI to use same filterUnknownArguments functionality
* remove now unused CommandLineParser and associated tests
R=brianwilkerson@google.com , vsm@google.com
Review-Url: https://codereview.chromium.org/2578113002 .
2016-12-15 10:46:09 -05:00
danrubel
1d4334739c
update DDC to use analyzer extractDefinedVariables
...
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2578463004 .
2016-12-14 20:43:53 -05:00
Vijay Menon
392c242df9
Add dart:io stubs to ddc sdk, define dart.library.html
...
Fixes #27302
R=brianwilkerson@google.com , jmesserly@google.com , rnystrom@google.com
Review-Url: https://codereview.chromium.org/2578573003 .
2016-12-14 12:34:33 -08:00
Bob Nystrom
b900a39620
Implement messages in assert() in dev_compiler.
...
Fix #27342 .
R=jmesserly@google.com
Review-Url: https://codereview.chromium.org/2568313002 .
2016-12-13 13:31:56 -08:00
Dan Rubel
f8cbc1423b
add verbose option to show hidden args
...
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2569783003 .
2016-12-13 09:46:15 -05:00
Brian Wilkerson
756cfc963d
Fix warnings
...
Review-Url: https://codereview.chromium.org/2564323002 .
2016-12-11 16:53:13 -08:00
Vijay Menon
e0e7efc351
Support callable classes where call is inherited
...
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2560983002 .
2016-12-08 12:04:10 -08:00
danrubel
ae9a362cc1
remove DDC --build-root option
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2553973004 .
2016-12-07 19:18:38 -08:00
Jennifer Messerly
ef4baafae5
fixes #28032 , await in cascade
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2559883002 .
2016-12-07 14:00:18 -08:00
Paul Berry
ae6fd961a1
Prepare for decoupling analyzer ASTs from element model.
...
This CL creates top level accessor functions which may be used to map from AST data structures to their corresponding elements and types, and begins using those accessor functions throughout the SDK. It also adds empty interfaces ResolutionTarget and ResolutionType, which are implemented by Element and DartType respectively.
In a future CL, I will change the types stored in the AST to ResolutionTarget and ResolutionType, rather than specific element types; this will decouple the ASTs from the element model. The presence of the accessor functions will allow clients to continue accessing elements and types in a type-safe way.
R=asgerf@google.com , brianwilkerson@google.com , scheglov@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/2551023005 .
2016-12-07 11:08:14 -08:00
Vijay Menon
69f0218802
Mark test pass on Chrome 55
...
TBR=alanknight@google.com
Review URL: https://codereview.chromium.org/2554523002 .
2016-12-05 05:55:44 -08:00
Vijay Menon
ec81359fc0
Fixes #27960
...
For "m.call(..)", the function is "m".
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2539033004 .
2016-12-01 15:38:46 -08:00
Alan Knight
1ff09b431f
Keep only a single active stack trace, enables traces for thrown non-exceptions
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2545923002 .
2016-12-01 13:41:08 -08:00
Paul Berry
2d289c2df6
Modify dev_compiler to use analyzer's new AstFactory class.
...
The old mechanism for creating analyzer ASTs (factory constructors on
the interface classes) will be going away in analyzer 0.30.
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2545843002 .
2016-12-01 10:37:22 -08:00
Bob Nystrom
aa749dbd8d
Sprinkle some types on the SDK like the static typing fairy.
...
When I'm looking at the dynamic call profiles of an internal app test,
I see a bunch coming from the SDK itself. In fact, the top five most
common dynamic call sites are in the SDK.
This fixes four of them. (The fifth is in runUnary() in Zone, and I
don't think can be made typed yet.)
R=vsm@google.com
Review URL: https://codereview.chromium.org/2542723003 .
2016-11-30 17:04:54 -08:00
Vijay Menon
88c5dd5745
Better mirrors support for mixins and private fields
...
This is generally motivated by pageloader usage.
R=rnystrom@google.com
Review URL: https://codereview.chromium.org/2535273002 .
2016-11-29 14:00:01 -08:00
Jacob Richman
1370b6bb46
Fix handling of static names for JS interop and improve test coverage.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2536823003 .
2016-11-29 13:33:19 -08:00
Jacob Richman
1b339deab2
Support lazy JS types.
...
BUG=
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/2515353003 .
2016-11-22 10:55:35 -08:00
Dan Rubel
f109556fb7
remove unused DDC --package-paths options and MultiPackageResolver
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2527433002 .
2016-11-22 11:20:23 -05:00
Jennifer Messerly
37029a22de
fix #27336 , ddc with recursive generic class type args
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2516483002 .
2016-11-17 15:38:33 -08:00
Jennifer Messerly
365d9a000a
fix #27784 and fix #27785 , fromEnvironment constants in DDC
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2503803004 .
2016-11-16 12:20:43 -08:00
Jacob Richman
27287baa57
Only re-export the main methods. The ddc codegen doesn't depend on any other methods being exported and export code for top level fields and all JS interop types was broken. This change reduces code size of a large Angular2 app by 6%.
...
BUG=
R=vsm@google.com
Review URL: https://codereview.chromium.org/2500283002 .
2016-11-15 09:35:44 -08:00
Vijay Menon
bc980498a1
Fix ddc whitelist op
...
R=jacobr@google.com
Review URL: https://codereview.chromium.org/2492523004 .
2016-11-09 15:23:04 -08:00
Jacob Richman
3356f82eb3
Fix crashing bug for closures of the form () { return; }
...
BUG=
R=jmesserly@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/2484913004 .
2016-11-08 15:14:10 -08:00
Jennifer Messerly
8f04f902df
fix #27771 , create directory if needed
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2483753004 .
2016-11-08 10:21:31 -08:00
Jennifer Messerly
3995146b55
fix #27775 , enum declaration where "name" is a property
...
R=vsm@google.com
Review URL: https://codereview.chromium.org/2488543002 .
2016-11-08 10:18:55 -08:00
Bob Nystrom
8daf4cfb73
Get the basics of deferred libraries working.
...
References to loadLibrary on a library prefix are compiled to a
helper function that returns a Future that always completes
successfully.
The deferred libraries aren't actually deferred, but code that uses
loadLibrary() now doesn't barf.
BUG=#27343
R=vsm@google.com
Review URL: https://codereview.chromium.org/2477673006 .
2016-11-07 10:41:23 -08:00