Commit Graph

18413 Commits

Author SHA1 Message Date
turnidge@google.com 53ba5c402e Make the "sticky error" an Error instead of a String.
I do this in preparation for using the sticky error to implement
isolate unwinding.
Review URL: https://chromiumcodereview.appspot.com//9186058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3367 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 19:54:02 +00:00
asiva@google.com 8eb4b8cdf8 - Account for the possibility of timer objects being nested.
- Time library and source loading
Review URL: https://chromiumcodereview.appspot.com//9228007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3365 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 18:29:54 +00:00
sgjesse@google.com 409a5cc49a Use platform implementation of Monitor in thread pool
This removes the direct use of pthread API for the thread pool monitor now that that code is shared. It also gets the Windows implementation for free.

Next step will be to get rid of using the pthread API for handling the threads as well, but that requires additional operations on the Thread class in platform/thread.h.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3362 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 15:36:35 +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
hausner@google.com 6d0e70e334 More parser stuff to handle pseudo keywords as identifiers
More pathological cases.
Review URL: http://codereview.chromium.org//9212018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3318 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-14 00:44:10 +00:00
iposva@google.com d72471512e - More cleanup after the kSAR -> kSHR rename.
Review URL: http://codereview.chromium.org//9212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3313 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 22:46:32 +00:00
regis@google.com 2d1f63af47 Port a couple more stubs to x64.
Fix integer implementation issues.
Enable all tests on x64.
Review URL: http://codereview.chromium.org//9114054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3307 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 20:07:54 +00:00
hausner@google.com 197348daa2 Fix frog build
Doesn't handle pseudo kw right.
Review URL: http://codereview.chromium.org//9174011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3305 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 19:41:33 +00:00
hausner@google.com 343dff6255 Proper handling of built-in identifiers
Allow pseudo-keywords (built-in identifiers) as regular identifiers for anything but class names, interface names, typedef names.

Still todo: Update blacklist of class/interface names, disallow pseudo-keywords as type parameter names.
Review URL: http://codereview.chromium.org//9107070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3303 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 19:24:50 +00:00
iposva@google.com 731616c7d3 - Remove support for ">>>" operator.
Review URL: http://codereview.chromium.org//9203004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3279 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 09:10:48 +00:00
cshapiro@google.com b652a312c1 Rename the VM internal class ByteArray to ByteVector.
Review URL: http://codereview.chromium.org//9139080

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3274 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 01:39:23 +00:00
cshapiro@google.com 917bbbfc39 Provide API support for weak handles and post-mortem finalization.
In addition, this change separates the storage of weak persistent
handles from ordinary persistent handles.  An ordinary persistent
handle now stores no other data than the raw pointer value.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3273 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 01:23:42 +00:00
asiva@google.com ae72c22830 Create temporary handles in the snapshot object during initialization and use them instead of creating temporary handles in each deserialization function.
Review URL: http://codereview.chromium.org//9166012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3271 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 00:38:19 +00:00
asiva@google.com d6ccf8d32a Fix failure
../runtime/vm/object.cc:7149: error: unimplemented code
  Abort
in standalone tests when run with 64bit dart.

The ioctl function when used with FIONREAD was being passed a 64 bit
argument which is incorrect.

Documentation on ioctl:
FIONREAD
The FIONREAD ioctl returns the number of data bytes (in all data
messages queued) in the location pointed to by the arg parameter. The
ioctl returns a 32-bit quantity for both 32-bit and 64-bit
application., Therefore, code that passes the address of a long
variable needs to be changed to pass an int variable for 64–bit
applications.
Review URL: http://codereview.chromium.org//9194002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3250 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-12 19:32:06 +00:00
sgjesse@google.com bf47631716 Add .gitignore file to never ignore the runtime/bin directory
R=whesse@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3228 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-12 07:42:13 +00:00
gbracha@google.com d3bcc88674 Added method map to Collection interface and all its implementations (except classes generated from IDL for the DOM).
Review URL: http://codereview.chromium.org//9114021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3223 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-12 01:25:01 +00:00
turnidge@google.com 5807b0add0 Standardize error printing a bit by moving it to the Error object and
descendants.
Review URL: http://codereview.chromium.org//9148048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3219 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-12 01:01:46 +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
vsm@google.com b06f5be6d8 Build fix for mac/clang
This should get Dartium Mac bots green.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3171 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-11 00:28:26 +00:00
turnidge@google.com 55e33151db Introduce the Error object class in the vm. It represents all of the
things that may go wrong while invoking the dart api.

Here are the four types of error:

- ApiError = the user misused one of the dart apis
- LanguageError = a language-level problem, e.g. compiler error
- UnhandledException = an uncaught exception made its way to the embedder
- UnwindError = a forced isolate interrupt

This cl is the first of a series. I plan to move the point of
creation for LanguageErrors into the Parser, etc. I also plan to move
the longjmp's out of dart_api_impl.cc. I also also plan to implement
UnwindErrors later.

