Zhivka Gucevska
b00a85231e
Parametrize over the additional agrument type for StatementVisitor1 and ExpressionVisitor1
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2835453002 .
2017-04-20 18:03:15 +02:00
Zhivka Gucevska
feb38e4c8b
Implement expression evaluation in Coninuation Passing Style
...
This enables support for Return statements.
BUG=
R=dmitryas@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2806483003 .
2017-04-20 15:22:33 +02:00
Paul Berry
e3347e03f7
Use a non-null TypeInferrer even in non-strong mode.
...
This is necessary because some of the TypeInferrer's roles (e.g. type
promotion and determination of the types of constants) are still
needed in non-strong mode.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2829683008 .
2017-04-20 04:11:19 -07:00
Paul Berry
e8e8359cdf
Add local type inference logic for integer literals.
...
This CL introduces Fasta's first type inference rule, and hooks it up
to all the necessary testing infrastructure. The rule is that a local
variable whose initializer is an integer literal should have an
inferred type of int.
Only variables occurring at top level within a method are inferred (we
don't yet recurse inside sub-blocks).
Additional type inference rules will be added in follow-up CLs.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2828693003 .
2017-04-20 03:36:19 -07:00
Peter von der Ahé
9356e3cd61
Check const constructors.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2799973003 .
2017-04-20 10:55:58 +02:00
Paul Berry
b5c6053deb
Add explicit return types to work around #29398 .
...
In a future CL I need to add an import to this file, and for reasons I
haven't been able to track down, doing so causes type inference
failures. This CL works around the problem by making the affected
types explicit.
Once the bug is fixed, I hope to be able to revert this.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2833563004 .
2017-04-20 01:29:49 -07:00
Peter von der Ahé
e2eee219ac
Complain about incorrect this/super constructor initializers.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2800083002 .
2017-04-20 10:04:12 +02:00
Johnni Winther
ab195dac63
Remove backend dependency from TypeTestRegistry
...
- and move RuntimeTypesChecks to TypeTestRegistry.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2826083002 .
2017-04-20 09:32:51 +02:00
Peter von der Ahé
cf6b2736ec
Wrap VariableDeclarations in Blocks as specified by Kernel.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2801283002 .
2017-04-20 09:31:36 +02:00
Konstantin Shcheglov
a73c8d0de1
MethodElementImpl.getReifiedType() should always create new parameter elements.
...
If we don't, and we transplant any of them into a new detached instance
of synthetic FunctionElementImpl, they are not able to access later
enclosingUnit in order to resynthesize their type.
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2829843002 .
2017-04-19 16:36:34 -07:00
Vijay Menon
8a64625d81
Regenerate DDC artifacts
...
TBR=jacobr@google.com
Review-Url: https://codereview.chromium.org/2830983002 .
2017-04-19 16:26:22 -07:00
Mike Fairhurst
746fd35307
Now that contextRoot is within the is check, don't need contextRoot at all
...
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2828103002 .
2017-04-19 15:45:20 -07:00
Sigmund Cherem
b57ca9fb55
Fix front-end tests: the original code is correct, this is a workaround for issue #29393
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2834533002 .
2017-04-19 15:37:03 -07:00
Emily Fortuna
6c25a58dab
Make backend.setAnnotations (mostly) handle LibraryEntities.
...
BUG=
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2824123003 .
2017-04-19 15:36:33 -07:00
Brian Wilkerson
ba3ed4ba37
Initial support for getting fixes from plugins
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2830863002 .
2017-04-19 15:00:00 -07:00
Steve Messick
0829174516
Complete for-each and switch statements
...
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2826283002 .
2017-04-19 14:44:41 -07:00
Konstantin Shcheglov
7faf4bac93
Add FileSystemState.knownFilesSetChanges stream.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2826243002 .
2017-04-19 13:23:34 -07:00
Brian Wilkerson
653f9defb1
Prepare to publish another alpha
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2834493003 .
2017-04-19 13:01:40 -07:00
Stephen Adams
6c75646b3e
Revert "Remove JavaScriptBackend from ClosedWorldBase"
...
TBR=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2828873002 .
2017-04-19 12:55:14 -07:00
Brian Wilkerson
a3102bf441
Add support for reporting plugin data to instrumentation
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2834453002 .
2017-04-19 11:01:24 -07:00
Konstantin Shcheglov
0ce4611fd9
Move 'general function type' unit tests into mixins to run them with Fasta.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2829693002 .
2017-04-19 10:11:21 -07:00
Konstantin Shcheglov
91d6dcf9fb
We cannot use relative URIs to reference files outside of a package.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2830733002 .
2017-04-19 10:09:14 -07:00
Jacob Richman
6ac3a24a2e
Run formatter on the analyzer.
...
BUG=
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2826693004 .
2017-04-19 08:24:09 -07:00
Peter von der Ahé
6bd0085ec1
Throw isn't a constant expression.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2801873008 .
2017-04-19 15:55:05 +02:00
Paul Berry
a682c6a97e
Introduce a testing framework for use with fasta type inference.
...
The framework will allow test source files to be annotated with
comments indicating where types are expected to be inferred, for
example:
var /*@type=dart.core::int*/ x = 1;
Other features of the testing framework:
- Normally only those expectations explicitly listed will be checked.
The special comment "/*@testedFeatures=inference*/" at the top of
the file turns on extra checking which will cause the test to fail
if any unexpected type inference occurs.
- Should be easy to extend to support other features, such as checking
that the proper errors and warnings are generated at the proper
locations.
- If the test is run with "-DupdateExpectations=true", the
expectations will be updated in place.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2824393002 .
2017-04-19 06:54:08 -07:00
Peter von der Ahé
0ceb30a5e0
Make zero-termination optional.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2827543006 .
2017-04-19 15:29:00 +02:00
Peter von der Ahé
e534a45cec
Handle bad rethrows.
...
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2802203002 .
2017-04-19 15:17:10 +02:00
Peter von der Ahé
f1a6b12341
Parse escapes in analyzer machine output and handle Windows file names.
...
R=johnniwinther@google.com
Review-Url: https://codereview.chromium.org/2823293003 .
2017-04-19 14:36:09 +02:00
Peter von der Ahé
73159e7f56
Skip all fasta tests when build directory may be missing.
...
R=erikcorry@google.com
Review-Url: https://codereview.chromium.org/2831573002 .
2017-04-19 14:31:59 +02:00
Peter von der Ahé
ba0e07846f
Produce a compile-time error if there's no main method.
...
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2801853006 .
2017-04-19 14:28:10 +02:00
Erik Corry
23c0caf4dc
Revert "New Lint quick-fix: prefer_collection_literals ( #29378 )"
...
This reverts commit 6a56c86c81 .
This a gardener revert to fix buildbot redness.
R=karlklose@google.com , loitsch@google.com
TBR=casanueva@google.com
BUG=
Review-Url: https://codereview.chromium.org/2827863003 .
2017-04-19 12:49:07 +02:00
Johnni Winther
ee4b776108
Remove JavaScriptBackend from ClosedWorldBase
...
Also extract more extract more methods from ClosedWorldImpl into
ClosedWorldBase.
This is a step towards creating a closed world object from kernel based
elements. This CL adds the first mock of that object.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2826673002 .
2017-04-19 11:14:02 +02:00
Peter von der Ahé
2d9956a93d
Move kernel baseline tests to front_end.
...
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2825063002 .
2017-04-19 10:57:58 +02:00
Paul Berry
84ef5ed2da
Add the ability to select a subset of tests using "...".
...
For example, the following command:
pkg/front_end/tool/fasta testing compile/type...
Now runs all tests in the "compile" suite whose name begins with
"type".
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2824373002 .
2017-04-19 01:45:34 -07:00
Johnni Winther
407645660c
Remove Compiler and JavaScriptBackend from program_builder and collector.
...
This is a step towards passing data object directly instead of accessing
data on JavaScriptBackend. This is needed to support an element switch
between resolution and codegen.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2824823004 .
2017-04-19 10:44:57 +02:00
Johnni Winther
230c1745cd
Remove Compiler and JavaScriptBackend from class_stub_generator
...
This is a step towards passing data object directly instead of accessing
data on JavaScriptBackend. This is needed to support an element switch
between resolution and codegen.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2820143004 .
2017-04-19 10:40:11 +02:00
Johnni Winther
23684c221e
Remove Compiler and JavaScriptBackend from field_visitor.
...
This is a step towards passing data object directly instead of accessing
data on JavaScriptBackend. This is needed to support an element switch
between resolution and codegen.
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2823003003 .
2017-04-19 10:30:55 +02:00
Peter von der Ahé
433575f618
Remove kernel baseline tests.
...
In CL 2824203002 the associated test cases are moved to pkg/front_end which uses pkg/testing to replace what's implemented in these tests.
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2824203002 .
2017-04-19 10:22:25 +02:00
jpaulsen
6a56c86c81
New Lint quick-fix: prefer_collection_literals ( #29378 )
2017-04-18 18:55:08 -07:00
Paul Berry
13941eaa03
Plumb TypeInferrer through KernelExpression._inferExpression.
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2827793003 .
2017-04-18 18:40:46 -07:00
Jacob Richman
0dbb32f406
Run formatter on dev_compiler.
...
BUG=
R=vsm@google.com
Review-Url: https://codereview.chromium.org/2830503002 .
2017-04-18 16:16:14 -07:00
Paul Berry
ea0c1d8f35
Address nits from https://codereview.chromium.org/2823243002/
...
I thought I'd made these changes prior to landing the above CL, but I
accidentally made them to the wrong branch, so they didn't wind up
getting committed.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2821193004 .
2017-04-18 15:46:08 -07:00
Steve Messick
6a19d96ee2
Complete for-statement
...
R=brianwilkerson@google.com , scheglov@google.com
Review-Url: https://codereview.chromium.org/2824233002 .
2017-04-18 15:20:31 -07:00
P.Y. Laligand
36a7e49822
Updated build files for Fuchsia. ( #29382 )
2017-04-18 15:02:19 -07:00
Stephen Adams
2955ecc794
Increase tracing limit
...
Increasing from 16 to 32 has a lot of nice small improvements and does
not seem to affect compile time (within benchmark noise).
BUG=
R=sigmund@google.com
Review-Url: https://codereview.chromium.org/2826623002 .
2017-04-18 15:00:20 -07:00
jpaulsen
c386e41f25
New Lint quick-fix: avoid_init_to_null ( #29367 )
2017-04-18 14:13:53 -07:00
Mike Fairhurst
0aa8574a04
Fix failure using custom drivers with AnalysisDriverScheduler
...
Or alternatively, the AnalysisDriverGeneric interface could be extended?
BUG=
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2815913006 .
2017-04-18 14:02:58 -07:00
P.Y. Laligand
043b8ebbf2
Fixed test failing on Windows. ( #29380 )
2017-04-18 12:50:50 -07:00
Konstantin Shcheglov
955d7cf037
Fix for instance fields inference when a setter has no parameter.
...
R=brianwilkerson@google.com
BUG=
Review-Url: https://codereview.chromium.org/2828573002 .
2017-04-18 12:26:38 -07:00
Konstantin Shcheglov
19353f9e63
Issue 29358. Fix for reporting constant errors while evaluating constructor invocations.
...
We should not report errors in one file using offsets of node in
another file.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/29358
Review-Url: https://codereview.chromium.org/2825813002 .
2017-04-18 12:13:23 -07:00