Commit Graph

89 Commits

Author SHA1 Message Date
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
asiva@google.com 2c6de68680 Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the requirements of the runtime.
Deleted all the code duplication that was added to circumvent the old DartEntry API requirements.
Review URL: https://codereview.chromium.org//11613009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16288 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 21:36:01 +00:00
tball@google.com 3282ae3f72 Second version of support for specifying an unhandled exception callback
in Dart.  Isolate.spawnFunction optionally takes a callback parameter,
which is not resolved until an unhandled exception occurs.  If a callback
wasn't specified, the VM will then call an "_unhandledExceptionCallback"
function if it is defined in the isolate's source file. If no callback
is provided, the error is logged as the isolate is closed.
Review URL: https://codereview.chromium.org//11558034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16186 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-15 00:20:07 +00:00
asiva@google.com a658352666 Add dump_symbol_stats to dump symbol table stats at the end of a test run
when --trace-isolates --dump_symbol_stats is used.
Review URL: https://codereview.chromium.org//11416356

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16008 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 00:35:48 +00:00
kmillikin@google.com a119414b2f Cache lookups at megamorphic call sites in optimized code.
The function name and argument descriptor are mapped to a lookup cache
at compile time.  The cache maps class id to target function.  It is
resizable.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15889 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 09:48:52 +00:00
asiva@google.com 1a76ed33c4 Return an unhandled exception error on an OOM or other errors while
reading a message. This ensures that we never call FindExceptionHelper
with no dart invocation frames.
Review URL: https://codereview.chromium.org//11475012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15833 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 01:41:53 +00:00
cshapiro@google.com f5c4d7a381 Unify specification of file open, close, and write callbacks.
Review URL: https://codereview.chromium.org//11442024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15807 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 21:56:31 +00:00
tball@google.com bf5f0db5d0 Added support for isolate unhandled exceptions.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15352 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 23:31:47 +00:00
iposva@google.com 332bfdc7d6 - Remove obsolete random number generator from the VM code.
Review URL: https://codereview.chromium.org//11417049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15058 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 06:12:32 +00:00
asiva@google.com f4fc4f8318 Fix some warnings generated when -Wconversion-null is used.
Review URL: https://codereview.chromium.org//11312096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14553 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 02:58:00 +00:00
srdjan@google.com 39931e05c5 Propagate ICData from unoptimized code to instance calls in optimized code.
Review URL: https://codereview.chromium.org//11341025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14236 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 00:48:11 +00:00
hausner@google.com 1811a6b913 Support for type dynamic in VM
Old name Dynamic is supported, and automatically converted to
lower-case dynamic when parsed.

VM flag --warn_legacy_dynamic prints warnings when Dynamic
is found.
Review URL: https://codereview.chromium.org//11125005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13637 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-12 22:40:24 +00:00
tball@google.com 76d7c9b105 Renamed Zone->StackZone, BaseZone->Zone, in preparation for changing isolate->get_zone() to return what was called the BaseZone instead of its wrapper. The GetBaseZone() methods were not renamed, to help the next CL.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13314 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 19:52:55 +00:00
asiva@google.com 6076250adb 1. Create a port when a debugger object is created for an isolate, use this
port as the unique ID to represent an isolate in the debugger message
   format.

2. Switch the Event handler API to use an isolate id instead of the isolate
   object itself.

3. Add a unit test case for isolate debugger event handling with an
   interrupt of isolate to ensure that interrupting the isolate runs
   the interrupt event handler.
Review URL: https://codereview.chromium.org//11052006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13207 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:13:37 +00:00
asiva@google.com 27e1b05914 Add isolate event handler setup in order to be able to propagate isolate
events (create/shutdown/interrupted)
Review URL: https://codereview.chromium.org//11026011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13130 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 18:09:55 +00:00
fschneider@google.com 6632f191c4 Support for unboxed 64-bit integer bitwise operations and equality on ia32.
This CL adds AND, OR, XOR and == operations on unboxed 64-bit integers
(aka. mints).

Unboxed mints are stored in xmm registers. Each xmm register location
has an additional bit to keep track of its value representation.

Unboxed mints are materialized on the heap on deoptmization in the same way as
unboxed doubles.

The SSE instructions used are available on all CPUs that support SSE 4.1.
Review URL: https://codereview.chromium.org//10968059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13112 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 11:25:53 +00:00
cshapiro@google.com 5665da6258 Revert "Revert "Finalize reachable weak persistent handles at isolate shutdown.""
This reverts commit d701af3a2c8a7169898adcb38fe9da0a667ae7ff.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12072 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 22:17:56 +00:00
cshapiro@google.com c065f5bac1 Revert "Finalize reachable weak persistent handles at isolate shutdown."
This reverts commit b67c5b5d0651a6c9d335ff5ce511901948fd1a51.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12006 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 03:50:44 +00:00
cshapiro@google.com bdb1e2509f Finalize reachable weak persistent handles at isolate shutdown.
BUG=http://code.google.com/p/dart/issues/detail?id=4071

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12005 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 03:14:41 +00:00
cshapiro@google.com da14bf70a7 Add attributions so printf like functions can have their arguments checked.
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
vegorov@google.com a573d2dec8 Unbox phis that were proven to be of type Double.
Eliminate Boxing/Unboxing pairs.

Allow boxing, unboxing and double binary operations to participate in CSE.

Allow double comparisons to operate on unboxed inputs.

Support XMM registers and double spill slots in deoptimization.

Save XMM registers when calling to runtime from WriteBarrier stub.

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11652 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 20:39:48 +00:00
turnidge@google.com bd995a345e Avoid trusting the length encoded in the Snapshot if there is an
external length available.  We now pass a length with all messages in
the vm and verify that there is no mismatch with the length from the
Snapshot.

