Commit Graph

127 Commits

Author SHA1 Message Date
iposva@google.com 74b2a34d5b - Base JSON stream printing on stack objects.
- Simplify creation of a JSONStream.

- Add experimental coverage output to the VM.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27344 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-10 17:21:59 +00:00
vsm@google.com 92202c9f5e Fix compiler warning
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27303 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 17:35:27 +00:00
hausner@google.com 8e9139da08 Fix debugger stack traces
This change fixes the lookup of exception handlers that are
contained in activation frames that are not user-visible
(e.g. frames in dart library code).

Fixes issue 12318 (https://code.google.com/p/dart/issues/detail?id=12318)

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26445 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 17:22:30 +00:00
jacobr@google.com 605b33c1bc fix cpp11 compile errors
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
iposva@google.com 34b4dfac1e - Avoid double iteration when accessing anonymous classes.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26131 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 17:54:18 +00:00
asiva@google.com 4b2c10ae32 Added following dart API changes to enable more efficient access based
on the dartium usage pattern:
- Dart_GetNativeStringArgument (gets a String object, peer etc. directly from
  the native arguments)
- Dart_SetWeakHandleReturnValue (allows a weak handle to be passed to the
  return value, this ensures a new local handle does not have to be created
  from a weak handle just to return a value)
- Dart_StringGetProperties (gets some common properties of a string, avoids
  multiple API calls to set up a native string)

R=srdjan@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26046 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 01:19:25 +00:00
iposva@google.com 54b3efeede - Remove unused run state from the isolate.
Review URL: https://codereview.chromium.org//22477005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25909 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 01:02:13 +00:00
johnmccutchan@google.com 97ef50a1b2 Support stacktrace and objecthistogram service commands
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25726 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 00:24:09 +00:00
johnmccutchan@google.com ea3a5cfb93 VM Service isolate listing
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25279 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 15:39:03 +00:00
johnmccutchan@google.com 7f993f87ee Object ID Ring with tests
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25063 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 18:31:25 +00:00
johnmccutchan@google.com 4aeef86a3d Call shutdown callback before the isolate is destroyed
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24844 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 14:59:01 +00:00
hausner@google.com 1e955965df Better single stepping in VM debugger
Single stepping now steps into the next dart code that the
user is interested in, including from one asynchronous task
to the next.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24632 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 17:29:18 +00:00
asiva@google.com 8e27430ddd - Create isolate specific resuable handles and use them in the hot lookup paths.
- Create a ResuableHandleScope class which ensures that we do not end up
  recursively reusing handles leading to corruption.

This change shows Dart2JSCompileAll runtime change from 739931 to about
645035 on my local machine.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24373 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 22:41:01 +00:00
johnmccutchan@google.com b7003f166b Stop unwanted class finalization when using dart:io HttpClient from builtin.dart
BUG=11232
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24252 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 20:51:14 +00:00
bak@google.com 5cb3b20063 Object histogramin the vm (--print-object-histogram).
Reviewed and LGTMed in:
https://codereview.chromium.org/16077018/

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23954 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 09:06:43 +00:00
kmillikin@google.com 1248115680 Remove the IC data array from the isolate.
Thread it as an argument rather than storing it in a global variable.  This
means the programmer does not have to implement a shadow stack to save and
restore the data array, and there is no special handling needed for GC.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22982 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 06:21:57 +00:00
srdjan@google.com 142b49316a Fix issue 5275: The VM must always generate the most compact form of an integer (Smi, Mint or Bigint). Hide methods that can be used to bypass that assumption and require the use of Integer::NewXXX which is guaranteed to return the most compact integer form.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22816 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 20:49:06 +00:00
vegorov@google.com 2565ca222f Implement a variation of scalar replacement for non-escaping allocations.
AllocationSinking pass discovers non-escaping allocations that have no input uses other than uses in the stores into its own fields.

Every environment use of such allocation is replaced by a state snapshot (MaterializeObject instruction) that describes the state of each initialized field in the object. State snapshots are computed through an additional round of load-forwarding.

Once snapshots are computed allocations are removed from the graph.

MaterializeObject instructions are not compiled into native code but produce deoptimization instructions instead that describe how object should be materialized at deoptimization.

Deoptimization instructions now follow the following format:

[mat obj #1]...[mat obj #N][ret addr][... mat arguments ...][... real frames ...]

- the prefix describes each object to materialize on deopt via kMaterializeObject instruction;
- actual values that are needed for materialization are emited as a part of bottom-most stack frame. This is done to simplify implementation: they need to be discoverable by a GC during materialization phase. At the end of deoptimization they will be removed from the stack;
- normal stack slots can refer to materialized objects via kMaterializedObjectRef instruction.

Additionally this change contains fixes in load-forwarding that are needed to guarantee that all artificial LoadField instructions inserted during AllocationSinking are correctly replaced with actual values.

Limitations of the current implementation:

- can't eliminate allocations that flow into phis but otherwise don't actually escape;
- can't sink allocations out of loops;
- allocation with type arguments are not handled.

R=regis@google.com, srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22485 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-07 23:40:42 +00:00
asiva@google.com ea5a3919c5 Resubmit 22380 after fixing the windows build.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00
iposva@google.com 083c9e5e95 - Remember the fact that an object has been added to the
store buffer by a bit in the header.
- This bit can be used to filter out redundant additions
  into the store buffer making the dedup sets not needed.
- Remove the need for a HashSet when remembering old to
  new references.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22393 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 20:59:42 +00:00
asiva@google.com dab8758e7a Revert 22380 to investigate windows build break.
Review URL: https://codereview.chromium.org//14927003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:26:34 +00:00
asiva@google.com 27e78fb6f8 Second step towards loading core library scripts directly from the sources
- Modify the library source generator to generate a source mapping array
  The generated array is of the following format:
  const char* dart::Bootstrap::corelib_source_paths_[] = {
    "dart:core", "/workspace1/dart-all/dart/sdk/lib/core/core.dart", 

    "bool.dart", "/workspace1/dart-all/dart/sdk/lib/core/bool.dart", 
    ...
    ...
  };

- Read the source file using the source mapping array instead of relying on
  a generated buffer containing the sources

- Modify the gyp files to ensure that all libraries are read directly
  from the sources. This CL does not change the patch part yet.
  Remove the source concatentation step in the gypi files for all the core
  libraries.

R=hausner@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:12:24 +00:00
tball@google.com ee8ce4a2d3 Resubmission of 21573, with corrected strndup call.
Review URL: https://codereview.chromium.org//14308006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21579 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 21:05:37 +00:00
tball@google.com bffac5979d Rolled back due to missing Windows strndup.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21575 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 20:47:32 +00:00
tball@google.com 56b980f2aa Fixed stack trace for isolates without any Dart frames. Updated
stats display to display empty stack dumps, and reduced screen
update time.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21573 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 20:40:56 +00:00
tball@google.com 6e3f3040a4 Added a run state field to Isolate, to show when it is executing code.
Review URL: https://codereview.chromium.org//13932024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21561 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 17:50:25 +00:00
iposva@google.com 0d8ff3ef16 - Add OS::StrNDup instead of redefining it when needed.
Review URL: https://codereview.chromium.org//13994008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21368 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 16:19:10 +00:00
iposva@google.com 0d0fcbe7e1 Changelist to land https://codereview.chromium.org/13452007/ for Siva.
Review URL: https://codereview.chromium.org//13813018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21160 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 17:51:24 +00:00
tball@google.com 95dfaf1718 Updated VM stacktrace support (20898) with platform-
independent version of strndup.
Review URL: https://codereview.chromium.org//13587008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20936 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-04 18:48:24 +00:00
tball@google.com 404dc8ca8b Rollback of 20898 (Windows doesn't support strndup)
Review URL: https://codereview.chromium.org//13583008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20901 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 22:29:07 +00:00
tball@google.com 94c40f13f3 Added VM support for isolate stacktrace status.
Review URL: https://codereview.chromium.org//12842015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20898 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 22:03:06 +00:00
tball@google.com 6044627aa6 Rollback stacktrace change.
Review URL: https://codereview.chromium.org//12894005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20496 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 22:26:37 +00:00
tball@google.com 044a872ba5 Added VM support for isolate stacktrace status.
Review URL: https://codereview.chromium.org//12578022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20494 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 22:16:40 +00:00
johnmccutchan@google.com 3d4778e2c2 SIMD plumbing
Review URL: https://codereview.chromium.org//12871015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20287 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 20:29:00 +00:00
regis@google.com 1b274ff2cf Remove the barely used macro assemblers after merging their contents to the base
assemblers.
Review URL: https://codereview.chromium.org//12398029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19434 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 00:04:32 +00:00
regis@google.com 3b374ead4b Compile and simulate first dart function on arm generated from ast.
Review URL: https://codereview.chromium.org//12335102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19152 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 17:13:51 +00:00
tball@google.com 4c4482e4c7 Initial prototype of vmstats support, based on Dart VM Stats draft design doc.
Review URL: https://codereview.chromium.org//12221022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19091 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 22:34:08 +00:00
regis@google.com 163db76189 Hook up simulator (if needed) when calling Dart code.
Merge identical InvokeDynamic and InvokeStatic to InvokeFunction.
Remove redundant argument from InvokeClosure.
Review URL: https://codereview.chromium.org//12315087

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18994 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 19:30:29 +00:00
regis@google.com cd746c8172 Initial revision of ARM simulator and (empty) MIPS simulator.
Review URL: https://codereview.chromium.org//12041056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 01:16:35 +00:00
asiva@google.com f4fe42c280 Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
srdjan@google.com d56766f251 More ^= to |=
Review URL: https://codereview.chromium.org//11941021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17308 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:43:19 +00:00
regis@google.com 912194a756 Fix vm code base so that it can be built for --arch=simarm (no snapshot yet).
Review URL: https://codereview.chromium.org//11956004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17246 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:34:20 +00:00
iposva@google.com 3e367a12d8 - Consolidate verbose-gc output to be a single line which can be imported easily into spreadsheets.
Review URL: https://codereview.chromium.org//11734028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16624 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 02:15:36 +00:00
meh@google.com 432978367e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction.
Move Pprof logic to the OS abstraction.
Remove pprof from VM tests because now pprof logic is in the VM itself.
Add DISALLOW and AllStatic to Code Observers where appropriate.

Previous review: https://codereview.chromium.org/11572032/

BUG=7321

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16462 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:23:25 +00:00
meh@google.com ef737f105d Revert "Clean up CodeObservers"
This reverts commit 43e5ada2fba69c7d5c009b5bf70a234f12941617.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16446 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:45:36 +00:00
meh@google.com 6fbf9f1c2e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction
Move Pprof logic to the OS abstraction
Add DISALLOW and AllStatic to Code Observers where appropriate

BUG=7321

Committed: https://code.google.com/p/dart/source/detail?r=16273

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16445 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:37:59 +00:00
ager@google.com 08b1e44502 Reapply "Optimize the message queue for many active ports with few messages."
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16394 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 20:03:07 +00:00
ager@google.com c3c47bbc98 Revert "Optimize the message queue for many active ports with few messages."
No failures locally. I'll investigate tomorrow.

R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16392 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 19:40:29 +00:00
ager@google.com 6e945a2578 Optimize the message queue for many active ports with few messages.
The current message queue implementation is very inefficient if you are using
many active ports with few messages. This happens when you use 'call' a lot
on ports which is currently done in dart:io.

This patch does not remove messages from the queue when closing a port. Instead
it drops messages for closed ports when it processes them. This dramatically
speeds up dart:io benchmarks that enqueue tons of writes on a file output
stream.

R=iposva@google.com
BUG=http://dartbug.com/6911

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16388 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 19:20:44 +00:00
asiva@google.com 8af296c9c8 Cleanup the exceptions create code to use Arrays instead GrowableArrays so
that it is consistent with the DartEntry invoke code that it calls finally.
Review URL: https://codereview.chromium.org//11639007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16295 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 23:47:35 +00:00