Commit Graph

13143 Commits

Author SHA1 Message Date
iposva@google.com c34b1216f4 - Improve the formatting of generated source text.
Review URL: https://chromiumcodereview.appspot.com//10823028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9952 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 18:07:56 +00:00
asiva@google.com f194c6ed60 Don't use vm heap for symbols yet, we need to change the snapshot writer to not mark object header first before this change can be activated.
Review URL: https://chromiumcodereview.appspot.com//10825039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9950 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 18:03:21 +00:00
regis@google.com 8fe3e69e37 Improve static type propagation.
Review URL: https://chromiumcodereview.appspot.com//10823022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9943 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 16:04:36 +00:00
fschneider@google.com e7853aab37 Add an explicit push-argument instruction to the IL.
It is used in ClosureCall and CreateClosure. Refactoring the other call-instruction
will be done in a separate CL.

These instructions do not have their arguments as input operands anymore since they
are really call-arguments passed on the stack.

This allows us to optimize a function with closure calls with SSA. For example:

foo() {
  bar() { return 42; }
  return bar();
}
Review URL: https://chromiumcodereview.appspot.com//10825035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9935 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 14:10:29 +00:00
vegorov@google.com c9e8d9594e Add support for fixed parameters in the register allocator.
This remove bailout for functions with non-zero number of non-fixed parameters and increases our coverage.

SpillSlot location was renamed into StackSlot location and now allows to address spill slots (positive stack index) and incoming parameters (negative stack index).

Environment was reordered to match order of values on the stack (previously it was inversed).

Correctly reserve spill slots in the prologue of the code. Previously register allocator was allocating spill slots, but generated code did not reserve any space for them on the stack so they might have been overwritten by calls.

Fix off by one in DeoptimizationStub::GenerateCode - we were reserving one slot too many.

Change --optimization-filter flag to use substring search instead of prefix comparison, this is much more useful when VM prefixes function name with a path to the file.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10828018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9934 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 13:21:39 +00:00
kmillikin@google.com 30936fefa2 Implement deoptimization in the SSA compiler as a parallel move.
R=srdjan@google.com,vegorov@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10824017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9931 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 10:40:09 +00:00
cshapiro@google.com 772a399cab Emit symbol maps for compiled code for use by the Linux perf tool.
Review URL: https://chromiumcodereview.appspot.com//10831005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9922 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 00:21:25 +00:00
asiva@google.com d6d464c0b3 Dump number of symbols in the isolate symbol table before shutting down an isolate under the --trace-isolates flag.
Review URL: https://chromiumcodereview.appspot.com//10809095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9920 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 23:41:53 +00:00
iposva@google.com eab99039da - Avoid C++ pitfalls with "static const int" in header files.
Review URL: https://chromiumcodereview.appspot.com//10829022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9914 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 22:04:45 +00:00
hausner@google.com a2fec11205 Make sure the "Skip*" functions know about cascades as well.
Also, handle index operator in cascades correctly.
Review URL: https://chromiumcodereview.appspot.com//10809089

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9910 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 21:31:02 +00:00
asiva@google.com ed8db0f611 Move more symbols to the vm isolate.
Review URL: https://chromiumcodereview.appspot.com//10808111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9905 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 20:31:26 +00:00
vegorov@google.com 106ce578cf When evicting interference convert uses from evicted ranges.
R=kmillikin@google.com
BUG=4193
TEST=

Review URL: https://chromiumcodereview.appspot.com//10834002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9881 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 12:17:29 +00:00
fschneider@google.com ac0dd6c295 Add a backward instruction iterator and use it in the liveness analysis.
This avoids the complication when collecting the initial live_in sets while iterating forward.