(Copied from Issue 9085031 due to subversion problems)
Review URL: http://codereview.chromium.org//9166016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3168 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 21:42:21 +00:00
turnidge@google.com 9ade77d8f5 Comment-only change to track down some svn issues I'm having.
Review URL: http://codereview.chromium.org//9179002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3167 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 21:20:03 +00:00
asiva@google.com 34a115ad57 - Pass in the isolate parameter when creating handles.
- Store the current isolate pointer in the snapshot reader object and use it instead of calling Isolate::Current() during the deserializing process.
Review URL: http://codereview.chromium.org//9124012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3160 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 18:47:38 +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
ricow@google.com 45b5e07fa9 Fix a few nits in comments in input_stream.dart
Review URL: http://codereview.chromium.org//9155007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3137 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 12:42:02 +00:00
regis@google.com 344dcbde12 Print stop message.
Review URL: http://codereview.chromium.org//9128002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3124 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 00:32:51 +00:00
regis@google.com 5a11b9b3ad A class/interface cannot implement/extend a type parameter (issues 886 and 887).
Added tests.
Review URL: http://codereview.chromium.org//9153006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3122 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 00:01:47 +00:00
sgjesse@google.com a6071e0880 Thread pool changes
Make one global thread pool instead of a thread pool for each
eventhandler (i.e. isolate).

Also:

* Added handler function for thread pool tasks.
* Added thread pool shutdown.
* Added a simple test.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3079 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-09 07:38:30 +00:00
asiva@google.com 2e410f76d4 - Remove redundant initialization in Array::New
- Add timer for measuing isolate initialization
Review URL: http://codereview.chromium.org//9108036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3063 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-07 00:06:31 +00:00
whesse@google.com 480722154a Fix assertion failure in Process object, where non-integer pid could be passed to kill.
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3038 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 13:54:31 +00:00
sgjesse@google.com 9b9a51361e Remove reference to removed bin/global.h from .gypi file
TBR=ahe@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3036 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 13:11:13 +00:00
sgjesse@google.com 8b3b89bf23 Remove bin/global.h now that the buildbot is green again
TBR=ahe@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3035 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 12:59:39 +00:00
sgjesse@google.com 7e66a1488a Add back bin/globals.h to help buildbot
TBR=ahe@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3034 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 12:51:43 +00:00
sgjesse@google.com c686e7bd0d Dummy update to gypi file to force rebuild on buildbot
TBR=ahe@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3032 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 12:40:31 +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
iposva@google.com 54bf6eceb2 - Bump the code heap to avoid running out when running with compile all and
the DOM/HTML libraries.
Review URL: http://codereview.chromium.org//9116029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3020 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 00:13:58 +00:00
hausner@google.com 4ee7c947aa Getting value of local variables on stack trace
Introduce concept of scope in local variable info, according
to mirror proposal.
Review URL: http://codereview.chromium.org//8983034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3017 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 22:33:37 +00:00
hausner@google.com ee79bc031d Second try at additional nested block in functions.
The last change broke dartium tests because as a side effect, the generated
code size increased by 2 or 3 percent. Fixed this unintended side
effect.
Review URL: http://codereview.chromium.org//9109024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3013 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 21:28:32 +00:00
ajohnsen@google.com c2b45bf04e Add optional workingDirectory argument to Process.start.
Review URL: http://codereview.chromium.org//9108008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2987 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 09:54:54 +00:00
ager@google.com 8e2382fa7a Fix wrong return type on fullPath in File API.
R=ajohnsen@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2981 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 08:43:21 +00:00
vsm@google.com 981772b59e Reverting r2970 to fix Dartium break
This should get the Dartium bot green again.

TBR=hausner

TEST=language/HelloDartTest

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2980 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 06:31:17 +00:00
hausner@google.com 5796ad3e3a Fix potential problem with expression evaluation.
Review URL: http://codereview.chromium.org//9110001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2976 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 01:47:10 +00:00
vsm@google.com 7d769998ab Fix sign extension issue with clang/gcc
This is an adaptation of antonm's CL with mods suggested by asiva

http://codereview.chromium.org/9003015

Dartium Mac tests pass with this.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2972 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 00:24:52 +00:00
hausner@google.com 0a3c9e6577 Put function parameters into their own scope.
Local function variables in the outermost scope can shadow function parameters.
Review URL: http://codereview.chromium.org//9088024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2970 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 21:31:23 +00:00
sgjesse@google.com 73c2a13913 Start of thread pool implementation
This the initial commit for adding a thread pool to the Dart
server. For now it is hidden behind a flag (--enable_thread_pool)
and when enabled just starts up and processes 100 void tasks.

Mac OS implementation is not tested and Windows implementation is
still pending.

As we are currently not sharing anything between bin/ and vm/ I
have just used pthread calls directly in the Linux and Mac OS
implementation code. However with Monitor and Thread classes from
vm/ the thread pool could be written platform independently. This
can always be changed later.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2946 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 15:16:06 +00:00
ager@google.com d5696e2026 Change the behavior of open on files to not truncate by default
when opening for writing.

We have an explicit truncate method in the API and truncating
the file is a bit hostile to users who want to modify or append
to an existing file. :-)

R=whesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2941 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 12:23:01 +00:00
iposva@google.com eebc04fa87 - Fix build.
Review URL: http://codereview.chromium.org//9008060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2937 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-04 08:08:39 +00:00