Commit graph

15966 commits

Author SHA1 Message Date
danrubel 4da09b06d0 enable fasta scanner in analyzer by default
* update test because fasta scanner correctly warns on 1.e+2
* fasta scanner correctly produces compile time error
    see dartbug.com/28664
    fix dartbug.com/28680
* update fasta AsciiControlCharacter error code
* enable fasta scanner in analyzer by default

R=ahe@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2967363003 .
2017-07-06 13:35:50 -04:00
Konstantin Shcheglov 09a5d31ec4 Add fileEndOffset to Class.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2971903006 .
2017-07-06 10:28:07 -07:00
Konstantin Shcheglov 2c33abdca9 Remove resynthesizing constructors for LocalVariableElementImpl.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2968203002 .
2017-07-06 10:23:02 -07:00
Konstantin Shcheglov b1c79f3363 Add @override(s) for Fasta MockElement(s).
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2970813005 .
2017-07-06 10:14:37 -07:00
Vijay Menon a67db4cd1e Remove failures
Weird - passing now.  Maybe some flakiness in our test framework?

TBR=jmesserly@google.com,rnystrom@google.com

Review-Url: https://codereview.chromium.org/2971193002 .
2017-07-06 10:06:54 -07:00
Brian Wilkerson fe445e079e Add a generated file that was missed
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2966223004 .
2017-07-06 09:55:29 -07:00
Brian Wilkerson cc5ccf5dcf Add unit tests for copy/paste support
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2965243002 .
2017-07-06 09:54:42 -07:00
Brian Wilkerson 75504c2b25 Remove references to AnalysisDriver from the plugin mixin classes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2970203002 .
2017-07-06 09:07:10 -07:00
Dmitry Stefantsov b1e629f078 Add tests for handling closures in LocalInitializers
BUG=https://github.com/dart-lang/sdk/issues/29887
R=sjindel@google.com

Review-Url: https://codereview.chromium.org/2944433002 .
2017-07-06 16:39:25 +02:00
Johnni Winther 69421f0f62 Bring js_model/model_test on par with compile_from_dill tests.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2967933002 .
2017-07-06 16:38:15 +02:00
Johnni Winther e340ee517a Handle static fields in js_model/model_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2970673004 .
2017-07-06 16:30:55 +02:00
Johnni Winther 550b74233f Handle instance/super methods in js_model/model_test
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2969993002 .
2017-07-06 16:15:54 +02:00
Johnni Winther ba4220c563 Split ClassEnv into env and data to avoid copying types/constants from the k-model
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2971673002 .
2017-07-06 15:45:41 +02:00
Johnni Winther f081f8b47d Support creating elements from IR nodes in JsKernelToElementMap
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2969013002 .
2017-07-06 15:29:56 +02:00
Johnni Winther 410a5b1585 Implement JsKernelToElementMap through KernelToElementMapBase
- create indexed entities eagerly in JsKernelToElementMap
- copy the env and data object
- avoid the need for JsCommonElements and JsElementEnvironment

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2972523002 .
2017-07-06 14:50:30 +02:00
Johnni Winther f32dbe2d27 Use entities in ParameterTypeInformation
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2970953003 .
2017-07-06 12:31:04 +02:00
Johnni Winther ae532f70c4 Change MemberTypeInformation.member type to MemberEntity
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2967153002 .
2017-07-06 12:19:03 +02:00
Johnni Winther 4ea9fa80ea Use MemberEntity more in type_graph_nodes
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2966053002 .
2017-07-06 12:10:45 +02:00
Johnni Winther e560a92ae7 Use entities internally in MemberTypeInformation
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2972653002 .
2017-07-06 11:43:43 +02:00
Johnni Winther 83082487bb Split MemberTypeInformation by member kind
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2971693002 .
2017-07-06 11:06:18 +02:00
Johnni Winther 69580bda61 Remove reference of LocalFunctionElement in ParameterTypeInformation.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2970863003 .
2017-07-06 10:56:05 +02:00
Johnni Winther 4c172a3dd9 Split TypeSystem.typeInformations into member/parameter info
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2967003002 .
2017-07-06 10:43:40 +02:00
Johnni Winther 09c5828204 Add EquivalenceVisitor to tools in js_ast
R=sra@google.com

Review-Url: https://codereview.chromium.org/2967843002 .
2017-07-06 10:39:28 +02:00
Johnni Winther 436eefbb33 Add NodeVisitor1 to js_ast
R=sra@google.com

Review-Url: https://codereview.chromium.org/2969873002 .
2017-07-06 10:24:53 +02:00
Devon Carew ca8d646ce1 Fix a telemetry test.
BUG=

Review-Url: https://codereview.chromium.org/2966373002 .
2017-07-06 00:02:59 -07:00
Devon Carew d4abd49df7 Add analytics to analyzer-cli and analysis server.
BUG=
R=brianwilkerson@google.com, scheglov@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2963323002 .
2017-07-05 23:29:46 -07:00
Konstantin Shcheglov 2bfde5a34e Don't serialize and resynthesize local variables.
It does not affect completion, because we create local variable
elements in a unit during resolution of this unit.

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

