Commit graph

538 commits

Author SHA1 Message Date
asiva@google.com 4027727562 For now set the stack buffer size to 16k (we need to compute this during thread start and store it in the worker object instead of the current scheme of setting this up in HandleMessage).
Adjust stack size to 512KB as all tests seem to run with that limit.
Review URL: https://chromiumcodereview.appspot.com//10558013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8754 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 23:32:47 +00:00
asiva@google.com 5869878eb3 Set max stack size to 1 MB (this is excessive but we seem to have some dart code that has deep recursion).
Review URL: https://chromiumcodereview.appspot.com//10541191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8704 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 01:50:30 +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
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
asiva@google.com 437d743208 Set thread stack size to 128k on macos debug builds as the parser runs into a stack overflow error as it recursively parses an expression in file_test.dart (issue 3537).
Review URL: https://chromiumcodereview.appspot.com//10546112

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8520 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 23:38:15 +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
hausner@google.com c39f48340d Add string encoding to wire protocol
Also, add command to retrieve the source text of a given script.
Review URL: https://chromiumcodereview.appspot.com//10496006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8220 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-02 00:07:12 +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
ager@google.com 333b817631 Increase thread stack size on Mac in debug mode.
After changing dart:io to use Futures the debug Mac build hit the stack
limit during snapshot reading. Landing this to unbreak the build.

R=sgjesse@google.com,asiva@google.com,iposva@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7532 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 07:01:24 +00:00
hausner@google.com dbd9fa4048 Eliminate need for va_copy in json.cc
The hacked version of va_copy did not work on Linux.
Review URL: https://chromiumcodereview.appspot.com//10383122

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7525 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 23:28:14 +00:00
hausner@google.com dec5e465f9 Attempt 2 to fix build
Review URL: https://chromiumcodereview.appspot.com//10310109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7522 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 22:32:39 +00:00
hausner@google.com c8aee10ea3 Attempt 1 to fix build
Review URL: https://chromiumcodereview.appspot.com//10384110

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7521 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 22:11:42 +00:00
hausner@google.com e5d8d80479 Support more debugger commands in the wire protocol
Also add a very simple debugger shell which at this point
is meant to be a debugging help for the debugger code rather
than a user-friendly tool.
Review URL: https://chromiumcodereview.appspot.com//10392017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7518 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 22:04:50 +00:00
hausner@google.com 95be46105a Beginnings of a debugger wire protocol
The debugger wire handler is implemented similarly to the io event handler.
A dedicated thread monitors the debugger port for incoming connection
requests. When a debugger is connected, the VM sends events messages
over the wire and handles debugger requests.

To start the VM with a debugger connection, use the option
--debug:<portnumber>. The VM pauses at the beginning of main()
and waits for a debugger to connect.

Subsequent changes will implement debugger commands one by one.
With this change, the VM only understands "resume" commands. 
Review URL: https://chromiumcodereview.appspot.com//10357003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7330 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 15:25:49 +00:00
asiva@google.com d4e2aa22eb Changes to allow for -O2 compiles on macos in debug builds.
Review URL: https://chromiumcodereview.appspot.com//10180013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7052 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 01:10:10 +00:00
hausner@google.com d55f4fb816 If at first you don't succeed...
...give up.
Review URL: https://chromiumcodereview.appspot.com//9699055

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5499 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 23:25:14 +00:00
hausner@google.com 78f6ca09cd Try fixing the linux and windows builds.
Review URL: https://chromiumcodereview.appspot.com//9706041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5497 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 23:20:49 +00:00
asiva@google.com 738f458956 Changes to get rid of dependency on openssl in the dart VM.
(This will enable dartium to be built on the windows platform).
Review URL: https://chromiumcodereview.appspot.com//9481019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4717 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 18:36:39 +00:00
ager@google.com e92d0eab5a Reimplement Windows Monitors.
Now using an event object per thread which is linked into a list
of waiters for the monitor.

Notify takes the first element of the list and notifies (FIFO order).

Notify all extracts the entire list and notifies each of them. This
avoids the issues with fairness and correctness of the previous version.

The MonitorWaitData object holding the event and a pointer to the
next waiter is stored in thread local storage and lazily initialized.

R=sgjesse@google.com,asiva@google.com
BUG=1614
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4537 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 15:24:18 +00:00
ager@google.com bbaf8a3665 Implement condition variables on Windows on top of Event/SetEvent/ResetEvent.
ConditionVariable is only available since Vista so to support XP
we need to implement this ourselves.

R=asiva@google.com,sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4126 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-10 10:50:25 +00:00
sgjesse@google.com 2c57dd40bf Add integer min/max constants to globals.h
R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4024 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-08 09:22:46 +00:00
sgjesse@google.com af200a2ef7 Fix Windows and Mac OS builds
TBR=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3983 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-07 09:31:51 +00:00
sgjesse@google.com 252323441b Move the thread local functions to the Thread class in runtime/platform
This gets rid of all the platform specific isolate_*.h and isolate_*.cc files.

