Commit Graph

1388 Commits

Author SHA1 Message Date
asiva@google.com 9155bc295c Revert change 11091.
Review URL: https://chromiumcodereview.appspot.com//10866004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11096 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 21:01:10 +00:00
asiva@google.com b54731bd82 Currently we use a generated number as the class id for object class, this change tries to pin it to kInstanceCid so that we can do all the checks for object class using this class id.
Review URL: https://chromiumcodereview.appspot.com//10861023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11091 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 20:13:39 +00:00
vegorov@google.com fc29df7d47 Clean up EmitSmiBinaryOp template to remove redundant moves.
Now register allocator takes care of preserving values needed for deoptimization.

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11069 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 16:22:21 +00:00
vegorov@google.com 7a6cdd92c7 Remove support for non-ssa optimizing code generation.
This kills FrameRegisterAllocator and related code.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11045 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:58:57 +00:00
fschneider@google.com 855e718f5b Make Value not a subclass of Computation.
Instead I introduce one new computation to materialize constants.

sizeof(UseVal) drops from 64 to 32.
sizeof(ConstantVal) drops from 48 to 16.
Review URL: https://chromiumcodereview.appspot.com//10829451

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11041 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:36:36 +00:00
fschneider@google.com 33efb39372 Fix a bug in Equals for UseVal and ConstantVal.
TEST=vm/intermediate_language_test.cc
Review URL: https://chromiumcodereview.appspot.com//10828414

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11037 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:07:40 +00:00
whesse@google.com 1c1029bb88 Sort the Dart vm flags before printing them out with the --print-flags option.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11031 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 11:18:18 +00:00
kmillikin@google.com 94a5b82f60 Make stackmaps store their actual length.
This allows stackmaps with varying lengths in the same function, necessary
for the way we plan to support bitmaps for saved live registers.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11019 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 08:43:32 +00:00
zerny@google.com a6cf1d04ab Fixed typos: defintion to definition.
TBR=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11013 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 07:33:25 +00:00
iposva@google.com 26d59247df - Pass the correct version of handle reference to Class::NewNativeWrapper.
Review URL: https://chromiumcodereview.appspot.com//10827434

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11012 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 02:49:46 +00:00
asiva@google.com f2adedfad7 Use unreachable in snapshot generation when we do not expect the object to be sent in a message.
Review URL: https://chromiumcodereview.appspot.com//10829445

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11009 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 00:19:10 +00:00
regis@google.com 34a5754f3e Add HasSubclasses function to class hierarchy analysis.
Review URL: https://chromiumcodereview.appspot.com//10829446

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11008 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 00:16:46 +00:00
srdjan@google.com 04448b17eb Fix queries for Dart's clas Obbject cid: get object class from object store and get its cid. This is temproary solution, Siva is working on a permanent one.
Review URL: https://chromiumcodereview.appspot.com//10824392

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11007 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 23:46:21 +00:00
regis@google.com fea5f83714 Implement class hierarchy analysis in the VM.
Add test.
Review URL: https://chromiumcodereview.appspot.com//10828399

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11006 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 23:38:09 +00:00
srdjan@google.com 2c6d0181e1 Fix performance regression introduced by new equality semantic: we do not collect ICData when comparing with NULL. For now recognize left/right inputs as being null constant and convert the equality tests to strict-equality. There is still a problem if one of the equality arguments is always null but not a constant.
Review URL: https://chromiumcodereview.appspot.com//10861017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11001 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 21:14:37 +00:00
srdjan@google.com 9db2823a00 Test functions do not have scripts associated with them. Prevent their optimization by marking any function without a script to be not optimizable.
Review URL: https://chromiumcodereview.appspot.com//10832397

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10998 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 20:04:25 +00:00
srdjan@google.com 1821bce654 Removed incorrect EXPECT that gets triggered with low optimization_counter_threshold.
Review URL: https://chromiumcodereview.appspot.com//10823416

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10993 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 17:59:09 +00:00
hausner@google.com b64135920b Eliminate imported_into pointers in Library
The imported_into pointers are no longer necessary with the new
library scoping rules.
 
Review URL: https://chromiumcodereview.appspot.com//10829431

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10991 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 17:51:29 +00:00
zerny@google.com 7fe1beda36 Fixed issue 4580 introduced by revision 10894.
Binds of constants are dereferenced before adding them as inputs to phis.

