Commit Graph

5058 Commits

Author SHA1 Message Date
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
hausner@google.com 6a0fb0d924 Handle recursive list structures in debugger
Issue 14108

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28677 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 19:58:10 +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
ajohnsen@google.com 732ab1ce4d Add factory-method for scheduleMicrotask, as well as a (failing) test.
BUG=
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28653 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 16:22:04 +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
floitsch@google.com 10e9a799d1 Make print interceptable.
BUG= http://dartbug.com/3486
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28650 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 16:02:07 +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
lrn@google.com eb185354cd Document equality and compareTo of numbers.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28635 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 11:58:06 +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
pquitslund@google.com e9e3dd9606 Formatter library entry-point for the masses (w/ gypi update).
(Note the manual change in resource_sources.gypi.  I verified that this works locally.)

R=jmesserly@google.com, johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28613 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 21:46:06 +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
lrn@google.com 8922b1065c Add EfficientLength marker interface to some iterabels.
Use that in List.from and other methods to be more efficient when possible.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28575 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 10:40:00 +00:00
floitsch@google.com 0f7a0bd7b1 Rename runAsync to scheduleMicrotask.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28569 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 15:52:17 +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
iposva@google.com c07e740d5d - Make sure values are "used" as part of ASSERT even when compiling optimized.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28528 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 17:02:45 +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
floitsch@google.com 4be547c705 Adapt streams for additional stackTrace argument.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28511 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 12:02:20 +00:00
lrn@google.com 171c6d7741 Optimize some collection operations.
Extracted from EfficientLength CL.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28509 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 11:39:57 +00:00
lrn@google.com 04c230b114 Add Set.lookup method to get the instance in the set.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28499 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 07:16:20 +00:00
gbracha@google.com 0ca837410a Modifications to TypeVariableMirror implementation to accommodate expected hoisting of methods from ClassMirror to TypeMirror.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28496 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 02:15:38 +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
johnmccutchan@google.com 2786add1ea Initial GUI for VM service
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28462 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 16:36:03 +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
johnmccutchan@google.com 7fec0190f5 Revert 28422
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28426 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 22:24:21 +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
johnmccutchan@google.com 209d858d4d Initial GUI for VM service
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28422 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 21:57:33 +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
cbracken@google.com 0fdb309321 Prefix compile-time typedef checks with __attribute__((unused))
Prevents build failure under gcc 4.8.

Bug report: http://dartbug.com/13645

BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28411 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 19:43:41 +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
vsm@google.com 334fd6bf07 Mark spawnFunction tests as Fail on Dartium
See corresponding Dartium CL:
https://chromiumcodereview.appspot.com/26397003/

This disables spawnFunction on DOM enabled isolate (i.e., where
dart:html is available).  spawnFunction should continue to work on
non-DOM enabled isolated.  spawnUri should be unaffected.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28406 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 16:25:28 +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