Commit Graph

15405 Commits

Author SHA1 Message Date
cshapiro@google.com f978301321 Add macros for specifying 64-bit integer literals.
Review URL: http://codereview.chromium.org//8604007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2150 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 23:08:29 +00:00
turnidge@google.com 36a830115b Use a preallocated StackOverflowException rather than allocating one
while our stack is hurting.  This allows us to get rid of the stack
tweaking which we do in this case.
Review URL: http://codereview.chromium.org//8823001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2149 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 23:01:46 +00:00
srdjan@google.com f98993384f Canonicalize TypeArguments.
Review URL: http://codereview.chromium.org//8773026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2133 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 17:47:47 +00:00
asiva@google.com 7ddd0f0b89 First step towards generation of application script snapshots
- Introduce 3 kinds of snapshots (full, application script and messages)
- Added a dart API function to be used for generating an application snapshot
  and for loading the script from an application snapshot.

Next step is to introduce special handling in the WriteTo and ReadFrom
snapshot functions for 'kind == Snapshot::kScript'
Review URL: http://codereview.chromium.org//8772061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2105 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 00:34:49 +00:00
hausner@google.com 164ee66e38 More fixing linux.
Review URL: http://codereview.chromium.org//8806022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2093 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 21:44:11 +00:00
hausner@google.com f296131d32 Fix linux build
Mac doesn't care when you compare signed and unsigned values it seems...
Review URL: http://codereview.chromium.org//8803025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2091 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 21:40:44 +00:00
hausner@google.com b122f27eac Debugger step 2
Add ActivationFrame and StackTrace classes.
Add Breakpoint info: url and line number.
Fix breakpoint stub so breakpoints don't get patched over by PatchStaticCall
Review URL: http://codereview.chromium.org//8775060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2089 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 21:11:39 +00:00
asiva@google.com 4505063244 Restore the rule to build a no snapshot binary of dart as Srdjan feels it is still needed for debugging some corelib issues.
Review URL: http://codereview.chromium.org//8805014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2088 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 21:11:00 +00:00
regis@google.com 777625235f Support qualified factory names (fix issue 514).
Review URL: http://codereview.chromium.org//8804019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2085 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 19:22:27 +00:00
iposva@google.com 7dc624930d - Add the include directory to the include directories of code
depending on libdart.
Review URL: http://codereview.chromium.org//8806018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2082 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 18:59:43 +00:00
turnidge@google.com 1abf65b434 Add Dart_IsExternalString and Dart_ExternalStringGetPeer to the dart
embedding api.
Review URL: http://codereview.chromium.org//8775039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2080 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 17:55:01 +00:00
ager@google.com 456d63c6ab Add support for client/dartc compilation only tests.
These tests do not fit in that nicely. They have an interesting
way of finding out what are test cases. They use the .dart
suffix in the status file.

Implement directory createTempSync.

R=whesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2067 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 13:34:12 +00:00
iposva@google.com a9a5759f30 - Add free list to be used for sweep phase of mark-sweep collector.
Review URL: http://codereview.chromium.org//8787012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2053 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-03 05:39:26 +00:00
sgjesse@google.com a9fecab434 Fix performance of readLine
Using getRange to chop off the front of the list of char codes for
each line read was to slow. Use an offset into the list instead and
throw away the list when all char codes have been read.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2023 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 14:38:46 +00:00
sgjesse@google.com 775438288d Add line handler to string stream
This adds the line handler to the string stream to provide callbacks
when a line is known to be available.

This change also refactors parts of the string stream to avoid
converting decoded char codes to a string before checking for line
break sequences. With this change the string decoder tracks all line
breaks.

There is still room for improvement as e.g. the coping of the list of
char codes when reading lines can be avoided by using anoher offset.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2016 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 11:59:02 +00:00
srdjan@google.com d07087ce77 Ongoing renaming of type classes:
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8776020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2002 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 23:19:59 +00:00
asiva@google.com f556b81f0f Refactor the gypi files to eliminate some redundancy.
Review URL: http://codereview.chromium.org//8772016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1999 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 23:04:22 +00:00
srdjan@google.com 2ff4d8a207 Address Regis' comments, replace AbstractType with Type where possible.
Review URL: http://codereview.chromium.org//8772009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1992 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 21:14:48 +00:00
turnidge@google.com 5bae9d4020 Add some checking macros:
CHECK_ISOLATE -- make sure that there is a current isolate.
CHECK_NO_ISOLATE -- the opposite.
CHECK_ISOLATE_SCOPE -- make sure that there is a current isolate and it has an API scope.

