Commit Graph

13143 Commits

Author SHA1 Message Date
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
srdjan@google.com 3a723f2663 Disable using CompileType for class check elimination.
Review URL: https://chromiumcodereview.appspot.com//10828318

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10694 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 00:16:58 +00:00
srdjan@google.com 820aa24ab6 Added Smi, Mint and Double types to object store.
Review URL: https://chromiumcodereview.appspot.com//10823324

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10687 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 22:54:53 +00:00
hausner@google.com b69319b6ce Allow non-const field initializers
Revision 0.11 of the spec allows arbitrary initializer expressions
for instance fields.

Issue 3848
Review URL: https://chromiumcodereview.appspot.com//10832283

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10672 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 19:52:00 +00:00
srdjan@google.com bbfbfc5dc2 Fix crash with exhausted heap size: benchmarks' code heap size set to 12Mb).
Review URL: https://chromiumcodereview.appspot.com//10827328

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10663 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 18:48:13 +00:00
vegorov@google.com fe291bf0fa Implement basic support for deferred slow path code with calls that save and restore live registers.
Use it to avoid spilling over stack-checks.

R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10639 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 12:47:42 +00:00
fschneider@google.com 2b3ea645f3 Fix crash bug when replacing a definition with a definition that has no uses.
TEST=vm/intermediate_language_test.cc
Review URL: https://chromiumcodereview.appspot.com//10826299

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10630 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 11:18:48 +00:00
kmillikin@google.com 172ee045f3 Build and use stack maps in the SSA compiler.
Add a stack bitmap to the location summaries for calls that are GC
safepoints.  The bitmap covers the spill slots.  The register
allocator collects these bitmaps into a list and then marks live
pointer values during register allocation.  When emitting code for a
call, a heap-allocated stackmap is built.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10618 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 06:59:24 +00:00
iposva@google.com 4b5c488b1d - Remove debug printing.
Review URL: https://chromiumcodereview.appspot.com//10836230

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10617 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 01:23:41 +00:00
iposva@google.com 99d563982c - Support for patching of class methods and fields.
Review URL: https://chromiumcodereview.appspot.com//10827288

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10616 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 00:38:01 +00:00
srdjan@google.com 8299db1ff0 Optimize equality for case when all targets are Object.equals.
Also fixes a couple of issues with https://chromiumcodereview.appspot.com/10830275/
Review URL: https://chromiumcodereview.appspot.com//10826285

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10615 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:44:07 +00:00
jackpal@google.com e060b66a3e Add _android files for building DartVM on Android
Split directory_posix -> directory_(android|linux|macos)
  This allows us to cleanly make Android-specific changes to
  directory_android.cc

Copy all _linux files to _android files and edit as needed to account
for the differences between Linux and Android:

 + getcwd(0, NULL) doesn't work on Android, have to emulate
 + Android doesn't have a '/tmp' directory, have to emulate
 + Android doesn't provide mkdtemp(), have to emulate.
 + Small differences in the available system include files.
 + Use pthread_cond_timedwait_monotonic instead of
   pthread_condattr_setclock

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:06:52 +00:00
iposva@google.com f29e6bb659 - Split Dart core libraries into shared sources and patch sources.
Currently this split goes along the runtime vs. library directories,
  eventually more shared code will be sitting in the shared library
  sources.
Review URL: https://chromiumcodereview.appspot.com//10834284

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10612 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:01:20 +00:00
regis@google.com 52f08eda1e Missed file in previous change.
Review URL: https://chromiumcodereview.appspot.com//10832279

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10611 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 22:37:22 +00:00
regis@google.com 4000bbad60 Eliminate condition type check when possible.
Review URL: https://chromiumcodereview.appspot.com//10832277

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10610 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 22:31:07 +00:00
asiva@google.com 5928516358 Address review comments from previous CL.
Review URL: https://chromiumcodereview.appspot.com//10807078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10608 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 21:57:34 +00:00
regis@google.com fdfcde6046 In checked mode, make sure the ssa compiler propagates the checked types of
incoming arguments.
Propagate the type of the receiver and of the constructor phase argument.
Review URL: https://chromiumcodereview.appspot.com//10855134

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10605 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 21:09:28 +00:00
hausner@google.com 8f2c8c35fb References to static functions are CT constants
A compile time constant expression may refer to top-level and
static closures.

