Commit Graph

3479 Commits

Author SHA1 Message Date
rmacnak@google.com 58c1759454 Generic instantiations of mixins and interfaces. Equality of type parameters.
BUG=http://dartbug.com/14113
BUG=http://dartbug.com/14114
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28768 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 00:16:34 +00:00
iposva@google.com 0be514a68c - Add more data collection to the scavenger.
- Fix runtime/PRESUBMIT.py script.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28759 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 23:15:11 +00:00
srdjan@google.com 14b7cc4b18 Temporary disable string-interpolation constant folding until failures witj --optimization-counter-threshold=5 are resolved.
Review URL: https://codereview.chromium.org//27581002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28749 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 20:53:03 +00:00
srdjan@google.com b83bda9e0e Add new style of string interpolation optimization: new nodes, working constant folding.
TODO: partial constant fold of incoming arguments.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28741 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 18:12:08 +00:00
asiva@google.com 4ee18d0673 - Rearrange bits in the bitfields to get better compaction, this reduces
initial snapshot size by about 500 bytes.
- Fix initialization problem with redirecting factory bit

R=rmacnak@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28736 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 17:40:07 +00:00
fschneider@google.com ed801a1b2f VM: Fix bug with evaluation order of static setter invocation.
This fixes the case for an assignment of the form
v=e
where v is unknown. The right-hand side of the assignment
has to be evaluated before throwing a NoSuchMethodError.

I moved the generation of the NoSuchMethodError out of
the parser to the flow-graph builder, where the right-hand side
argument is evaluated before throwing.