R=asiva@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3982 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-07 09:18:22 +00:00
sgjesse@google.com 3f035ecad0 Add support for lists and backward references when decoding a message to a Dart_CObject object
The C message reader can now read lists created like this:

  new List()
  new List<int>()
  new List<String>()
  new List<double>()
  new List<bool>()

The backward references are now resolved and already allocated
Dart_CObject objects are reused when there is a backward reference.

The reuse of the Dart_CObject objects poses the issue of which objects
where allocated with the supplied allocator and which where not.

Currently this will work best with a zone allocator. This will be added
to the tests in a subsequent change.

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

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3831 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 09:55:18 +00:00
sgjesse@google.com 42b70dcddb Change the thread interface in runtime/platform and use it starting all threads
The platform thread interface (dart::thread) is now refactored to an
all static interface as suggested by iposva@ and asiva@. Use this
interface for running all threads in the VM.

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

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3830 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 08:59:26 +00:00
ajohnsen@google.com 143de9eb80 Use ByteArray's native for Socket and File.
Review URL: https://chromiumcodereview.appspot.com//9235067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3812 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 21:48:27 +00:00
sgjesse@google.com c1d041500f Use hash map for event handler file descriptor map
Instead of using an array indexed using the file descriptor for
looking up data associated with a socket (SocketData objects) this is
now stored in a hash map using the file descriptor as key.

Added hash map implementation like the one used in the V8 project.

R=ager@google.com, whesse@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3483 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-23 09:10:51 +00:00
sgjesse@google.com 3a02bcfc04 Add additional include guard in platform specific .h files
R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3433 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-19 13:37:26 +00:00
regis@google.com 9993072ff2 Simplify integer arithmetic code.
Optimize Mint multiplication in 32-bit mode.
Review URL: https://chromiumcodereview.appspot.com//9112050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3417 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 22:00:40 +00:00
asiva@google.com 7d991245cb Temporary fix to get x64 builds working again on build bot.
TBR=regis
Review URL: https://chromiumcodereview.appspot.com//9253005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3384 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 03:05:15 +00:00
sgjesse@google.com 68d10e1568 Move Mutex and Monitor from vm/ to platform/
The tests are still in runtime/vm/thread_test.cc.

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

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3349 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 10:29:24 +00:00
sgjesse@google.com fecaf3deb0 Remove dependency from platform/globals.h to platform/assert.h
R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3347 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 10:10:05 +00:00
sgjesse@google.com 65896148c9 Move utils.h and utils.cc from runtime/vm to runtime/platform
Moved additional parts of globals.h from vm/ to platform/ to support
types and constants used by utils.*.

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

BUG=
TEST=

Review URL: http://codereview.chromium.org//9209001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3337 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 13:23:40 +00:00
sgjesse@google.com bf67f24098 Move assert.h/assert.cc from runtime/vm to runtime/platform
The purpose of this change is twofold:

1. Source in the bin directory can now use the same assertions as
   source in the vm directory. The ASSERT macro used by the code
   in runtime/bin was just defined to use assert from the standard
   C library.
2. Moving other implementation parts from runtime/vm to
   runtime/platform (e.g. classes Monitor and Mutex) for sharing
   between runtime/bin and runtime/vm will be easier as these
   implementations rely on these assertion macros.

Created two gypi files for the platform directory. One for the
headers and one for the source. The source one is only included
when building the VM library and will be present in libdart.a
when the dart executable is linked.

All the code for asserts is still in the dart namespace.

Also re-arranged the order of includes to be alphabetically in
the files touched.

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

BUG=
TEST=

Review URL: http://codereview.chromium.org//9189003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3335 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 12:28:10 +00:00
sgjesse@google.com 729c54ceef Fix Windows build
TBR=whesse@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9190006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3187 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-11 15:22:43 +00:00
sgjesse@google.com 0122a33a76 Handle EINTR on all IO operations
There have been spurious FileIOExceptions seen on some Mac OS machines.

R=ager@google.com,whesse@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//9139011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3185 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-11 15:12:27 +00:00
ager@google.com 607eea1402 Cleanup gypi mess.
My change that introduced a platform directory shared between vm and bin runtime components did not correctly update gypi files.

BUG=
TEST=

Review URL: http://codereview.chromium.org//9124030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3155 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 16:50:14 +00:00
ager@google.com c4c92c4f7b Introduce runtime/platform directory for code shared between vm
and bin.

Cleaned up globals.h. Common parts now in platform/globals.h.
vm specific parts are in vm/globals.h and bin/globals.h is gone.

R=sgjesse@google.com,iposva@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//9114008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3030 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 11:28:21 +00:00