Also simplify the ForwardInstructionIterator class because we have Goto instructions now and
the last instruction of each block does not use the next-link to
indicate a fall-through anymore.
Review URL: https://chromiumcodereview.appspot.com//10796108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9875 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 08:31:50 +00:00
srdjan@google.com 67de9f1323 Some cleanups.
Review URL: https://chromiumcodereview.appspot.com//10806099

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9874 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 00:25:00 +00:00
regis@google.com 4968398d2a Nitpicking.
Review URL: https://chromiumcodereview.appspot.com//10807093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9863 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 20:39:21 +00:00
rmacnak@google.com 99ad7f4170 Added ClosureMirror to dart:mirrors. Added Dart_ClosureFunction to the
embedding API. ClosureMirrors currently implement answering the closure's
function and applying the closure.
Review URL: https://chromiumcodereview.appspot.com//10800065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9860 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:59:12 +00:00
srdjan@google.com b7ef0471e3 Add HasSSATemp and an assert to ssa_temp_idnex setter.
Review URL: https://chromiumcodereview.appspot.com//10806089

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9859 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:39:07 +00:00
hausner@google.com fdd91990f1 Implement cascade operator in VM
- Factoring out parsing of selectors
- Create temp variable holding the receiver of the cascade
  selectors
Review URL: https://chromiumcodereview.appspot.com//10796109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9857 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:20:49 +00:00
vegorov@google.com 925c9d6128 Adjust location summaries to match expectations of new register allocator.
Instructions containing calls can only use fixed registers everything else is blocked and unavailable for allocation.

Insert phi-connecting parallel moves after all instructions were numbered otherwise move gets incorrect position.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10818032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9856 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:19:20 +00:00
vegorov@google.com 16e25206d1 New linear scan allocator.
Review URL: https://chromiumcodereview.appspot.com//10800037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9851 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 16:01:54 +00:00
cshapiro@google.com 547383694b Improve the performance of bit set searches with a compiler intrinsic.
Review URL: https://chromiumcodereview.appspot.com//10806078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9836 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 02:45:31 +00:00
srdjan@google.com 3402769c7a Use kIllegalObjectKind instead of NULL object to terminate ICData array
Review URL: https://chromiumcodereview.appspot.com//10796103

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9835 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:31:32 +00:00
asiva@google.com ec7f44f025 Create frequently used symbols in the vm isolate
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
rmacnak@google.com e0931044c0 Added getField/setField to ObjectMirror. For InstanceMirrors, this get/sets
fields; for InterfaceMirrors, static fields; for LibraryMirrors, top-level 
fields.
Review URL: https://chromiumcodereview.appspot.com//10704259

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9832 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 22:53:52 +00:00
srdjan@google.com efbc8a83f3 Fix issue 4182: When inlining StringBase_get_length, we cannot assume that all receivers where subclasses of StringBase since we are running in production mode.
Review URL: https://chromiumcodereview.appspot.com//10795076

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9829 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 21:43:43 +00:00
srdjan@google.com 9df3e4deaa Add higher-level accesses to Environment. Print flow graph after register allocation. Most interesting with --print-flags --print-environments
Review URL: https://chromiumcodereview.appspot.com//10800080

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9826 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 20:29:51 +00:00
srdjan@google.com d0a991a41c Various cleanups, adding tests.
Review URL: https://chromiumcodereview.appspot.com//10807070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9821 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 17:55:53 +00:00
vegorov@google.com aecd5caab9 Rename MoveMemory to MoveMemoryToMemory to fix compilation on Win32
R=kmillikin@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10809052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9811 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 14:21:51 +00:00
vegorov@google.com d83a634324 Add spill slot locations.
Review URL: https://chromiumcodereview.appspot.com//10805053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9810 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 14:05:48 +00:00
iposva@google.com b21d7c16f6 - Tighten assertions around store buffers.
- Use the correct object when filtering in store barriers.
Review URL: https://chromiumcodereview.appspot.com//10796075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9797 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-21 01:08:14 +00:00
cshapiro@google.com 8aebf0a46f Revert "Revert "Favor free list allocation to bump pointer allocation.""
This reverts commit c3636953f7d7ab118b2c420b81058a0681fd237f.

