asiva@google.com
ef0a2e170e
Indicate test will get a static warning when running the analyzer on it.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//271653007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35929 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 18:30:25 +00:00
fschneider@google.com
16e03db724
Implement simple dead store elimination.
...
This optimization is the dual to load elimination. It uses
the same infrastructure for handling aliasing. Since dead
store elimination is a backward data-flow analysis it inherits
from LivenessAnalysis.
Instead of eliminating upward exposed loads, it eliminates
downward exposed stores.
First local intra-block analysis is done in ComputeInitialSets.
Afte the fixed point iteration EliminateDeadStores performs the
global optimization on downward exposed stores in each block.
Only fully dead stores are eliminated. No partially dead
stores yet.
Example:
1: o.x = null;
2: if (cond) {
3: o.x = 1;
4: } else {
5: o.x = 2;
6: }
The store in line 1 is fully dead and will be removed. Note that
any deoptimization in "cond" will make the store only partially
dead and it won't be removed yet.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//143263010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35909 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 14:26:16 +00:00
karlklose@google.com
fde2f73690
Remove static warning from an unused methods in language/malformed_bound_test.
...
The analyzer still sees it when it is unused and gives a warning.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//269313011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35901 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 10:41:15 +00:00
johnniwinther@google.com
dc0bd5cd50
Fix test.
...
BUG=http://dartbug.com/18700
R=karlklose@google.com
Review URL: https://codereview.chromium.org//270633010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35899 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 10:30:37 +00:00
karlklose@google.com
84bf067044
Treat malformed bound as dynamic.
...
R=johnniwinther@google.com
BUG= http://dartbug.com/18420
Review URL: https://codereview.chromium.org//268363017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35894 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 10:19:47 +00:00
karlklose@google.com
82b8486263
Fix dart2dart test expectations.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//276473003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35893 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 09:30:09 +00:00
johnniwinther@google.com
93abca2595
Support general handling of type variables by substituting types into the current context.
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//267153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35888 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 08:10:12 +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
scheglov@google.com
210407ed4a
Issue 16672. Report warning for assignment to a function.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=16672
Review URL: https://codereview.chromium.org//272683002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35869 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 21:29:17 +00:00
scheglov@google.com
ebb2c951cb
Issue 16314. Skip leading UTF-8 BOM.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=16314
Review URL: https://codereview.chromium.org//270573007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35867 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 20:35:34 +00:00
zra@google.com
842a42a5a9
Adds unary double operations to ARM64, enables many tests.
...
Also removes disabling of optimization.
R=regis@google.com
Review URL: https://codereview.chromium.org//267283004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35863 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 20:04:05 +00:00
jwren@google.com
7bbd95c95e
Bit flip- re-enable deferred loading support in the analyzer.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//274703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35858 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 18:50:10 +00:00
paulberry@google.com
099f24cf0e
In constant evaluation, properly handle redirecting factory constructors.
...
In order to unit test that this change doesn't regress the handling of
"const Symbol(...)", it was necessary to expand TestTypeProvider's
Symbol class to include the Symbol constructor.
Note: with this fix, analyzer detected a previously unknown flaw in
tests/language/switch_case_test.dart: class D didn't implement a
getter for x. Test updated accordingly.
This change breaks test lib/_internal/compiler/samples/jsonify/jsonify
by changing analyzer's handling of bool.fromEnvironment(). I plan to
address this in a future changelist.
BUG=dartbug.com/17209
R=brianwilkerson@google.com , floitsch@google.com
Review URL: https://codereview.chromium.org//261403004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35853 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 16:27:03 +00:00
jwren@google.com
851f6fbdc6
Add flag to AnalysisOptions to be able to easily disable deferred loading.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//262253002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35831 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 21:17:40 +00:00
zra@google.com
65946f752c
Adds arm64 double arithmetic instructions.
...
Also adds:
- double comparison instructions,
- conditional increment instruction,
- double <-> int conversion instructions,
- IL instructions that use these,
- NoSuchMethod call stub,
- and bug fixes.
R=regis@google.com
Review URL: https://codereview.chromium.org//262333007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35830 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 20:50:44 +00:00
zra@google.com
037a72e059
Enables many language tests for arm64.
...
- Adds msub and smulh instructions for implementing
BinarySmiOp.
- Adds fmovdd to move doubles between V registers.
- Implements many stubs and IL instructions. These are
ported from ARM with small fix-ups. Deopt code comes
from x64 because the stack frame layout is the same.
R=regis@google.com
Review URL: https://codereview.chromium.org//263243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35753 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 18:09:08 +00:00
johnniwinther@google.com
2c50d3ad62
Fix passing of type arguments in redirecting constructors.
...
BUG=http://dartbug.com/18535
R=karlklose@google.com
Review URL: https://codereview.chromium.org//263153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35730 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 08:45:17 +00:00
paulberry@google.com
f49b1f0caf
Check const map literal keys and switch case exprs using type of constant.
...
The following type rules are defined based on the actual type of the
const object:
- CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS
- INCONSISTENT_CASE_EXPRESSION_TYPES
- CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS
Previously, we were using the propagated type for the case expression
checks, and the static type for the const map check.
BUG=dartbug.com/11697
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//267923004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35723 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-03 17:14:08 +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
jwren@google.com
d4ccbf738d
Further work on 17522- deferred loading in the analyzer. There are some additional error code that are needed (indicated by a TODO in CompileTimeErrorCode), but all of the valid language tests now pass.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//258393003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35659 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 21:43:26 +00:00
ricow@google.com
342d4e79da
Update status file entries for mobile safari simulator.
...
Only a few tests are failing that are not failing on the normal safari.
I have marked those with issue 18573
Review URL: https://codereview.chromium.org//268593004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35634 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 15:40:33 +00:00
jwren@google.com
2ceb165494
Fix for 18468- T << Type where T is a type parameter and Type is the type Type from dart.core
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//252693006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35501 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-28 22:10:11 +00:00
jwren@google.com
2388b7d73d
Change the error for importing a deferred library with a top-level 'loadLibrary' to being a hint. Also, the logic for checking for the 'loadLibrary' from the element model into the hints phase (BestPracticesVerifier).
...
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//253493010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35495 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-28 20:13:59 +00:00
herhut@google.com
8e34dc3546
Allow a closure to be torn off from itself via .call.
...
BUG= http://dartbug.com/17474
R=floitsch@google.com
Review URL: https://codereview.chromium.org//252693003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35473 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-28 06:46:48 +00:00
srdjan@google.com
2cc32fd9fc
Fix types in test.
...
Review URL: https://codereview.chromium.org//256623010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35456 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 23:39:56 +00:00
srdjan@google.com
0c2b0af123
Copy of Issue 231383002 after hard disk crash: First step in improving instance of test for a fixed set of value cids returning different results.
...
Review URL: https://codereview.chromium.org//258563004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35455 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 23:21:12 +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
johnniwinther@google.com
41d98f8427
Handle generic parameters in synthesized constructor for mixin applications.
...
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//246563006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35359 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 08:35:28 +00:00
sigurdm@google.com
00910f947b
Insert checks before deferred calls and accesses.
...
These checks will throw an error if the library was not loaded.
R=floitsch@google.com , johnniwinther@google.com
Committed: https://code.google.com/p/dart/source/detail?r=35306
Was reverted by Issue 247863005 r35308 due to failing co19-test
Review URL: https://codereview.chromium.org//232563006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35355 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 07:51:35 +00:00
sigurdm@google.com
a31796ed37
Revert "Insert checks before deferred calls and accesses."
...
This reverts commit r35306.
Review URL: https://codereview.chromium.org//247863005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35308 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 09:23:33 +00:00
sigurdm@google.com
910fffd40d
Insert checks before deferred calls and accesses.
...
These checks will throw an error if the library was not loaded.
R=floitsch@google.com , johnniwinther@google.com
Review URL: https://codereview.chromium.org//232563006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35306 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 07:56:03 +00:00
regis@google.com
98bcbb0dae
Do not ignore side effects of a type test or type cast as expression, such
...
as bound errors in checked mode.
Added tests.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//246293008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35284 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 20:48:13 +00:00
jwren@google.com
4f4507b9ef
Fix for 14221/ 15553/ 16673- X isSubtypeOf E now returns false when X is some type and E is a type parameter. This fixes a few issues, but also breaks some assertions (language tests that now have valid warnings from the analyzer).
...
Additional work will need to be done to fix the language tests, and to investigate the case of X isSubtypeOf E where X is of type Type.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//247313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35281 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 20:07:54 +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
brianwilkerson@google.com
56ebb916fc
Fix for issue 18273
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//244253009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35260 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 14:43:35 +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
paulberry@google.com
b8b2b5e454
Change UNDEFINED_FUNCTION from an error to a warning (issues 18274, 15315).
...
Also update the spec quote for the error enum, and add a unit test for
a case that wasn't previously covered
(test_undefinedFunction_inImportedLib).
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//241823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35163 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-18 13:44:26 +00:00
paulberry@google.com
d2349ec6c4
Fix least upper bound computation for generic types (dartbug.com/15060)
...
Consider the classes:
class A<T> {}
class B<T> extends A<T>
class C<T> extends A<T>
class D {}
class E {}
When computing the least upper bound of B<D> and C<E>, we were making
two mistakes:
1. When computing superclasses we were using
ClassElement.getSupertype() (which doesn't substitute type arguments),
so B<D> and C<E> were considered to derive from a common type A<T>
rather than distinct types A<D> and A<E>. A similar problem existed
for interfaces.
2. When intersecting superinterface sets, we were recursively taking
the least upper bound of type arguments, so A<D> and A<E> were
coalesced into A<Object>. The spec and VM consider A<D> and A<E> to
be unrelated types for the purpose of least upper bound computation,
so the least upper bound should simply be Object.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//234213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34952 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 23:07:51 +00:00
paulberry@google.com
03d6b2c1aa
Allow function literal in string interpolation (dartbug.com/18137).
...
As of r34903, the VM allows function literals inside string
interpolation, even if the string is inside an initializer. This
makes the corresponding change to the analyzer.
R=jwren@google.com
Review URL: https://codereview.chromium.org//231793007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34930 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 15:53:37 +00:00
floitsch@google.com
5539ee1908
Update status file.
...
Review URL: https://codereview.chromium.org//233143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34923 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 12:39:40 +00:00
floitsch@google.com
69802ab88a
Allow closures in string literals in initializer expressions.
...
BUG= http://dartbug.com/18102
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//232823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34919 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 11:50:23 +00:00
iposva@google.com
46ab956f9d
- Mark language/function_literals2_test as failing.
...
Review URL: https://codereview.chromium.org//231983005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34911 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 03:24:23 +00:00
hausner@google.com
10f6318d87
Allow function literals in string interpolation
...
Interpolated strings in initializers can contain function literals. Add a test case to the function literals test.
Fixes issue 18112.
R=regis@google.com
Review URL: https://codereview.chromium.org//232213003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34903 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 23:42:58 +00:00
hausner@google.com
42a63f1844
Fix dart2js test expectations
...
Review URL: https://codereview.chromium.org//231953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34898 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 21:15:42 +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
hausner@google.com
6051d21b5c
Conflicting inheritance from superinterface is not a compile time error
...
Test override_inheritance_mixed was partially wrong.
Inheriting conflicting members from superinterfaces is not a compile time error,
just a static type warning.
See also bug 16137 for details.
R=gbracha@google.com
Review URL: https://codereview.chromium.org//230423004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34883 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 17:43:14 +00:00
whesse@google.com
9965700b95
Rename language/disasssemble_test, add to status file.
...
BUG=dartbug.com/18122
R=kustermann@google.com
Review URL: https://codereview.chromium.org//230173006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34879 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 14:29:48 +00:00
johnniwinther@google.com
eaad3cd8b2
Handle type checking of generic compile time constants.
...
BUG=http://dartbug.com/14348
R=karlklose@google.com
Committed: https://code.google.com/p/dart/source/detail?r=32154
Review URL: https://codereview.chromium.org//146733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34871 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 11:14:04 +00:00
johnniwinther@google.com
fbe2b8bcc7
Compute frontend/backend specific constants.
...
BUG=
R=floitsch@google.com , karlklose@google.com
Committed: https://code.google.com/p/dart/source/detail?r=34811
Review URL: https://codereview.chromium.org//221873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34862 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 07:40:54 +00:00
sra@google.com
1eab259990
map_literal4_test works only in checked mode
...
TBR=floitch@google.com
Review URL: https://codereview.chromium.org//229553002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34847 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 22:43:11 +00:00