Commit Graph

8489 Commits

Author SHA1 Message Date
paulberry@google.com e5fcd1fd91 Properly restore context when leaving visitor functions in ErrorVerifier.
BUG=dartbug.com/15565
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41478 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 04:17:06 +00:00
paulberry@google.com 18b71fa42a Fix type analysis of the keyword "dynamic".
The type of "dynamic" isn't "dynamic", it's "Type".

BUG=dartbug.com/18731
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41477 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 04:13:06 +00:00
paulberry@google.com 31c3f90301 Properly implement identical() test in analyzer constant evaluation.
Previously we were treating identical(x, y) as equivalent to (x == y).
However the semantics aren't the same.

BUG=dartbug.com/21177
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41475 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 01:32:33 +00:00
paulberry@google.com cd068eb106 Convert analysis starting point to an absolute path before analyzing.
This ensures that if the analysis starting point is part of an import
loop, then once the analysis engine reaches the starting point again,
it will recognize that it's the same file.

BUG=dartbug.com/21440
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41473 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 22:42:52 +00:00
brianwilkerson@google.com b094516396 Fix early erasure of resolution data
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41462 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 17:29:46 +00:00
paulberry@google.com 9b35b056a7 Fix deprecation warnings in analyzer and analysis server.
R=brianwilkerson@google.com, danrubel@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41461 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 17:10:08 +00:00
paulberry@google.com 35c6e351da Fix access semantics for foreach loops.
In a statement like:

  for (x in ...) { ... }

"x" needs to be considered to be in setter context, not getter
context.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41460 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 16:47:28 +00:00
brianwilkerson@google.com 08713a5230 Add debugging for issues 21013 and 21014
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41459 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 16:37:01 +00:00
rnystrom@google.com 4d70e2f8a4 Optimize LineInfo.getLocation().
Three simple optimizations:

1. Do a binary search through _lineStarts to find the line instead of linear.
2. Store the last result and see if the offset starts there or later. If so, skip leading lines when searching.
3. See if the current offset is on the same line as the last result and exit early if so.

On my benchmark test for the formatter, this reduced it from 13.23ms to 7.57ms.

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41452 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 21:49:10 +00:00
brianwilkerson@google.com e9696e5f67 Clean up logging uses
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41443 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 19:05:19 +00:00
brianwilkerson@google.com 20c13d4715 Fix logging API. This should fix the exception I'm seeing. I'll clean up uses of the deprecated API in a separate CL.
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41439 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 16:22:50 +00:00
brianwilkerson@google.com 3d13808d7d Status page improvements: sort context names, right align numbers, add missing data descriptors.
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41427 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 21:11:40 +00:00
brianwilkerson@google.com 678f9e2a3e Fix issue 21379
R=danrubel@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41426 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 21:07:50 +00:00
brianwilkerson@google.com 40ad9b8eeb Improve cache entry tests
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41408 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 21:56:56 +00:00
scheglov@google.com e96b29143c Rename ForEachStatement.iterator -> iterable.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41405 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 21:33:04 +00:00
scheglov@google.com d37866dc50 Issue 21451. Fix for 'Add import' Quick Fix in case when package roots is in use.
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21451

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41402 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 20:51:07 +00:00
paulberry@google.com 03b3d16691 Make table entries on analysis server's '/status' page clickable.
Clicking on a table entry now takes you to a list of files in the
given state.

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41400 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 20:05:16 +00:00
brianwilkerson@google.com e4371e7e39 More code clean-up
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41359 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 15:48:15 +00:00
brianwilkerson@google.com 2f937685fc Code clean-up
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41348 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 00:25:22 +00:00
scheglov@google.com 63523cf050 Inline JUnitTestCase 'assert' methods.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41347 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 00:00:13 +00:00
scheglov@google.com fbf42c6a0d Port enum getter types fix to Dart.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41342 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 21:58:37 +00:00
scheglov@google.com 555b551ee5 Fix for AnalysisContext.getElement() for enums.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41337 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:54:43 +00:00
scheglov@google.com 0f5bc31b0d Remove any unnecessary parens around expressions in interpolations.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41336 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 20:19:18 +00:00
scheglov@google.com 71a54f980b Replace ${name} with $name where possible.
...i.e. when the next character is not a part of an identifier.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41333 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 19:43:44 +00:00
brianwilkerson@google.com 2c08b51c9b Remove unnecessary List creation
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41327 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 17:41:45 +00:00
brianwilkerson@google.com a22aa71cab Remove JavaIterator and MapEntry
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41321 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 15:37:24 +00:00
brianwilkerson@google.com 9d0ad88805 Remove Math and most uses of PrintStringWriter
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41318 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 14:49:20 +00:00
scheglov@google.com 7d3a0e4cb2 Port enums AST changes to Dart.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41306 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 21:59:39 +00:00
brianwilkerson@google.com 66f7c97acf Remove JavaStringBuilder
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41305 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 21:49:04 +00:00
brianwilkerson@google.com 282b2963a3 Clone tokens when cloning ASTs for constants
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41304 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 19:21:58 +00:00
brianwilkerson@google.com 877291fb07 Remove ArrayUtils
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41303 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-26 18:38:26 +00:00
scheglov@google.com f13b775902 Translate Engine utilities tests.
This adds 442 more tests.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41301 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-25 18:12:37 +00:00
paulberry@google.com 0251bcdcf6 Add package root support to analysis server.
Not yet hooked up in Dart editor.

