Commit Graph

13143 Commits

Author SHA1 Message Date
cshapiro@google.com a40ffbae76 Fix includes to unbreak the Windows build.
Review URL: https://chromiumcodereview.appspot.com//10539151

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8638 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 01:02:08 +00:00
cshapiro@google.com dcaf11db96 Implement a heap profiler for the Dart managed heap.
This profiler will write binary HPROF data to a user provided stream that
can later be viewed by tools such as the Eclipse Memory Analyzer.

While all user defined types are accurately described in the profile data,
internal types that are not self-describing appear as empty objects.  This
will be addressed by a future change.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8636 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 00:08:07 +00:00
regis@google.com 858b662c84 Fix super call invocation (issue 2028).
Review URL: https://chromiumcodereview.appspot.com//10513008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8633 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 23:06:23 +00:00
srdjan@google.com 3f662c0d5a Restore changes lost in merge for r8626 (equality operation).
Review URL: https://chromiumcodereview.appspot.com//10546154

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8629 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 21:13:09 +00:00
srdjan@google.com 681165b68b Some cleanups, started implementing checked instance calls, better equality operation.
Review URL: https://chromiumcodereview.appspot.com//10541135

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8626 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 18:48:46 +00:00
vegorov@google.com fadac390f3 Fuse comparisons that are used by branches together.
This allows us to eliminate materialization of boolean value.

Fix a bug in ToDoubleComp::LocationSummary on ia32.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8617 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 16:23:14 +00:00
iposva@google.com 794ba0f1e4 - Fix test expectations.
Review URL: https://chromiumcodereview.appspot.com//10543137

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8612 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 15:25:08 +00:00
iposva@google.com e1c28d7adf - Remove trailing '\n' when getting the API error message.
Review URL: https://chromiumcodereview.appspot.com//10539133

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8608 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 14:47:33 +00:00
fschneider@google.com ee4a0fd042 First step to SSA construction: Phi insertion.
This CL contains the phi insertion step of the SSA construction algorithmus: The phi instructions inserted are not functional yet. Renaming is not included yet.


I based it on Kevin's CL (http://codereview.chromium.org/10388161/), rebased and fixed a bug (added missing iterator.Advance()) there.

It also reintroduces the Definition IL class because Phi-instructions are also
definitions that are referenced by UseVal.

I also added the set of immediately dominated blocks to each basic block.
This will be needed for pre-order dominator-tree traversal in the renaming pass.
Review URL: https://chromiumcodereview.appspot.com//10539108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8604 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 13:36:04 +00:00
vegorov@google.com d5799bd9c6 Optimize StoreIndexedComp on ia32&x64.
R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8595 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 08:53:54 +00:00
vegorov@google.com bd19464867 Implement kDoubleToDouble and kIntegerToDouble on ia32 and x64.
Fix bug in assembling of cvtsi2sd on x64.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8593 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 08:29:40 +00:00
hausner@google.com 4bac2773d6 Eliminate a couple of uses of String +
Review URL: https://chromiumcodereview.appspot.com//10536129

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8586 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 23:01:14 +00:00
hausner@google.com a1cb082925 Add API to configure debugger pause on exception
Still to be done: proper determination whether an exception is
handled or unhandled. We still assume that TypeError and AssertionError
exceptions are unhanded.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8579 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:56:50 +00:00
turnidge@google.com 312702a5ac Second local mirrors CL.
Implement a few chunks of new mirror functionality.  Many changes, notably:

- Added currentIsolateMirror() to provide non-async access to the
  local isolate mirror.

- Added mirrorOf(o) to provide access to local instance mirrors.

- Fleshed out InstanceMirror, InterfaceMirror, and LibraryMirror to
  various degrees.

- Added the MirroredError hierarchy, which lets the user handle Dart
  errors of various sorts from invocation, etc.

- Introduce lazy resolvers for interface mirrors and library mirrors.
  These allow us to build the self-referential library/interface
  hierarchy without going mad.

- Added better toStrings all around.

- Extended the isolate_mirror_local_test to cover new functionality.

Other changes that were required or seemed prudent:

- Exposed the error hierarchy to the embedder.  They need to be able
  to distinguish different error types in some situations.  Improved
  the documetation around error handles and error propagation.

- Added new functions to the dart embedding api as required.  Added
  tests for all new dart api functions.