R=srdjan@google.com,vegorov@google.com
BUG=dart:4580

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10977 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 15:15:48 +00:00
fschneider@google.com 253c3f8499 Implement class id checks as a separate instruction and add a local CSE optimization pass.
This CL contains:
A new CheckClassComp instruction. Currently it is used only for instance loads:
(LoadInstanceFieldComp)

A pass LocalCSE that performs block-local common subexpression elimination. To identify
redundant expressions I use a hash map per basic block. Computations that do not have
side effects can participate in CSE. For now, I only enabled it for CheckClass.
Any computation that participates in CSE must implement the AttributesEqual function.


Other smaller fixes:

Places where we can pass the correct initial size for GrowableArrays
that have a known size. We should consider having a FixedLengthArray for this purpose.

Made the accessors ic_data() and set_ic_data() use a const ICData*.
Review URL: https://chromiumcodereview.appspot.com//10824349

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10948 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 12:40:14 +00:00
cshapiro@google.com c9a5284465 Expose the WeakProperty type.
Review URL: https://chromiumcodereview.appspot.com//10834397

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10932 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-18 03:25:44 +00:00
srdjan@google.com 031eab4ab9 Fix null-equality comparison for unoptimized branch code. Issue 2506.
Review URL: https://chromiumcodereview.appspot.com//10860018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10924 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 21:18:26 +00:00
hausner@google.com 9dc7ab8e1e Implement import scope
Implement the new scope rule for imports.

- Imported identifiers are in a scope that is shadowed
  by the importing library's top-level scope.
- Conflicting names imported from different libraries
  are not an error unless the name is referenced.
- Conflicting type names are only an error in checked mode.

In a follow-on change, I'll remove the "imported_into" pointers in libraries. They are no longer needed.


Issue 2945
Review URL: https://chromiumcodereview.appspot.com//10823396

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10923 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 21:06:16 +00:00
turnidge@google.com 1da7c97936 A round of edits to make mirrors.dart more like our current working
proposal.
Review URL: https://chromiumcodereview.appspot.com//10854197

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10918 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 19:56:50 +00:00
srdjan@google.com 7a9689c981 Implement new equality spec.
"If either o1 or o2 is null, then ee evaluates to identical(o1,o2), where identical() is the predefined dart function that returns true iff its two arguments are the same object. "
Review URL: https://chromiumcodereview.appspot.com//10855208

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10907 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 17:30:06 +00:00
vegorov@google.com 3635a7436a Repair x64 disassembler:
- fix disassembler constructor to initialize fields correctly;
- move more code from InstructionDecode to DecodeInstructionType, this ensures that it'll use the right value of current variable (which is not always equal to **data as it assumed before).

R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10898 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 14:04:10 +00:00
zerny@google.com 798b5652a8 Replaced Value by Definition in the renaming environment.
Needed so the SSA renaming environment does not contribute uses in the use list.

R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10894 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 13:06:08 +00:00
fschneider@google.com e07438b906 Reland "Record the arguments for CreateArrayComp correctly as arguments.".
This time on the correct branch.

The elements are not real uses and are therefore not maintained accordingly.

BUG=dart:4563

TBR=vegorov@google.com
Review URL: https://chromiumcodereview.appspot.com//10860007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10884 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 11:46:28 +00:00
kmillikin@google.com 6c7d65e482 Reduce space used for stackmaps.
Only allocate space for the bits covered by the stackmap, instead of
for the backing store of the utility class that built it.  Fix a bug
where the size in bytes was multiplied by the word size in bytes.

Also do some cleanup of the stackmap code and renaming in the tests.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10870 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 07:57:47 +00:00
cshapiro@google.com 265e2306f5 Add a weak property type to the virtual machine.
Weak properties are key-value pairs.  The liveness of the key determines
the liveness of the value.  If the key is reachable the value is traced.
However, if the key is unreachable, the value is subject to finalization.