Fix for issue 3406.
Review URL: https://chromiumcodereview.appspot.com//10823292

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10600 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 20:15:06 +00:00
regis@google.com 0027c42749 Cache the first evaluation of the compile time type of a definition as the
initial propagated type in order to prevent repeated evaluation.
Review URL: https://chromiumcodereview.appspot.com//10823279

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10587 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 16:56:10 +00:00
fschneider@google.com 94fa6055ab Optimize expressions of the form (expr === true) when expr has boolean type.
This allows us to generate better code for many short-circuit
expressions like a || b, a && b if we can statically determine the type
of the subexpressions.

Also: Avoid disassembling optimized functions twice with --disassemble --disassemble-optimized.
Review URL: https://chromiumcodereview.appspot.com//10830275

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10568 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 13:10:00 +00:00
srdjan@google.com 6456518776 Use type propagation for removing Smi checks in binary operations and comparisons. Regis will adapt type propagation to collect/propagate class ids and merge them into sets (arrays).
Added printing for propagated types and parameter instructions.
Review URL: https://chromiumcodereview.appspot.com//10823278

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10545 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-11 00:09:12 +00:00
asiva@google.com 00dd8aa761 Remove functions_cache_ and it's references as it is not being used anymore.
Review URL: https://chromiumcodereview.appspot.com//10824266

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10542 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 23:33:37 +00:00
hausner@google.com 9b47d131bf Support new getter syntax (no formal parameter list)
Support both new and old getter syntax in the VM compiler.
One co19 test becomes invalid, as it expects a compile error
due to missing getter formal parameters.
Review URL: https://chromiumcodereview.appspot.com//10837208

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10541 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 22:53:34 +00:00
asiva@google.com 5fd180cdfc 1. Register canonical names for internal VM classes and get rid of the method GetSingletonClassName
2. Create the empty_array object as a singleton in the VM isolate and remove it from the object store
3. Remove eager population of the functions_cache entry in the class. This results in a pretty impressive reduction of the initial isolate heap size:
    - on IA32 it goes from 1331k to 1071k
    - on X64 it goes from 2431k to 1911k
    - snapshot size also is reduced from 859219 bytes to 789147 bytes.
    (as a follow up change I will consider completely removing functions cache)
Review URL: https://chromiumcodereview.appspot.com//10827249

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10535 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 21:43:00 +00:00
srdjan@google.com 6a7b1733d6 Enable SSA by default for IA32 as well.
Review URL: https://chromiumcodereview.appspot.com//10825301

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10529 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 20:48:18 +00:00
asiva@google.com d218086729 1. Write out only the kind_tag_ field of a function in the snapshot instead of the individual bits as boolean values. This reduces the snapshot size by about 4k
2. Move the kind_tag_ accessor functions from RawFunction to Function (we try not to have any code in the Raw classes).
Review URL: https://chromiumcodereview.appspot.com//10831248

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10528 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 20:35:59 +00:00
hausner@google.com 6a1a13901d Support for new operator -
Implement unary operator -. Operator negate is still recognized,
but internally it is represented like unary -. In particular,
operator negate no longer implies an instance method named
negate.

Marked several co19 tests that use "negate" as failing and filed
co19 issue 169 to have these tests updated.
Review URL: https://chromiumcodereview.appspot.com//10830253

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10523 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 18:30:22 +00:00
vegorov@google.com 8aced7aab1 In AllocateAnyRegister allow spliting at blocked_at position inclusive.
R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10518 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 17:28:01 +00:00
srdjan@google.com db0d864629 Add X64 assembler.
Review URL: https://chromiumcodereview.appspot.com//10826248

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10517 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 17:20:10 +00:00
iposva@google.com f0862ed7d0 - Improve generated sources:
+ Strip private key from identifiers.
  + Properly handle strings with interpolation.