Review URL: https://chromiumcodereview.appspot.com//10810048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9796 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-21 00:55:47 +00:00
srdjan@google.com c490158706 Cleanups.
Review URL: https://chromiumcodereview.appspot.com//10809047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9795 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 23:42:23 +00:00
iposva@google.com 3962577ca8 - Do not try to determine the address of Smis.
Review URL: https://chromiumcodereview.appspot.com//10808067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9794 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 23:06:11 +00:00
iposva@google.com 370da59b34 - Add missing store barrier in GrowableArray_setData intrinsic.
Review URL: https://chromiumcodereview.appspot.com//10803060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9793 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 22:31:46 +00:00
asiva@google.com ef67b96777 Rename some of the enum definitions inside classes to avoid conflict with the ObjectKind enum.
Review URL: https://chromiumcodereview.appspot.com//10808064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9792 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 22:24:49 +00:00
iposva@google.com 7f843b0fc9 - Start using the collected store buffer entries to find
old->new references during Scavenge.
Review URL: https://chromiumcodereview.appspot.com//10797021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9791 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 21:41:55 +00:00
srdjan@google.com 66d31c8b23 Fix crash during parallel moves. Made MoveOperands ZoneAlloacted. Non-const ValueObjects a fragile, since it is easy to modify a copy instead of the original. It is also dangereous to use pointers to ValueObjects that contain copy constructors.
Review URL: https://chromiumcodereview.appspot.com//10806047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9790 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 21:16:06 +00:00
regis@google.com 24944b0ec1 Fix build break, i.e. fix type finalization for function literals not assigned
to a function.
Review URL: https://chromiumcodereview.appspot.com//10807055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9785 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 18:08:05 +00:00
regis@google.com 1eed55c529 Add missing type finalization for function literals not assigned to a function
variable.
Various cleanup.
Review URL: https://chromiumcodereview.appspot.com//10797031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9782 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 16:08:43 +00:00
srdjan@google.com d173b31373 Minor cleanups: use GrowableArray::is_empty instead of ::length() == 0
Review URL: https://chromiumcodereview.appspot.com//10790086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9780 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 16:06:40 +00:00
srdjan@google.com cc385f8354 Fix crashes because of far jumps.
Review URL: https://chromiumcodereview.appspot.com//10790101

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9779 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 15:43:52 +00:00
srdjan@google.com 26e3afe496 Apply Kevin's suggestions, make branch-compare generation more robust
- remove setting previous link during graph building
- do not replace already inserted nodes
Review URL: https://chromiumcodereview.appspot.com//10808035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9778 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 15:20:11 +00:00
cshapiro@google.com 5596b96762 Revert "Favor free list allocation to bump pointer allocation."
This reverts commit afe0eb0d9277cb7574a9595b793f8e001bc14a57.

Review URL: https://chromiumcodereview.appspot.com//10802045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9774 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 03:44:48 +00:00
cshapiro@google.com bc6dd1df70 Favor free list allocation to bump pointer allocation.
This change improves the utilization of the smallest size classes on
benchmarks performing old space allocations including Splay, Box2D,
and Dart2JSCompileAll.

Initial measurements showed that free list allocation was slightly
slower than bump pointer allocation.  Profiling identified that free
list allocation spent most of its time searching for a matching size
class.  To eliminate this overhead, a bitmap index has been added
resulting in no appreciable difference in running time between either
method.

Review URL: https://chromiumcodereview.appspot.com//10807031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9773 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 03:11:59 +00:00
hausner@google.com 67191621a4 Debugger API to enable/disable debugging of libraries
Review URL: https://chromiumcodereview.appspot.com//10797033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9772 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 22:51:09 +00:00
hausner@google.com 057772b937 Fix Dart_GetClassInfo
issue 4142.

Also address review comments from previous change list.
Review URL: https://chromiumcodereview.appspot.com//10800024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9764 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 16:29:46 +00:00
srdjan@google.com 2016081f87 Fuse compare with branch at graph building time.
Review URL: https://chromiumcodereview.appspot.com//10802025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9762 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 15:52:44 +00:00
regis@google.com 318edd938c Hide names of internal classes from the user by mapping them to the documented
interfaces they implement.
Review URL: https://chromiumcodereview.appspot.com//10800002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9748 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 21:51:27 +00:00
kmillikin@google.com e440d86cb5 Revert "Revert "Introduce Goto instructions to the flow graph.""
Reapply svn revision 9731 with a bug fix.  The original review is at
http://chromiumcodereview.appspot.com/10735071/

R=vegorov@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10805008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9738 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 13:44:12 +00:00
kmillikin@google.com a368233743 Revert "Introduce Goto instructions to the flow graph."
This reverts svn revision 9731 due to test failures.

TBR=vegorov@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10808008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9733 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-18 10:44:54 +00:00