BUG=https://code.google.com/p/dart/issues/detail?id=13494
TEST=co19/Language/12_Expressions/18_Assignment_A01_t07
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28723 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 13:07:58 +00:00
lrn@google.com 8b1d5720f7 Change "typedef" to "class" in core library and related tests.
R=floitsch@google.com, johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28712 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 09:02:46 +00:00
regis@google.com 2d59eb0cb1 Throw a dynamic type error instead of a CastError in a type cast with a
malbounded type (fix issue 14123).
Regression test is not checked in yet (see https://codereview.chromium.org/27378002/)

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28698 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 00:38:55 +00:00
rmacnak@google.com e8d030b338 Do not hide membership of implementation classes in dart:core.
BUG=http://dartbuc.com/12141
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28695 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 00:15:10 +00:00
regis@google.com 5d79a9ab02 Allow an interface to be (mal)bounded (fix issue 14118).
Regression test is pending, but not checked in yet
(see https://codereview.chromium.org/27378002/).

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28684 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 21:24:44 +00:00
turnidge@google.com 2ad40bc29b When a value has been optimized away by the compiler, set its value to
"<optimized out>".  This will make it less confusing for people using
the debugger.

- Added constant_dead() to the flow graph.
- Added Symbols::OptimizedOut().

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28671 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:35:07 +00:00
regis@google.com 2f900dab13 Cache number of type arguments in class object instead of recalculating it.
Reduce size of num_native_fields field in class object.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28670 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:31:31 +00:00
turnidge@google.com b4b7e5899c Allow access to context variables in optimized/inlined frames.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28669 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:17:36 +00:00
hausner@google.com c646aed258 Implement new mixin application syntax
Implment the class X = S with M syntax, add warning on deprecated
typedef syntax. Also convert a handful of tests. More tests to
be converted subsequently.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28652 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 16:13:02 +00:00
fschneider@google.com b5465cf7ef VM: Fix bug in canonicalization of identical in the optimizing compiler.
Make sure that BranchInstr::Canonicalize does not mutate it's input before
all conditions for the optimzations to take place are met. Otherwise, bailing out
leaves the affected comparison instruction in an invalid state.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28646 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 15:15:47 +00:00
srdjan@google.com 86606af254 Forgot to submit the cleanup.
Review URL: https://codereview.chromium.org//27271002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28620 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 23:32:00 +00:00
srdjan@google.com 2f0a906dbf Cleanups, refactoring in anticipation of new string interpolation nodes. Removed unnecessary code.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 23:21:52 +00:00
srdjan@google.com 951ff158eb Add back native tracing to optimized code. Tracing natives is an important part of perfromance analysis and should therefore be available in optiumized VM as well. No performance implications are expected.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28614 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 21:47:39 +00:00
turnidge@google.com 99ce6672cf Fix a typo in debugger.cc that was causing variable bounds checking to
be done on the frame context instead of the variable's context.

Update the unit test.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28594 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 17:35:35 +00:00
fschneider@google.com 06ace75239 Improve --optimization-filter to accept a comma-separated list of strings.
Only functions where the fully-qualified name contains one of the strings supplied
as substring will be optimized.

This helps tracking down bugs in the optimizing compiler that occur when a
large number of optimized functions are involved.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28578 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 12:21:40 +00:00
rmacnak@google.com 564fbb68dd Add proper API for creating private symbols wrt a library.
BUG=http://dartbug.com/13355
BUG=http://dartbug.com/12358
R=ahe@google.com, asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28551 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 20:56:14 +00:00
regis@google.com fcadf9fdd6 Overlap type arguments of a type with the type arguments of its super type
when possible. Overlapping may be partial.
Add flag --overlap-type-arguments controlling this optimization for debugging
and performance measurement (default is true).

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28539 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 18:36:25 +00:00
turnidge@google.com fb6249ec3b Add unit tests to cover stack inspect in the presence of closure calls
for both optimized and non-optimized code.

Fix an assert which was broken.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28538 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 18:15:32 +00:00
fschneider@google.com d69461ba62 VM: Fix performance regression introduced by r28408.
Change the AST for static consts so that they don't
end up translated as calls, and so that we don't rely
on the inliner to fold them away).

Instead I generate a LoadStatic AST node that will be
constant folded in the flow graph builder.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28521 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 15:44:36 +00:00
rmacnak@google.com 8a0d62f5f9 Substitution for type variables in mirrors on instantiated generics.
BUG=http://dartbug.com/12282
BUG=http://dartbug.com/13808
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28495 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 01:51:11 +00:00
regis@google.com 15bc5b9a0a Disallow extending a malformed type (issue 13940).
Add language test and update dart2js status (issue 13994 filed).

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28488 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 23:30:42 +00:00
regis@google.com 42ceee4cba Allow malbounded literal types (fix issue 13952).
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28474 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 20:45:09 +00:00
turnidge@google.com afb372d9e1 Fix checked mode failure
Review URL: https://codereview.chromium.org//26842003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28470 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 19:00:31 +00:00
turnidge@google.com 3fa13745ae Fix compiler error that wasn't showing up on my platform.
Review URL: https://codereview.chromium.org//26901002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28469 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 18:22:56 +00:00
turnidge@google.com b15b2931e0 Allow the debugger to inspect local variables from optimized and
inlined frames.

------------

Most remaining deoptimization code from the code generator moves to
DeoptContext.  This allows the code to be reused by the debugger.
There is some rework of the code along the way.  The remaining code in
the code generator is simpler.

Implement the ability to deopt a frame to an Array.  Each inlined
frame accesses its locals from this array at some fixed offset.

Refactor the Debugger::CollectStackTrace code.  New code is int
Debugger::CollectStackTraceNew.  There is a flag --use_new_stacktrace
which can be used to revert back to the old version.  I intend to
remove this flag shortly, after any dust clears.

Added a unit test which makes sure that we can inspect locals from
optimized and inlined frames.  Tested this code in the dart editor
debugger as well.

R=iposva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28468 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 18:15:53 +00:00
johnmccutchan@google.com 90895e8d39 Forward stores to loads for SIMD arrays
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28467 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 17:43:50 +00:00
fschneider@google.com c9504a7f84 Bump inlining size threshold.
This is to compensate for the increase in AST/flow graph size
after changing the way access to static final consts is compiled
in r28408.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28454 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 14:28:01 +00:00
hausner@google.com 5a5850d9d9 Optimize away empty string sections in string interpolation
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28423 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 22:05:27 +00:00
rmacnak@google.com 6ed9f2c17f Implement constructor kinds in the VM mirrors.
BUG=http://dartbug.com/13798
R=asiva@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28416 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 20:40:11 +00:00
hausner@google.com b87ef6ab7f Final variables induce a setter that throws NSME
Clean up handling of const and final variables. They induce a
setter that throws a NSME, rather than a compile-time error.

Delay the AST conversion of loading a const field into loading
the literal value. The conversion is now done when we know
that the load in on the right hand side of an expression.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28408 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 17:33:10 +00:00
asiva@google.com 9641c3eb7d Fix snapshot generation to ensure that the snapshot does not contain
the instance size of internal VM defined classes. These classes have
non word fields and the instance_size_in_words will not be correct
across different platforms.

This fixes the Dartium for Android build issue (snapshot is generated
on the host which is 64 bit and loaded later into a 32 bit process
on Android).

R=iposva@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28391 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 23:10:39 +00:00
zra@google.com 974d4f1392 Use the methods recommended by ARM to flush ICache.
This allows us to remove selecting different versions of
inline assembly depending on ABI, thumb, etc. in our code.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28378 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 20:42:43 +00:00
srdjan@google.com d78737298c Last cleanup int -> intptr_t. Also removed a hack (boolean is not an integer).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28372 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 18:54:00 +00:00
asiva@google.com ed4621d768 Use HasTypeArguments instead of first computing NumTypeArguments();
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28367 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 17:09:01 +00:00
asiva@google.com f21708a38a - Dart_ObjectIsType was allowing classes as parameter, changed it to only
allow types.
- Return canonical Dart_Null, Dart_True and Dart_False handles instead of
creating a new handle

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28366 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 16:42:30 +00:00
zra@google.com 3190d33670 Adds Android as an allowed OS for ARM build.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28365 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 16:08:48 +00:00
rmacnak@google.com 41f0d0e0f1 Correctly report the type of initializing formals declared without an explicit type to be the type of the corresponding field.
BUG=http://dartbug.com/11281
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28349 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 01:08:59 +00:00
srdjan@google.com 3a8252f90d Cleanups: int -> intptr_t for "array" lengths, memory sizes.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28324 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 20:19:37 +00:00
regis@google.com 321c9fe701 Rewrite Class::HasTypeArguments() for efficiency.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28319 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 18:38:31 +00:00
regis@google.com 5e817c182b It is not an error anymore to leave an instance final field uninitialized.
Fix issues 11054 and 12157.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28289 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 22:56:53 +00:00
srdjan@google.com 1676113897 Fix runtimeType for strings, integers and double: return their interface type.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28286 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 22:08:55 +00:00
iposva@google.com 3423572926 - Harden coverage generation, by not attempting to compile
un-compilable functions.
- Only register closure functions in the class when they
  have been properly setup.
- Make sure to compile closure functions when calling CompileAll.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28282 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 20:50:16 +00:00
asiva@google.com 21cefcd726 Add a new method Dart_InvokeConstructor to allow invocation of generative
constructors on an object that has already been allocated using Dart_Allocate.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28276 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 20:00:48 +00:00
srdjan@google.com 2ae1640000 Fix issue 13474. Simplify graph builder for Boolean operators AND, OR: do not optimize code when the result of the Boolean operator is not used.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28275 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 19:43:18 +00:00
fschneider@google.com 30e536845d Fix bug in inlining of []= operators.
When inserting the StoreIndexedInstruction, it needs the
environment of the call attached to it.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28257 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 09:51:27 +00:00