DARTSCOPE changes to call CHECK_ISOLATE_SCOPE.  If you don't want
that, use DARTSCOPE_NOCHECKS.

Went through all of the DART_EXPORT function and made sure they all
had the appropriate checking.

Rewrite DARTSCOPE a bit to avoid evaluating the macro param multiple
times.
Review URL: http://codereview.chromium.org//8733011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1990 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 19:17:10 +00:00
turnidge@google.com bf548c4cca Add some ::'s to disambiguate calls for the win32 build.
Review URL: http://codereview.chromium.org//8773015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1989 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 18:59:23 +00:00
turnidge@google.com 7c2a96158e Stop using void* types in the dart embedding api.
Review URL: http://codereview.chromium.org//8761007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1988 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 18:18:06 +00:00
srdjan@google.com 17552e9a3c Renaming type classes as discussed:
Type -> AbstractType
ParameterizedType -> Type

TODO: 

TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8761011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1987 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 16:54:52 +00:00
podivilov@google.com c692646f07 Introduce Dart_SetVMFlags API function.
It should be possible to set command line arguments without providing isolate init callback.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1972 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 11:59:35 +00:00
ager@google.com a7e26a2575 Fix HTTP sample implementation to actually wait for connections before attempting to write.
R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1971 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 11:44:29 +00:00
iposva@google.com 3117f4cbfc - Implement a simple old-generation marker.
Review URL: http://codereview.chromium.org//8761006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1962 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 02:11:40 +00:00
regis@google.com b2a50c744b Port object tests to x64.
Review URL: http://codereview.chromium.org//8758012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1959 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 01:44:01 +00:00
asiva@google.com b53c955b37 - Refactor the isolate callback mechanism to also include creation of the
isolate, this enables creation of isolates using a snapshot
- remove source buffers of corelib, coreimpl-lib and builtin-lib from the binary
Review URL: http://codereview.chromium.org//8673002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1958 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 00:30:25 +00:00
regis@google.com e27623a4ef Disable x64 disassembler under win32.
Add x64 assembler macros.
Review URL: http://codereview.chromium.org//8760015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1955 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 23:55:30 +00:00
regis@google.com d55fe56fcc Disassembler for x64.
Review URL: http://codereview.chromium.org//8758005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1953 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 23:12:46 +00:00
srdjan@google.com fbd0212a89 Better fix for printing (after discussing it with Ivan and Regis)
Review URL: http://codereview.chromium.org//8761004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1952 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 23:10:39 +00:00
regis@google.com 503896daef Initial revision of assembler for x64.
Review URL: http://codereview.chromium.org//8747023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1951 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 22:02:21 +00:00
srdjan@google.com a0371264a9 Fix breakage in printing.
Review URL: http://codereview.chromium.org//8761003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1950 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 21:55:22 +00:00
srdjan@google.com 0063555050 Use ParametrizedType instead of Type where appropriate. Expand ToCString of type related classes. Do not instantiate abtract classes Type and TypeArguments (e.g., through Type::null());
Review URL: http://codereview.chromium.org//8742028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1941 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 21:14:22 +00:00
hausner@google.com 51bb1d4e4c Properly detect name collisions at library level
Fixing issue 592
Review URL: http://codereview.chromium.org//8724015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1934 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 18:55:37 +00:00
hausner@google.com 84d5a83afa Fix linux build.
Review URL: http://codereview.chromium.org//8749007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1929 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 17:10:56 +00:00
hausner@google.com b7cf1328a1 Very first steps for a debugger
- Introduce Debugger class.
- Each isolate has a debugger object.
- Introduce stubs that can be put in place of static or dynamic
  Dart function calls.
- Very rudimentary command line option to place a breakpoint
  at the beginning of a function.
Review URL: http://codereview.chromium.org//8687037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1928 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 17:04:45 +00:00
ager@google.com 3653ebdd17 Only report poll failures when it is something we cannot recover from.
R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1922 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 13:32:26 +00:00
srdjan@google.com e165afda1b Inline instance of test with List<Dynamic>.
Review URL: http://codereview.chromium.org//8686016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1911 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 01:58:25 +00:00
turnidge@google.com 4c744fce5b Fix checked mode test.
Review URL: http://codereview.chromium.org//8735006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1908 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 22:11:52 +00:00
turnidge@google.com d07287b06e Fix the linux build.
Review URL: http://codereview.chromium.org//8724008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1907 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 22:06:16 +00:00
turnidge@google.com cf23dbad75 Add a mid-sized integration test for the Dart Embedding Api which
demonstrates how to create a custom isolate abstraction.  In this
test, we use an event queue to share a single thread among our custom
isolates.

