srdjan@google.com
6b6d16a41e
Add type check tracing (--trace_type_checks). Inline type checks with class types that have only Dynamic type arguments (or none) and with List<Dynamic> interface.
...
Review URL: http://codereview.chromium.org//8503034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1372 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 21:36:32 +00:00
asiva@google.com
e1277b840a
Fix generation of pprof output.
...
Review URL: http://codereview.chromium.org//8497028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1367 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 18:59:29 +00:00
srdjan@google.com
44a79df7cb
Fix crash when running with --report_invocation_count.
...
Review URL: http://codereview.chromium.org//8497032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1360 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 16:25:23 +00:00
ager@google.com
f789c40d85
Correct the sign of exit codes for the process library.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8506013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1356 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 15:37:40 +00:00
ager@google.com
c7125db824
Simplify SIGCLD handler on linux and mac.
...
Handle all dead processes on sigal. This avoids hanging because we
missed some process terminations when they happened simultaneously.
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8506010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1354 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 13:35:14 +00:00
ager@google.com
ddc5446aa7
Avoid creating zombie processes by waiting for the terminated process.
...
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8506009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1347 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 12:05:44 +00:00
ager@google.com
87c2d27fcf
Reapply directory error handling change.
...
Refactor code to have Platform::StrError(int error_code) on all
platforms. Use that to get better error messages on Windows as well.
BUG=
TEST=
Review URL: http://codereview.chromium.org//8511001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1344 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 11:22:33 +00:00
sgjesse@google.com
841221a47d
Merge the two buffer list implementations
...
R=ager@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8506005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1342 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 10:52:20 +00:00
ager@google.com
fa2c0eca2e
Revert "Post on the error handler in the Directory API when errors are encountered."
...
Breaks the mac build because of differences in strerror_r behavior.
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8509002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1339 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 08:33:43 +00:00
ager@google.com
99831629bf
Post on the error handler in the Directory API when errors are encountered.
...
Terminate the listing operation at that point.
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8499018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1338 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 08:08:50 +00:00
srdjan@google.com
8237924b4a
Runtime type checking should be skipped for Object as destination type.
...
Review URL: http://codereview.chromium.org//8503028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1329 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 21:36:31 +00:00
turnidge@google.com
03df87fe9a
Turn off ObjectEquals test for x64.
...
Review URL: http://codereview.chromium.org//8497020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1327 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 19:38:58 +00:00
turnidge@google.com
04d38885a3
Renaming:
...
Dart_ObjectToString -> Dart_ToString
Dart_Objects_Equal -> Dart_ObjectEquals
Dart_IsInstanceOf -> Dart_ObjectIsType
Dart_ReThrowException -> Dart_RethrowException
Added:
Dart_IsSame: === operation
Added a couple of tests.
Review URL: http://codereview.chromium.org//8490016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1326 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 19:18:22 +00:00
ager@google.com
0a03298fea
Fix hang when opening sockets on ports that are not available.
...
Fix TimeoutTest to use free ports instead of using the same port
always. This does not work because tests are run in parallel and
we can have more than one instance of TimeoutTest running.
R=sgjesse@google.com ,whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8498009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1310 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 13:26:51 +00:00
sgjesse@google.com
37b6f2328a
Fix handling of async IO from pipes on Windows
...
The handling of async IO on Windows wrongly casted everything to a socket connection. For named pipe based connections this caused reading of invalid memory.
Moved some of the functions to a common superclass and only call showdown for socket connections. For named pipe based connections the Dart part of the code will never send shutdown commands as named pipe based connections start out being closed in one direction and closing the other direction causes a close command.
R=ager@google.com
BUG=dart:363
TEST=
Review URL: http://codereview.chromium.org//8503006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1308 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 13:13:26 +00:00
sgjesse@google.com
96f822068e
Fix build
...
TBR=ager@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8498005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1299 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 10:02:44 +00:00
sgjesse@google.com
4a45573956
Change the default for the len argument to writeFrom on OutputStream
...
Fixed a bug in the writing code as a result.
Also added copyByffer argument to one of the write methods on the OutputStream interface.
R=ager@google.com
BUG=dart:292
TEST=EchoServerStreamTest.dart
Review URL: http://codereview.chromium.org//8493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1293 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 09:42:20 +00:00
antonm@google.com
e280d98ea7
Bump stack size for pure Dart isolates.
...
Review URL: http://codereview.chromium.org//8495007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1285 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 07:00:44 +00:00
turnidge@google.com
0a0dc2a020
Fix the build.
...
Review URL: http://codereview.chromium.org//8495001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1278 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 01:11:23 +00:00
turnidge@google.com
9a3434cd17
Allow printf-style arguments for Dart_Error and Api::Error.
...
Convert one error message to use the new facility for testing
purposes. The rest of the errors will be improved in follow-on
changes.
Add tests.
Minor comment fixes in dart_api_impl.h.
Review URL: http://codereview.chromium.org//8492015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1276 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-08 00:12:59 +00:00
hausner@google.com
f59e679860
Capturing for loop variables correctly
...
Re-introduce a "fresh copy" of the for loop variable(s) in each iteration. Adding a minimal test to check that closures capture the value of the particular loop iteration.
Review URL: http://codereview.chromium.org//8490019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1273 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 22:36:28 +00:00
ager@google.com
ec697c8481
Implementation of Platform class that exposes information about the machine and the OS.
...
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8492007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1260 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 15:04:42 +00:00
sgjesse@google.com
19bab0d5d9
Fix build
...
TBR=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8494009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1255 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 14:02:22 +00:00
sgjesse@google.com
77e1072eeb
Change the handling of the close event in the StringInputStream
...
When the underlying InputStream issues a close event keep track of
when the final string data have been read from the
StringInputStream. When all string data have been read schedule a
callback of the close event.
R=whesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8477026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1253 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 13:51:37 +00:00
ager@google.com
8a7ae17d76
Handling of wrong types of arguments in the File API.
...
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8491014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1251 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-07 13:23:28 +00:00
turnidge@google.com
9a118fbb49
Add Dart_Null, Dart_True, and Dart_False.
...
Fix Dart_NewPersistentHandle so it won't break if passed one of these
persistent handles.
Reviewer: Should I document that these new functions return a
persistent handle?
Review URL: http://codereview.chromium.org//8446009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1230 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-05 00:09:36 +00:00
cshapiro@google.com
007e9c3cae
Allow allocation of four byte strings through the Dart API.
...
Review URL: http://codereview.chromium.org//8474014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1229 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 23:41:58 +00:00
srdjan@google.com
1d4dffcaf2
Emit node id at every call to runtime.
...
Review URL: http://codereview.chromium.org//8475013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1226 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 22:51:19 +00:00
asiva@google.com
8743e1cc2a
- Fix the snapshot generation python script to return an error code when snapshot generation fails and print the error message.
...
- Split isolate creation into CreateIsolate and InitializeIsolate so that we don't get SEGVs when there is a failure compiling the corelib dart sources during the bootstrap process
Review URL: http://codereview.chromium.org//8334031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1225 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 22:08:13 +00:00
srdjan@google.com
084c89a189
Fix pc descriptor emission for skipped unary oepration +. Eliminates last co19 crash.
...
Review URL: http://codereview.chromium.org//8479006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1220 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 20:10:23 +00:00
mattsh@google.com
a93088691c
convert isolates to use Future
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8457005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1213 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 18:40:13 +00:00
hausner@google.com
b121e837d4
Address Regis' review feedback
...
TBR
Review URL: http://codereview.chromium.org//8475005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1208 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 17:04:40 +00:00
srdjan@google.com
59b79d8171
Fix more co19 crashes. Introduce GET_NATIVE_ARGUMENT that throws an illegal argument exception if the native argument is of incorrect type.
...
Review URL: http://codereview.chromium.org//8476002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1205 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 16:30:29 +00:00
hausner@google.com
504eea10ff
Experimental version without native constructor support
...
The semantics of native constructors are not really clear. Instead of a native constructor, write a regular Dart constructor that calls a native function in the constructor body instead.
Review URL: http://codereview.chromium.org//8450016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1201 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 15:58:55 +00:00
srdjan@google.com
6a0e00c33c
Fix crashes in String natives.
...
Review URL: http://codereview.chromium.org//8455004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1199 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 15:00:04 +00:00
sgjesse@google.com
516d71ab0b
Change the handling of closing sockets
...
Sockets now supports being half-closed for either reading or writing. When a socket is closed it is by default closed for both read and write and the underlying file descriptor is destroyed. However the socket close can be asked to only half-close the socket to send end of stream to the other end and still have the ability to receive more data.
The close event on a socket is only emitted when the socket is closed by the other end. Both half-close and full-close by the other end is reported as a close event. If a socket is already half closed the close event will automatically destroy the socket.
The streams on the sockets also takes advantage of this. A socket input stream will report a close event when the other end closed. A socket output stream will half-close the socket when close is called making it possible to still receive data on the input stream. When both streams have been closed the socket is destroyed.
For sockets operating on pipes they are initially created as half-closed for either reading or writing depending on which type of pipe a socket object is based on. A pipe for writing will start half-closed for reading so if it is only half-closed for writing the socket will still be destroyed. Same with a pipe for reading that will start half-closed for writing and when a close event is received half-closing the other direction will destroy the socket. Socket objects based on pipes are only exposed through streams.
Extended the socket close test to test a number of different scenarios.
Also refactor the socket data C++ object to encapsulate more socket information and operations.
Now the Linux and Mac OS versions are 100% the same as it turned out that using POLLRDHUP on Linux was not required any more.
R=ager@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8437090
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1196 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 12:34:43 +00:00
ager@google.com
68166663f9
Renaming Array -> List in the VM API.
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8372094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1195 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-04 12:25:53 +00:00
srdjan@google.com
0265e3f027
Fixes to co19 crashes:
...
- Null is a valid exception object.
- Throw exception in array copy.
Review URL: http://codereview.chromium.org//8437106
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1173 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 22:31:32 +00:00
hausner@google.com
35cc976b4b
Separating constructor parsing from function parsing
...
Make parsing functions and constructors more readable by separating
the two into disjoint functions.
Review URL: http://codereview.chromium.org//8417056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1172 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 22:29:57 +00:00
iposva@google.com
97634fb30e
- Add the implementation of the Options interface to the runtime.
...
Review URL: http://codereview.chromium.org//8437075
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1169 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 21:45:03 +00:00
srdjan@google.com
d052449ae8
Fix issue 5564152 (VM crash): stack at exit of method was incorrect. Smi equality with Mint was calling operator ==, the result was pushed instead of evaluated to either push a boolean object or to jump to a label.
...
Review URL: http://codereview.chromium.org//8451010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1167 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 21:45:00 +00:00
hausner@google.com
a6b3f4f19c
No returns allowed in constructors
...
Add compiler error message when a constructor explicitly returns a
value. Fixes bug/issue 224.
Review URL: http://codereview.chromium.org//8450009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1161 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 20:07:35 +00:00
srdjan@google.com
cb82be7b44
Restructure instance setter and finish the last 1/3 of increment instance field optimization.
...
Review URL: http://codereview.chromium.org//8439059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1159 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 18:37:44 +00:00
srdjan@google.com
49caedb014
Fix issue: 5427703 (compareTo), fix parsing of -0.0.
...
Review URL: http://codereview.chromium.org//8430037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1156 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 18:03:39 +00:00
ngeoffray@google.com
a76068abeb
Remove unused constructor.
...
Review URL: http://codereview.chromium.org//8440062
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1138 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 10:09:06 +00:00
ager@google.com
8e714d4a4c
Fix type mismatch in File.fullPathSync.
...
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8351094
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1137 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 10:06:55 +00:00
ager@google.com
026a56f666
Implement fullPath method on File objects.
...
R=sgjesse@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8439067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1134 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 08:28:16 +00:00
hausner@google.com
f401476d02
Fix problem with named arguments in constructors
...
When generating the implicit super call to the body, the argument
names have to be duplicated from the implicit initializer call.
Review URL: http://codereview.chromium.org//8386065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1130 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-03 00:36:27 +00:00
srdjan@google.com
67cee5e5d2
Intrinsify String.charCodeAt, String.length and String.hashCode. Improves frog performance by 2x.
...
Review URL: http://codereview.chromium.org//8440051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1120 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 20:42:23 +00:00
hausner@google.com
7651034e9e
Two-phase constructors
...
This CL fixes the initializer evaluation order and brings the VM fully up to spec.
Constructors are executed in two phases: the initializer phase and the constructor body phase. An additional implicit parameter tells the constructor code whether to execute the initializer list or the body (or both).
If the super initializer call is not at the end of the initializer list, the super constructor has to be called twice. The arguments to the super initializer have to be evaluated and stored in temporary local variables. At the beginning of the constructor block, a second implicit super call is inserted.
If the super initializer call happens to be at the end of the list, none of this madness has to happen, except for the extra implicit parameter to the constructor.
Review URL: http://codereview.chromium.org//8440014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1102 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 17:19:15 +00:00