Commit Graph

165 Commits

Author SHA1 Message Date
scheglov@google.com 03819fe9e0 Analyzer snapshot to with FunctionElement.identifier fix.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//346303003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37625 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 22:03:08 +00:00
scheglov@google.com 6b6467a9ca New analyzer snapshot.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//348673002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37516 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-19 20:58:28 +00:00
paulberry@google.com 238ea2c84e Fixes to CaughtException and AnalysisException
Two issues:

1. Some exceptions don't derive from Exception (for example
   NoSuchMethodError).  So to avoid problems in checked builds,
   CaughtException.exception needs to have type Object.

2. When an exception is caught by the unittest framework, it prints it
   using its toString() method.  So in order to see the stack trace of
   the CaughtException nested in an AnalysisException, we need
   AnalysisException's toString() to print both the exception and its
   cause (if any).

R=brianwilkerson@google.com, jwren@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//304293010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37186 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 17:16:48 +00:00
brianwilkerson@google.com 04cc76da9f Add intern support to analyzer.
In tests, this reduces the memory requirements for engine by about 15%. I have only enabled it for the command-line analyzer, though, because other uses will need to guard against memory leaks.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//325473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37112 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-07 15:57:01 +00:00
kevmoo@google.com b81ffd913b pkg/analyzer: updated unittest dependency
R=scheglov@google.com

Review URL: https://codereview.chromium.org//322533004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37109 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-07 00:43:56 +00:00
scheglov@google.com d06a1cff08 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//322603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37096 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 19:48:47 +00:00
scheglov@google.com 5c5e55205c Formatter: fix for long multiline strings.
R=brianwilkerson@google.com, pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org//322563002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37088 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 17:25:56 +00:00
scheglov@google.com 591ecb6f1e Formatter: keep a right parenthesis ')' with the last argument.
R=brianwilkerson@google.com, pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org//321513006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37087 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 17:09:51 +00:00
scheglov@google.com be92cd5009 Tweaks for long formal parameters and method body '{' formatting.
R=brianwilkerson@google.com, pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org//320503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37084 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 15:33:56 +00:00
scheglov@google.com d83c344f43 Formatter: don't indent EOL comment at the beginning of a line.
R=brianwilkerson@google.com, pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org//319063004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37083 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 15:32:22 +00:00
scheglov@google.com 979d9be919 Formatter: do not use a space when using < and > for a map literal.
R=brianwilkerson@google.com, pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org//322483002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37082 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 15:29:54 +00:00
sigmund@google.com c6a19ab344 Use parseDirectives were possible. Also mark analyzer ready to be released.
R=blois@google.com, brianwilkerson@google.com, jmesserly@google.com

Review URL: https://codereview.chromium.org//318983002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37063 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 02:04:07 +00:00
rnystrom@google.com 936d017b63 Only parse the directives when rewriting imports.
This shaves about 13% (a little under a second) off the time it
takes to load the asset environment for TodoMVC in my tests.

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

Review URL: https://codereview.chromium.org//314583007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36960 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-03 23:27:37 +00:00
brianwilkerson@google.com 640bc9d2e9 Communicate defined variables to the context. With this change we ought to be able to get defined variables from the command-line to the context and should be unblocked for using the values in constant evaluation.
R=paulberry@google.com

Review URL: https://codereview.chromium.org//300043012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36695 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 16:45:51 +00:00
scheglov@google.com 555bc4ef2d New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//294903015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36511 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 16:58:29 +00:00
brianwilkerson@google.com 7b4b6ff25b Parse defined variables in command-line analyzer. We can't actually make use of them until we translate a new version, but it's one step closer.
R=pquitslund@google.com

Review URL: https://codereview.chromium.org//290733010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36508 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 16:45:19 +00:00
scheglov@google.com af851cdcdc New analyzer snapshot (with CaughtException).
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//285423002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36256 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-16 01:43:54 +00:00
danrubel@google.com c36b9bca40 set exitCode on errors or warnings
BUG=dartbug.com/18761
R=scheglov@google.com

Review URL: https://codereview.chromium.org//287653003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36124 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-13 20:04:23 +00:00
scheglov@google.com 862a54b592 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//267293006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35872 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 22:06:01 +00:00
rnystrom@google.com 5dd0a26730 Move allowTrailingOptions into ArgParser.
R=brianwilkerson@google.com, jmesserly@google.com, nweiz@google.com

Review URL: https://codereview.chromium.org//260963007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35837 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 23:25:59 +00:00
scheglov@google.com 593096bef2 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//263913003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35704 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 20:06:26 +00:00
pquitslund@google.com c9bf850f58 Support for new 'deferred' import declaration modifier.
R=brianwilkerson@google.com, jwren@google.com

Review URL: https://codereview.chromium.org//264473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35553 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 23:06:25 +00:00
pquitslund@google.com 7095d194ab Test fixes to catch up with Parser changes (dartbug.com/18315).
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//254133006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35547 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 22:23:25 +00:00
scheglov@google.com 496aa45ed1 New analyzer snapshot. Sorted unit members.
New Character utilities.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//259773005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35468 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-26 22:37:24 +00:00
paulberry@google.com 0af02e38a1 Comment out generated resolver tests (TBR).
Review URL: https://codereview.chromium.org//252723002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35427 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 15:38:43 +00:00
paulberry@google.com 6c000ea2cb New analyzer snapshot, based on r35422.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//257773008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35426 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 15:18:19 +00:00
scheglov@google.com d1cc18b5e1 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//247053004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35270 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 17:10:47 +00:00
scheglov@google.com 314fd76902 New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//243263004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35179 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-18 19:55:14 +00:00
pquitslund@google.com 9f93ab5937 Annotation whitespace convention fixes (dartbug.com/17837).
R=scheglov@google.com