Add a callback which allows embedders to see when a port is created.
Not sure if I should keep this or not.

New apis:
  Dart_CreatePort() -- allocates a port id and adds a port->isolate mapping.
  Dart_IsolateHasActivePorts() -- does the current isolate have open ports?
  (this name a bit awkward...)

Bail out of PortMap::ClosePorts() early if there are no open ports.
This suppresses calls to the close_port_callback when there are no
open ports.

Use DART_CHECK_VALID to provide better error output when the test lib
has errors.

-------------------------
Sample output of the test:

-- (isolate=0x815600) Constructing isolate
-- Enter: CustomIsolateImpl_start --
-- Adding port (7111) -> isolate (0x830800) --
-- Adding StartEvent to queue --
-- Exit: CustomIsolateImpl_start --
-- Adding port (7112) -> isolate (0x815600) --
-- Posting message dest(7111) reply(0) --
-- Adding MessageEvent to queue --
-- Starting event loop --
>> StartEvent with isolate(0x830800)--
-- (isolate=0x830800) Running isolateMain
$$ MessageEvent with dest port 7111--
-- (isolate=0x830800) Received: 42
-- Posting message dest(7112) reply(0) --
-- Adding MessageEvent to queue --
$$ MessageEvent with dest port 7112--
-- Closing port (7112) --
-- Adding ShutdownEvent to queue --
-- (isolate=0x815600) Received: 43
<< ShutdownEvent with isolate(0x815600)--
-- Finished event loop --
Review URL: http://codereview.chromium.org//8588040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1906 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 21:55:13 +00:00
turnidge@google.com 932628e0fd Add Dart API scoping around the call to Dart_HandleMessage. This
allows us to print the error message in the case that there is an uncaught
exception while handling an inter-isolate message.


Add a couple of unit tests that exercise
Dart_RunLoop/Dart_HandleMessage a bit.
Review URL: http://codereview.chromium.org//8659012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1904 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 21:41:00 +00:00
regis@google.com f43ffceffd Update function type checking in VM after spec change (issue 444):
- the return types must be covariant or contravariant (an earlier version of the
  guide specified contravariance only).
- the names of optional parameters must match in the same order (an earlier
  version of the spec specified that any subset was allowed, no order required).
Review URL: http://codereview.chromium.org//8664015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1898 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 17:00:16 +00:00
sgjesse@google.com 286d5dff90 Change handling of accepting socket connections
The accept method have been removed from the ServerSocket class and
the signature for the connectionHandler callback have been changed to
provide the accepted socket as an argument.

This is to avoid the possibility for accept to return null even in the
case of pending connection. This could happen if an error like EAGAIN,
EWOULDBLOCK and EINTR was returned by it OS accept call and previously
there was no way of propagating this without returning null from the
Dart call to accept.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1889 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 12:02:01 +00:00
ager@google.com 946b015d0a Fix memory leak in MacOS process handling.
Report error for failing writes. We used to enter a poll loop
because we kept on attempting to write.

Currently the error handling in the socket interface is inconsistent.
We have a big TODO item on general error handling including the socket
interface.

R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1887 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 10:10:07 +00:00
iposva@google.com a75ffe679a - Ignore marking bits when visiting pointers.
Review URL: http://codereview.chromium.org//8727015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1883 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 00:26:04 +00:00
iposva@google.com edd46d501f - Add support for marking bits in the object header.
Review URL: http://codereview.chromium.org//8728016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1882 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 23:44:08 +00:00
srdjan@google.com 35916f5eb2 More --use_slow_path tests, add that VMOption to two tests.
Review URL: http://codereview.chromium.org//8725009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1881 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 23:38:39 +00:00
asiva@google.com 5d0ad4091f Fix type warnings in coreimpl lib.
Review URL: http://codereview.chromium.org//8664003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1876 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 21:06:25 +00:00
regis@google.com 0c2d2598bd Fix slow path for allocation of implicit closures (issue 613).
Review URL: http://codereview.chromium.org//8664005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1873 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 19:08:25 +00:00