Fixed a bug in the use of ApiMessageReader.  We were always manually
adding Snapshot::kHeaderSize to the data, but neglecting to subtract
kHeaderSize from the message length.

Added FullSnapshotWriter and MessageWriter classes.
Review URL: https://chromiumcodereview.appspot.com//10829444

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11413 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 20:25:44 +00:00
regis@google.com 6f5281c404 Get rid of ast node ids.
Rename cid to deopt_id.
Review URL: https://chromiumcodereview.appspot.com//10832150

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10306 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 20:24:03 +00:00
regis@google.com ba83d02f9e Add type propagation phase in optimizing compiler (work in progress).
Remove unused cid field from Instruction node and add it to nodes subclassing
Instruction that need it: BranchInstr, ReturnInstr, ThrowInstr, ReThrowInstr.
Remove unused icdata field from Instruction node and add it to BranchInstr.
Review URL: https://chromiumcodereview.appspot.com//10830109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10125 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 17:15:55 +00:00
srdjan@google.com ac8041f15d First step toward deoptimization using deoptimization info: splits deoptimization into two steps: copy frame to buffer, fill unoptimized frame from buffer. The only changes in the frame are the return address and the PC marker.
Second step will add deoptimization info 'instructions' that will fill the unoptimized frames using the saved registers and frame data.
Review URL: https://chromiumcodereview.appspot.com//10836020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10071 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 17:27:15 +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
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
iposva@google.com 65d96de4e8 - Separate store buffer data in the isolate into the StoreBufferBlock and
the actual StoreBuffer.
- Add a HashSet class to use for the StoreBuffer data.
- Fix allocation sites for definite old objects.
- Remove obsolete leaf runtime entry StoreBuffer.
Review URL: https://chromiumcodereview.appspot.com//10702067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9323 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 00:10:23 +00:00
regis@google.com d95cbc8d7f Use VM type cast and save handles.
Review URL: https://chromiumcodereview.appspot.com//10693071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9317 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 21:42:53 +00:00
turnidge@google.com 3f940819a7 Add a callback to inform embedders when an isolate is being shut down.
Review URL: https://chromiumcodereview.appspot.com//10450016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9211 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:15:17 +00:00
asiva@google.com d7aafffcd8 Have the stack overflow code use the correct stack size set by the platform/thread.h
Review URL: https://chromiumcodereview.appspot.com//10544170

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8703 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 01:28:53 +00:00
turnidge@google.com ec36e02c28 Remove the partially completed code for remote IsolateMirrors and
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.

Removed old mirror tests and added two new mirror tests.

Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.

Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.

Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.

Added tests for new dart embedding api functionality.

Added the ability to determine if a port is local to the current isolate.

Extended NotImplementedException to accept an optional string
argument.  I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +00:00
hausner@google.com 6ddf54511d Replace linked list of loaded libraries
Replace the linked list of loaded libraries with a growable array
or libraries in the object store. This array will be used in the
debugger, where we use the index of a library in the array as an
id number, similarly to the class id and the table of loaded classes.
Review URL: https://chromiumcodereview.appspot.com//10414084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7923 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 20:28:21 +00:00
srdjan@google.com 92b9e64375 Adding collected type feedback to the IL nodes (only in optimized mode).
Review URL: https://chromiumcodereview.appspot.com//10378093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7509 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:04:09 +00:00
iposva@google.com d8c7c1ada6 - Add a class index to the classes.
- Add a class table which assigns individual ids to classes.
Review URL: https://chromiumcodereview.appspot.com//9965042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7183 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 09:20:40 +00:00
turnidge@google.com 353b66038e Rework mirrors implementation.
(Note that the current mirrors implementation is just a heartbeat
implementation of a single method)

Use native code instead of dart code to do the work.

Use JSON instead of Lists/Maps for commands/responses.

Reenable disabled tests.
Review URL: https://chromiumcodereview.appspot.com//10175011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6864 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 22:26:09 +00:00
turnidge@google.com 9d72035ce5 Use the ThreadPool for all isolates and native ports. Previously,
each isolate or native port had a dedicated thread.

Refactored the MessageHandler api...

- Added a Run function to allow a MessageHandler to run on a
  ThreadPool.  These functions take a start and end callback to allow for
  isolate initialization and shutdown.

- Made the queue private to the MessageHandler and moved all message
  processing code inside the MessageHandler (got rid of all of the
  different flavors of RunLoop).  This helps remove some code
  duplication and hides the details of how messages are handled.

- Moved all locking and notification out of MessageQueue and moved it
  up to MessageHandler.  Moved OOB support out of MessageQueue and up
  to MessageHandler.  These changes make the MessageQueue much
  simpler.

- Refactored native port and isolate MessageHandlers to share more code.

- Improved --trace_isolates output.

- Added tests for MessageHandler.

Refactored lib/isolate code...

- Use the new MessageHandler::Run api.

- Got rid of the LongJump stuff in RunIsolate.  No longer needed.

- Use the new StartIsolateScope/SwitchIsolateScope to make the code
  less verbose and less error-prone.

- Store top-level isolate errors in the sticky_error.

Added StartIsolateScope/SwitchIsolateScope classes.
Review URL: https://chromiumcodereview.appspot.com//9924015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6762 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 19:47:27 +00:00
asiva@google.com f9655463c7 Remove code index table.
Review URL: https://chromiumcodereview.appspot.com//10082017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6557 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-14 02:03:58 +00:00
turnidge@google.com 5f30febb45 Inline the StackResource constructor/destructor.
This yields a 29% improvement on the Benchmark_UseDartApi microbenchmark.

To do this, I had to split a few fields from Isolate into a
BaseIsolate class.  Sort of yucky.
Review URL: https://chromiumcodereview.appspot.com//10008030

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