Review URL: https://chromiumcodereview.appspot.com//10538043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8575 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:07:49 +00:00
srdjan@google.com 751e48d363 Fix a typo in the new compiler's optimizer.
Review URL: https://chromiumcodereview.appspot.com//10548009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8572 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 20:18:22 +00:00
srdjan@google.com c9801e0819 Implement is32 LoadIndexed.
Review URL: https://chromiumcodereview.appspot.com//10534105

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8555 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 16:27:18 +00:00
srdjan@google.com 0f925121e8 Add code comment to ia32 disassembly as well, bug fix new ia32 compiler, remove use of TMP register outside the assembler. Inlined special methods: ObjectArray, ImmutableArray and GrowableArray and String length getters.
Review URL: https://chromiumcodereview.appspot.com//10536096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8554 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 16:09:02 +00:00
iposva@google.com 9cc40c2b0c - Back to old compiler for ia32.
Review URL: https://chromiumcodereview.appspot.com//10534112

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8551 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 14:14:24 +00:00
iposva@google.com abca337990 - Temporarily enable the new compiler on ia32.
Review URL: https://chromiumcodereview.appspot.com//10535129

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8550 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 14:04:14 +00:00
floitsch@google.com eb92af4080 Revert "Refactor Date implementation in VM."
Also revert "Round days-computation to get rid of daylight-savings differences."

This reverts commit 7542 and commit 8544.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8547 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 13:44:45 +00:00
floitsch@google.com 17de58fbaf Reapply "Refactor Date implementation in VM."
This reapplies a fixed version of commit 8533.
https://chromiumcodereview.appspot.com//10533068

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8542 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 12:04:36 +00:00
floitsch@google.com 02f39238ae Revert "Refactor Date implementation in VM."
This reverts commit 8533.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8535 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:33:36 +00:00
floitsch@google.com 0e297362a2 Refactor Date implementation in VM.
Less (and simpler) native functions. More precise semantics (for both the
native functions as well as for the Date class itself).

Fixes issue 3201.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8533 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:24:58 +00:00
iposva@google.com 97a9127cf7 - Workaround a problem in the gold linker.
Review URL: https://chromiumcodereview.appspot.com//10538103

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8531 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:14:12 +00:00
iposva@google.com 5c19edae90 - Do not use near jumps for large number of sequential class id
comparisons.
Review URL: https://chromiumcodereview.appspot.com//10541112

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8530 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 09:30:34 +00:00
asiva@google.com c078663643 1. Remove recursion during snapshot writing and reading
2. set thread stack size to 128k
3. Fix the native message handler to ensure that it works with the new model of not recursively inlining objects.
Review URL: https://chromiumcodereview.appspot.com//10535066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8517 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 21:39:05 +00:00
srdjan@google.com 630a93195a Fix x64 breakage.
Review URL: https://chromiumcodereview.appspot.com//10538069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8508 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 17:17:35 +00:00
srdjan@google.com 5ad91ae250 Add stack check in loops so that loops can be stopped. Optimize relational operations.
Use class-ids to describe type of operation. Should we adapt BinaryOp to use class ids as well?
Review URL: https://chromiumcodereview.appspot.com//10536086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8507 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 17:02:39 +00:00
asiva@google.com e5c3acc6e0 Fix bug in native message writer, the GetMarkedCObjectMark method was shifting teh value incorrectly resulting in it returning bad object ids.
Review URL: https://chromiumcodereview.appspot.com//10541055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8464 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 20:20:54 +00:00
vegorov@google.com 20549ee20d Implement inlined LoadIndexed operation for arrays on x64.
R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8462 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 19:36:26 +00:00
srdjan@google.com 69be8e6f0b Add righ shift test for corner cases, use macro for deopt reasons (all suggested by Slava in a previous CL)
Review URL: https://chromiumcodereview.appspot.com//10539068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8459 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 18:20:45 +00:00
hausner@google.com eebec2a081 Debugger break on TypeError, AssertionError
Add debugger functionality to pause the VM whenever a TypeError
or AssertionError exception happens.

This is a first step towards breaking on handled and unhanded
exceptions in general. We first need to generate more debug info
for catch handlers so we can determine whether an exception will
be handled or not before we unwind the stack to run the catch
clauses.
Review URL: https://chromiumcodereview.appspot.com//10537065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8457 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:51:50 +00:00
srdjan@google.com 1a94d4d94d Implement Smi binops ia32 (new compiler).
Review URL: https://chromiumcodereview.appspot.com//10542079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8450 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 16:59:49 +00:00
srdjan@google.com af3ea0de3d Add more intrinsics, enable new compiler's optimized mode for ia32.
Review URL: https://chromiumcodereview.appspot.com//10541069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8442 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 15:13:56 +00:00
vegorov@google.com 00bd7303e5 Do not reuse tags_ field to store next_ pointer of FreeListElement.
Make tags_ field be valid (i.e. encode size and class id) for free list elements.