Review-Url: https://codereview.chromium.org/2963183002 .
2017-07-05 17:57:25 -07:00
Konstantin Shcheglov 7ed5e1c433 Remove ExecutableElement.localVariables altogether.
It is not used in analyzer or analysis_server, and in packages in
internal codebase.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2966313002 .
2017-07-05 16:59:41 -07:00
Konstantin Shcheglov 1bb532d854 Issue 30006. Don't flush on write to FileByteStore.
It turned out to be too expensive for some users.

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

Review-Url: https://codereview.chromium.org/2971063002 .
2017-07-05 15:33:28 -07:00
Konstantin Shcheglov ee177cb51e Remove other usages of ExecutableElement.localVariables.
Use AST to find LocalVariableElement(s), don't test for empty.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2971893002 .
2017-07-05 14:33:09 -07:00
Jennifer Messerly 5533a256cb fix #30030, fix #27327 - fix tearoffs and various Object member bugs
this includes various cleanups found along the way:
* various issues with JS annotations, see #30043
* getGenericClass is now optimized when used in a JS builtin with a Type literal
* typed list literals should be slightly faster to create
* memoized getters used by dart:_runtime should be faster
* registerExtension should be a tad faster, and now understands JSArray
* dart.bind "safeName" hack gone in codegenerator
* JSArray<E>.runtimeType returns List<E>
* JSArray<E>.noSuchMethod works
* cleans up code that generates `setExtensionBaseClass` (used only by JSArray)
* _throwUnsafe helper for generating a `throw` in --unsafe compile mode
* fix tearoff of JS interop types (_emitSimpleIdentifier)
* fix TODO about splitting LazyJSType and AnonymousJSType
* fix is/as/cast methods on TypeRep and related classes
* fix codegenerator to not tearoff "hashCode" and "runtimeType" (they are not methods)
* fix NoSuchMethodError.toString()   (update via dart2js sdk impl)

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2962263002 .
2017-07-05 14:17:53 -07:00
Brian Wilkerson d9754a58e9 Initial implementation of copy/paste support
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2972833002 .
2017-07-05 14:02:07 -07:00
danrubel 56f07cf770 Revert "enable fasta scanner in analyzer by default"
This reverts commit d16163ca0b.

BUG=

Review-Url: https://codereview.chromium.org/2967253002 .
2017-07-05 16:18:13 -04:00
danrubel bf2b3e7061 modifiy insertTokenBefore to return the inserted token
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2970983003 .
2017-07-05 15:50:08 -04:00
danrubel d16163ca0b enable fasta scanner in analyzer by default
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2970883004 .
2017-07-05 15:47:33 -04:00
Konstantin Shcheglov ce43a15e51 Stop depending of visiting LocalVariableElement(s) in Executableelement.visitChildren().
We still visit them, but analyzer and analysis_server don't need it.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2969343002 .
2017-07-05 12:28:20 -07:00
Bob Nystrom 52a9e3d9c6 Fix build_pkgs.dart to not mutate arguments list. (#30078)
* Fix build_pkgs.dart to not mutate arguments list.

Also remove build of when package since it's apparently gone now.

* Use sublist to remove element.
2017-07-05 12:20:58 -07:00
Brian Wilkerson d2569cc3ee Add lint timing information to the status pages
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2970153002 .
2017-07-05 12:00:42 -07:00
Brian Wilkerson 9bb89bc026 Duplicate change from NodeLocator to NodeLocator2
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2968023002 .
2017-07-05 11:24:08 -07:00
Brian Wilkerson 3c1c22a3a1 Add a quick fix for missing new (issue 30077)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2965063002 .
2017-07-05 10:59:34 -07:00
Konstantin Shcheglov 7ea7324747 Remove CompilationUnitElement.getElementAt().
It is not used by any package we use internally.
It was added for search, but is not used anymore.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2967203002 .
2017-07-05 10:52:02 -07:00
Konstantin Shcheglov cfbf85c340 Remove unused PubVerifier.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2973683002 .
2017-07-05 10:33:21 -07:00
Konstantin Shcheglov e93566189f Fix for types of function-typed parameters in reified type of MethodElement.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2965053002 .
2017-07-05 10:32:31 -07:00
Vijay Menon 7b766556a1 Update test status
See #30075

TBR=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2967193002 .
2017-07-05 10:16:25 -07:00
Konstantin Shcheglov cf66612116 Change UnusedLocalElementsVerifier to AST visitor.
We are moving to excluding local elements from the element model,
so we cannot use element visitor to visit and report local elements.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2967183002 .
2017-07-05 10:12:05 -07:00
Konstantin Shcheglov ec621a67c1 Remove HintGenerator.
It is not used neither by tasks, nor by the driver.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2971843002 .
2017-07-05 09:38:25 -07:00
Vijay Menon 9cbd5bdc2e Output errors for tests that fail to compile
This makes it easier to fix strong mode errors in tests.

R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2971443002 .
2017-07-05 09:37:14 -07:00
Brian Wilkerson 62f43f663b Fix a bug in inline method refactoring
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2973673002 .
2017-07-05 09:35:48 -07:00
Brian Wilkerson 895f898b9b Make analyzer respect exclusions from the analysis options file
R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2967883002 .
2017-07-05 07:52:48 -07:00
Peter von der Ahé f1f884011f Improve warnings related to incorrect 'part of' declarations.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2967143002 .
2017-07-05 15:22:57 +02:00