R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41292 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 20:29:24 +00:00
scheglov@google.com a666399a06 Drop unnecessary toString() in interpolations.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41286 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 16:17:57 +00:00
brianwilkerson@google.com f04d5d01ea Add timing of serialization
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41270 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-23 19:38:17 +00:00
paulberry@google.com b35aef796c Fix type of String.fromEnvironment() when the name is undefined.
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41269 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-23 19:35:53 +00:00
scheglov@google.com d070599c9d Record types of invoked variables.
R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41252 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-22 21:52:26 +00:00
brianwilkerson@google.com 16d58cb0b6 Better recovery for getters in functions
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41238 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 21:17:28 +00:00
scheglov@google.com 8f337c37d1 Issue 21373. Fix for removing line info in case of exception (causes NPE in outline computer).
I will update analysis_server/pubspec.yaml before commit.

R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=21373

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41235 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 20:34:31 +00:00
brianwilkerson@google.com 82c1b3550b Add (as yet unused) task
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41172 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 16:57:33 +00:00
paulberry@google.com 271aee1d83 Handle non-factory redirects in constant evaluation.
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41169 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 15:54:44 +00:00
brianwilkerson@google.com dd794e0d02 Minor cleanup
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41158 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 18:08:25 +00:00
brianwilkerson@google.com 77613046a5 Generalize source entry
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41151 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 15:12:45 +00:00
paulberry@google.com cd171c8d3d Allow analyzer to distinguish unresolved types from dynamic.
This makes it possible to correctly report checked mode compile time
errors in the event of unresolved typenames.

BUG=dartbug.com/16391
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41098 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 13:47:37 +00:00
paulberry@google.com d18a4fb151 Fix spelling: existant -> existent
R=brianwilkerson@google.com, scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41083 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 21:11:52 +00:00
paulberry@google.com 77d74fa766 Fix constant evaluation in the presence of nonexistent fields.
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41082 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 21:07:00 +00:00
scheglov@google.com 11f7d4027e Fix for missing LineInfo to SDK entries.
I will update analyzer reference in pubspec before commit.

R=brianwilkerson@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41064 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-12 21:27:08 +00:00
brianwilkerson@google.com c8d866aa4d Remove unused time stamps
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41063 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-12 20:15:29 +00:00
paulberry@google.com 99a616e041 Type check field assignments during constant evaluation.
BUG=dartbug.com/16391
R=scheglov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41062 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-11 21:25:07 +00:00
paulberry@google.com 465c48479c Type check constant variable declarations.
BUG=dartbug.com/16391
R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41054 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 21:57:17 +00:00