R=iposva@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8437 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 13:11:11 +00:00
vegorov@google.com 70a81f4264 Implement inlined version of binary arithmetic operations for doubles.
No attempt to reuse temporary boxes or locally propagate types is done.

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8433 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 11:27:28 +00:00
cshapiro@google.com 76f0099233 Force growth when retrying an old-space allocation.
Review URL: https://chromiumcodereview.appspot.com//10458072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8411 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 22:29:09 +00:00
iposva@google.com 0680a12791 - Simplify logic when setting up handle content.
Review URL: https://chromiumcodereview.appspot.com//10541061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8409 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 22:17:42 +00:00
srdjan@google.com bd0bda32f0 Inline setters, getters, various cleanups & restructuring.
TODO: cid, token_index and try_index are often passsed around. We should pack them in a data structure.
Review URL: https://chromiumcodereview.appspot.com//10540040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8406 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 19:49:50 +00:00
srdjan@google.com 1c870b27e0 Implemented missing instructions in ia32, more sharing, removed bailouts, enable optimiziations on ia32 with new compiler.
Review URL: https://chromiumcodereview.appspot.com//10538024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8403 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 18:06:15 +00:00
fschneider@google.com c07fc6270d Add type testers to all IL classes.
This change does not change any functionality.  Until now we only had
a select number of type-testers. The CL adds Is- test predicates and As-
type cast function for all computations.

It is in  preparation for upcoming changes where I need to test different
computations for their type.
Review URL: https://chromiumcodereview.appspot.com//10537051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8390 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 12:31:35 +00:00
iposva@google.com aa8aeea71e - Fix build.
Review URL: https://chromiumcodereview.appspot.com//10536051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8388 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 11:28:24 +00:00
iposva@google.com ff35c8a764 - Get handle vtable from a static table for predefined classes.
Review URL: https://chromiumcodereview.appspot.com//10540045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8387 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-07 11:24:25 +00:00
cshapiro@google.com 4dc1d4de6d Intrinsify some ByteArray methods.
get:length is intrinsified for internal and external subtypes.

[] is intrinsified for 8- and 16-bit internal subtypes on ia32.

[] is also intrinsified for 32-bit internal subtypes on x64.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8371 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 23:43:42 +00:00
srdjan@google.com 6ddfae89fa Small efficiency fix.
Review URL: https://chromiumcodereview.appspot.com//10542032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8351 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 17:40:45 +00:00
srdjan@google.com 0912e4ded7 More code for ia32, more shared code.
CreateArrayComp, EqualityCompareComp, StoreStaticField, LoadStaticField, StoreIndexedComp, StoreInstanceFieldComp, Throw, Rethrow, AssertBooleanComp.
Made more code shared, which has the disadvantage od splitting MakeLocationSummary from EmitNativeCode. Discuss.
Review URL: https://chromiumcodereview.appspot.com//10543013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8343 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 15:42:07 +00:00
iposva@google.com 6a5ef0e692 - Add an isolate field to visitors.
Review URL: https://chromiumcodereview.appspot.com//10502004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8337 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 14:47:17 +00:00
vegorov@google.com a4711ef435 Eliminate RawObject::class_ field entirely.
Removed initializations of class_ field done in runtime and generated code on ia32/x64.

Changed forwarding address encoding used by scavenger: kFreeBit is now used to distinguish evacuated objects from not evacuated because scavenger will never encounter real FreeListElement.

Changed FreeListElement layout to match RawObject layout.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8336 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 14:22:52 +00:00
fschneider@google.com 84027c4457 Add flow graph printing into a .cfg file with flag --print-flow-graph-file.
This CL adds a flag --print-flow-graph-file which produces one
.cfg-file per isolate when enabled. Currently it prints the final
flow graph before code generation.

I also added SuccessorAt and SuccessorCount to allow easy iteration
over the successors of a basic block.
Review URL: https://chromiumcodereview.appspot.com//10446116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8322 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 11:09:02 +00:00
srdjan@google.com 0f9c3f91cc Move inlined type checking code to new compiler ia32. Sharing more and more code between ia32/x64 (ongoing process), refactored x64 code slightly.
Review URL: https://chromiumcodereview.appspot.com//10477020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8292 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-05 16:37:38 +00:00