Review URL: https://codereview.chromium.org//225863005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34902 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 22:22:31 +00:00
scheglov@google.com f8e1c92a55 Comment out resolver tests to fix VM bot.
TBR

R=jwren@google.com
BUG=

Review URL: https://codereview.chromium.org//228323003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34895 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 20:46:57 +00:00
pquitslund@google.com 3edb0efcf4 Fix constructor initializer space conventions (dartbug.com/17642).
R=scheglov@google.com

Review URL: https://codereview.chromium.org//231743002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34893 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 20:25:36 +00:00
scheglov@google.com e5652e0e90 New analyzer snapshot with MapIterator.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//229653004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34891 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 20:18:01 +00:00
brianwilkerson@google.com b4cdb0dc98 Add new performance option to get both cold and warm timings.
@Rico: Does it matter that the errors will be written between the two sets of timings?

R=scheglov@google.com

Review URL: https://codereview.chromium.org//227533005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34817 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 11:08:36 +00:00
scheglov@google.com bd532a6990 Correct or pause previous TimeCounters.
R=brianwilkerson@google.com, jwren@google.com
BUG=

Review URL: https://codereview.chromium.org//225183020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34809 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 05:08:08 +00:00
scheglov@google.com 6da7a82a20 Fix for translation of \!= to \!identical(), but use == and \!= for Enum.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//221483002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34636 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 03:09:22 +00:00
scheglov@google.com d5780f88b9 Rollback 215463002.
R=brianwilkerson@google.com, ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//215683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34491 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 23:57:32 +00:00
scheglov@google.com 5a9afd5f64 Move Dart-based analyzer script to packages.
Rico, can you please change the performance tool to use this pkg/analyzer/bin/analyzer script?

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

Review URL: https://codereview.chromium.org//215463002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34483 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 21:38:35 +00:00
scheglov@google.com 1145c19860 Rollback pkg/analyzer that breaks code_transformers
R=blois@google.com, brianwilkerson@google.com, sigmund@google.com
BUG=

Review URL: https://codereview.chromium.org//214593008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34479 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 20:29:08 +00:00
scheglov@google.com 240b4138ce Translate Java enums to Dart constants.
1. Restore "this.field" field formal initializers.

2. Tweaks for several Java places - mostly to the constructors; but also duplicate HintCode messages (in Dart we cannot get values of constant values final fields).

3. Translate field that are not written to Dart final fields and also to field initializers, even if there are no property for them.

4. And constant enums.

5. pkg/code_transformers/test/resolver_test has to be skipped, I cannot fix it myself.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//214253002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34474 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 15:37:37 +00:00
scheglov@google.com 920a3e9c23 Switch the command line Dart-based analyzer back to the synchronous API.
This improves timing for dart2js analysis from 8000 ms to 7700 ms (vs. 7300 ms for Java-based analyzer).

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//210463002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34332 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-24 21:32:20 +00:00
scheglov@google.com eedaae10e6 Optimizations for hashCode.
This improves Dart-based analyzer performance.

dart2js:   12500 -> 11600 ms, about 900 ms or 7%.
blueshift: 23500 -> 21500 ms, about 2000 ms or 8%.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//207853002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34318 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-24 18:18:14 +00:00
scheglov@google.com 624addf47e Don't print TODOs in Dart based analyzer.
Java based doesn't print them too.

This improves dart2js analysis from 12500 to 11300 ms, i.e. about 1200 ms or 10%.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//207693002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34254 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 16:14:11 +00:00
brianwilkerson@google.com 8be101185a Fix analysis of parts
R=scheglov@google.com

Review URL: https://codereview.chromium.org//200783006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34253 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 16:10:17 +00:00
scheglov@google.com d12545d5fa New analyzer snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//207023002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34227 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 05:09:57 +00:00
brianwilkerson@google.com 3185364c4e Partial fix for AST cloning. This change won't get made by the translator, but you might want to just copy it into the CL with translator changes in order to reduce the number of times we have to increment the version number.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//205243008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34202 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 20:33:50 +00:00
scheglov@google.com 5edf555a9a New analyzer snapshot.
R=blois@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//197213036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34188 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 17:38:28 +00:00
jwren@google.com e5ae9bf8ff Update package version for analyzer.dart for the args pub package
R=scheglov@google.com

Review URL: https://codereview.chromium.org//205183002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34136 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-19 20:47:06 +00:00
sigmund@google.com 56334078ae Fix analyzer and code_transformers versions
R=blois@google.com

Review URL: https://codereview.chromium.org//195893046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34127 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-19 18:15:44 +00:00
blois@google.com 2c034bfe3f Updating code_transformers to not fail on syntax errors
Recent changes started using the Analyzer's parseCompilationUnit method which throws exceptions on syntax errors, but this is undesirable in many cases. Adding an option to disable this behavior and using that in code_transformers.

BUG=
R=scheglov@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org//204033003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34070 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 22:09:17 +00:00
jwren@google.com ed38678776 Collect analysis errors from change notifications.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//202633002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33780 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 22:14:25 +00:00