At present, the sole finalization action is clearing the key and value
fields.  However, it is possible to extend this to invoking callbacks or
other techniques, as well as processing values in topological order.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10867 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 01:17:39 +00:00
srdjan@google.com b6d1804071 Reenable elimination of strict equals when right side is true.
Reenable some Smi check eliminations. Soon Florian will factor out class checks into own instruction where the elimination will be moved.
Implement more ResultCid()-s, removed TODO to make it asbtract because almost all computations return kDynamicCid.
Review URL: https://chromiumcodereview.appspot.com//10827387

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10865 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 22:22:57 +00:00
regis@google.com d9b0276a4c Require two type arguments for map literals (issue 4522).
Spec has been changed back.
VM temporarily accepts a single type argument and emits a warning.
Update tests, dart2js source, dartdoc, etc...
Disable failing co19 tests (issue 175 filed).
Review URL: https://chromiumcodereview.appspot.com//10854191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10861 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 20:44:32 +00:00
srdjan@google.com 564e747c2b Propagate class ids using existing type propagation framework.
Review URL: https://chromiumcodereview.appspot.com//10830339

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10849 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 17:39:37 +00:00
asiva@google.com ab4f0f2b5e 1. Fix an issue with VM class names being null (this is exposed when doing a heap profile)
2. Move more VM class names as singletons to the VM isolate.
Review URL: https://chromiumcodereview.appspot.com//10827367

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10847 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 17:36:41 +00:00
hausner@google.com d116929aa9 New getter syntax for top-level getters
Fix 4538
Review URL: https://chromiumcodereview.appspot.com//10837288

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10846 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 17:30:56 +00:00
zerny@google.com 6ed5884c44 RemoveFromGraph on definitions asserts empty use lists.
R=fschneider@google.com,kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10822 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 14:08:45 +00:00
zerny@google.com 5cc78d2a33 Refactored FlowGraphBuilder into a separate FlowGraph representation.
R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10807 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 12:06:17 +00:00
fschneider@google.com d571e18ebd Make all variants of RelationalOp work with SSA.
This is the last instruction that causes a bailout in the register
allocator. This bailout is now changed into an ASSERT.
Review URL: https://chromiumcodereview.appspot.com//10830333

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10802 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 08:46:45 +00:00
iposva@google.com e5851a16c5 - Merge function lists when patching classes (no more duplicates).
- Report errors when applying a patch with duplicate fields or mismatched parameters.
- Fix bug 4526: Wrong error message when defining an already defined class.
Review URL: https://chromiumcodereview.appspot.com//10854176

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10784 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 00:00:04 +00:00
regis@google.com 4bc16ae3f7 Cleanup handling of NullType in type propagation.
Remove AssertAssignable type checks from graph (when possible), rather than just
marking them as eliminated.
Review URL: https://chromiumcodereview.appspot.com//10828319

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10782 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 23:49:12 +00:00
iposva@google.com dae2e8454f - Remove unused variable.
Review URL: https://chromiumcodereview.appspot.com//10834340

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10765 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 19:57:32 +00:00
vegorov@google.com 181be0165b Rename is_call to always_calls and contains_call to can_call.
R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10735 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 14:26:39 +00:00
fschneider@google.com df23e58a2f Change indexed load and store IL instructions to fit with SSA backend.
Generic indexed operations are implemented as normal instance calls. Specialized
operations are inserted by the flow-graph optimizer. This also avoid a lot of duplicated code
in the code generator.
Review URL: https://chromiumcodereview.appspot.com//10836239

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10727 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 13:54:38 +00:00
ager@google.com 2ebbd99144 Update stopwatch to use patching to share sources instead of exposing
a Clock class.

R=lrn@google.com,ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10715 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 12:06:17 +00:00
fschneider@google.com c9e6717757 Split ToDouble into two IL instruction to make it work with SSA.
This CL removes the bailout from SSA on smi-to-double conversions.

The smi-to-double conversion is implemented as a call and requires
its operand pushed, the double-to-double conversion has normal input
operands.
Review URL: https://chromiumcodereview.appspot.com//10834311

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10710 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 11:31:51 +00:00
ager@google.com 652415daaf Cleanup of math sources.
Get rid of temporary unified directory version. Move back into
lib/math where it should be.

Rename patch files from the for math.dartp to the form
math_patch.dart.  They are just dart files and I don't like the new
dartp extension.

R=ajohnsen@google.com,lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10709 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 11:25:40 +00:00
iposva@google.com 5a443ddcc9 - Split functionality of adding implicit constructors and checking
for cycles into two functions.
- Fix handling of closures in patch classes.
Review URL: https://chromiumcodereview.appspot.com//10829332

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10703 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 07:33:19 +00:00
iposva@google.com a7959423cd - Use the unified dart:math library in the VM.
Review URL: https://chromiumcodereview.appspot.com//10831301

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10698 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 04:50:14 +00:00
jackpal@google.com c4238c71da Add GDB JIT support back into Android build.
Based on Linux version.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10697 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 02:02:16 +00:00
asiva@google.com 5d92c7c717 use bit fields for class state and field type values. This shrinks the snapshot
size by about 4k
Review URL: https://chromiumcodereview.appspot.com//10837247

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10696 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 01:06:01 +00:00