- Keep private key in the token stream and properly snapshot. 
Review URL: https://chromiumcodereview.appspot.com//10823269

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10515 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 17:01:08 +00:00
srdjan@google.com 08a293bd64 Small bug fix in comparison of usage_counter for x64.
Review URL: https://chromiumcodereview.appspot.com//10828260

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10514 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 16:57:41 +00:00
vegorov@google.com 1cf5cc74aa Put PushArgument into the environment instead of raw values.
This allows to shorten live ranges and avoid spilling when PushArgument is the last real use of the value.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10508 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 14:28:02 +00:00
zerny@google.com 24771817a2 Added def-use chain to the intermediate language.
R=fschneider@google.com,kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10497 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 12:35:59 +00:00
fschneider@google.com ad2372aa04 Add flag --disassemble-optimized to selectively disassemble function with optimized code.
Review URL: https://chromiumcodereview.appspot.com//10827275

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10489 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 10:53:01 +00:00
fschneider@google.com 10977e0540 Match input operand count of BranchInstr with the input location count.
For now this is achieved by making the branch instruction push its
arguments itself in the case it performs an instance call.

Also remove the result location from the location summary of BranchInstr
in the instance call case since it does never produce a result.
Review URL: https://chromiumcodereview.appspot.com//10823258

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10488 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 10:34:38 +00:00
regis@google.com f1bdaf504a Retrying r10475 (now with null check):
Continue work on type propagation in optimizing compiler (still WIP).
Propagated types are cached in ssa definition nodes.
Type propagation iterates until fix point is reached.
Type checks are marked as eliminated when possible.
Review URL: https://chromiumcodereview.appspot.com//10854084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10478 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 01:26:13 +00:00
regis@google.com 7e27be6b90 Revert r10475.
Review URL: https://chromiumcodereview.appspot.com//10831252

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10476 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 00:39:42 +00:00
regis@google.com 28bd435419 Continue work on type propagation in optimizing compiler (still WIP).
Propagated types are cached in ssa definition nodes.
Type propagation iterates until fix point is reached.
Type checks are marked as eliminated when possible.
Review URL: https://chromiumcodereview.appspot.com//10829270

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10475 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 00:07:21 +00:00
srdjan@google.com b7f043bc6b Replace deopt stubs location/register shuffling with using deopt-info. Added deopt instruction commands. Also fixes a crash in IA32 with use_ssa where the stack is incorrect after deoptimization. Tested IA32 with and without use-ssa.
Review URL: https://chromiumcodereview.appspot.com//10825236

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10469 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 23:46:38 +00:00
hausner@google.com 29f91cc6f4 Implement new catch syntax in vm compiler
- Support for new on T catch (e) syntax
- warning (default:off) when old catch clause syntax is found
- convert one language test to used new catch syntax
Review URL: https://chromiumcodereview.appspot.com//10827240

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10456 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 20:14:18 +00:00
vegorov@google.com 3a121cc677 Align AllocateObjectComp and AllocateObjectWithBoundsCheckComp with ssa allocator.
AllocateObjectComp becomes a call computation with all arguments pushed via PushArgument.

AllocateObjectWithBoundsCheckComp pushes inputs internally.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10453 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 19:34:41 +00:00
turnidge@google.com 312471dfed Don't hard-code getter prefix in code_generator.cc.
Review URL: https://chromiumcodereview.appspot.com//10828213

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10448 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 16:20:46 +00:00
srdjan@google.com 32d5673c05 Move deopt reason into PcDescriptor so the EAX/RAX register is not destroyed. Some cleanups in PC descriptor.
Review URL: https://chromiumcodereview.appspot.com//10832214

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10424 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 22:15:38 +00:00
asiva@google.com d4d781d636 - Unify class ids and snapshot object ids list so that we don't have disparate
and sometimes confusing values.
- Remove instance_kind_ field from RawClass.
- Rename all class id names to have a Cid suffix.
- Remove code from object.h and object_store.h which dealt with object ids
  of predefined classes for snapshots.
Review URL: https://chromiumcodereview.appspot.com//10827209

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10418 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 19:46:23 +00:00
turnidge@google.com 2d1435f615 Don't call IdentifierPrettyName with signature classes.
Review URL: https://chromiumcodereview.appspot.com//10855052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10415 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 18:28:14 +00:00
hausner@google.com 45b76746b5 Fix super getter/setter
Fix handling of super getters and setters. In particular, parser
now correctly converts super getters into super setters for
compound assignment, and pre- and postfix increment operators.

co 19 tests still fail because super index operator is broken.
Will work on this next.
Review URL: https://chromiumcodereview.appspot.com//10849004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10413 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 18:02:51 +00:00