Commit Graph

1287 Commits

Author SHA1 Message Date
ager@google.com b6e35655cf Make the crypto library an official dart:crypto library.
The library now works on dart2js and on the VM.

Add the library to the API docs and to the sdk.

R=iposva@google.com,dgrove@google.com,kasperl@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7604 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 11:20:56 +00:00
sgjesse@google.com 839f6e0587 Revert "Fix URL decoding in HTTP library"
Issues with dart2js tests.

TBR=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7600 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 10:26:12 +00:00
sgjesse@google.com 0086312006 Fix URL decoding in HTTP library
Now URL decoding works for non-ASCII URLs and will be UTF-8 decoded.

R=ager@google.com

BUG=dart:2902
TEST=tests/standalone/io/url_encoding_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7599 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 09:58:27 +00:00
cshapiro@google.com 3c1eaa5277 Implement a getter for pattern to complete the Match interface.
BUG=3003

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7570 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 22:06:14 +00:00
srdjan@google.com 0ed5a12568 Fix IC data insertion: do it before the graph is built.
Review URL: https://chromiumcodereview.appspot.com//10378099

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7554 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 16:38:26 +00:00
ahe@google.com e3cad04c02 Split the URI library across multiple files.
Review URL: https://chromiumcodereview.appspot.com//10383103

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7543 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 13:40:03 +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
ager@google.com 5fb75d3952 Change dart:io to use Future for one-shot operations.
This appears to be what a lot of our users are doing and it is the
style used in our other libraries.

Noteworthy changes:

- File and Directory objects are now immutable.

- Directory.list returns an active lister object.

- Write operations on files return futures and the
  onNoPendingWrites handler is gone. The same
  functionality is there by using 'then' on the
  future returned from the last write operation.

- Process starting is now done with static methods:
  -- Process.start yields an InteractiveProcess.
  -- Process.run yields a Future<ProcessResult>

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7529 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-11 06:09:42 +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
regis@google.com 5d9dab620c Implement latest rules prohibiting some self referencing typedefs.
Update tests.
Review URL: https://chromiumcodereview.appspot.com//10377095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7524 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 23:03:36 +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
srdjan@google.com bdb733b800 With removal of increment operations, each node has a unique id.
Review URL: https://chromiumcodereview.appspot.com//10356108

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7517 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 20:23:15 +00:00
iposva@google.com 3d4d4d71a7 - Typed arrays should implement all methods from Collection and List interfaces.
Review URL: https://chromiumcodereview.appspot.com//10391056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7512 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:17:54 +00:00
asiva@google.com 4f105f9d0b Resubmit change 7506.
Review URL: https://chromiumcodereview.appspot.com//10387061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7511 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 19:17:37 +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
asiva@google.com 6911f88b25 Revert change 7506 to check on build failure.
Review URL: https://chromiumcodereview.appspot.com//10386073

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7508 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:36:06 +00:00
asiva@google.com 3e5d8216c3 Fix issue 2888.
Allow for the library tag handler to be setup for the isolate, instead of
while loading a script. This ensures that we can use #import on the boot strap libraries like builtin, uri etc.

This change results in a dart API change and corresponding modifications are
necessary in dartium and App Engine.
Review URL: https://chromiumcodereview.appspot.com//10302020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7506 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:25:47 +00:00
iposva@google.com 1829b6328a - Fix the no_snapshot build.
Review URL: https://chromiumcodereview.appspot.com//10389072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7505 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:16:46 +00:00
antonm@google.com 0ccc21fc5a Fix Mac build.
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7503 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 18:06:00 +00:00
srdjan@google.com 92eb96c913 Fix issue 2939, revert previous change that accepted null as excpetion objects:
throw null throws NullPointerException as per latest spec.
Review URL: https://chromiumcodereview.appspot.com//10392016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7475 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 22:27:12 +00:00
srdjan@google.com 48f28eebdb Fix bugs in expression temp allocation, Kevin's CL 10302007 (Remove temporaries using explicit names) and merge with other temp.
Review URL: https://chromiumcodereview.appspot.com//10389041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7472 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 21:39:58 +00:00
whesse@google.com 54cf1d6dcf Remove dependence on samples from runtime checkout, mistakenly added by r7412
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7464 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 15:21:29 +00:00
ajohnsen@google.com 33dc2dd6e4 Correctly entirely close client connections, when closing http server.
Also remove duplicate call to _connectionEstablished.

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7448 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 10:55:42 +00:00
sgjesse@google.com 56945855e9 Add Exception to the class name for recently added exception classes
R=ager@google.com

BUG=none
TEST=none

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7444 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 10:18:24 +00:00
sgjesse@google.com fca01e72b7 Avoid using chunked transfer encoding when the HTTP verision is 1.0.
R=ager@google.com

BUG=dart:2938
TEST=tests/standalone/io/http_content_length_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7442 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 09:06:28 +00:00
sgjesse@google.com 45c6481a74 Make the HTTP server close non-persistent connections
When closing the connection due to non-presistent connection make sure
that all data are sent to the receiver. For socket close due to errors
or idle timeout destroy the socket.

R=ager@google.com

BUG=dart:2918
TEST=tests/standalone/io/http_connection_close_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7441 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 08:53:41 +00:00
sgjesse@google.com a579f1f449 Implemented W3C complient web socket client interface
Fixed a bug where onMessage events could happen before the onOpen event.

R=ager@google.com, ajohnsen@google.com, vsm@google.com, jacobr@google.com

BUG=dart:2001
TEST=tests/standalone/io/web_socket_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7440 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 08:47:07 +00:00
ajohnsen@google.com c815a502a7 Add indexOf to Int/Float-List's.
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7439 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 07:13:00 +00:00
srdjan@google.com eaab5d38aa Fixed compilation time measurement, restructure some code. Do not use slow ToFullyQualifiedCString in production backend (saves 10% in backend time with compile-all).
Review URL: https://chromiumcodereview.appspot.com//10389023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7435 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-09 00:03:25 +00:00
regis@google.com a1fcd03ca6 Allow self referencing typedefs (issue 2490).
Fix Type::Name for malformed function types (issue 2340).
Added tests.
Removed bad negative test.
Review URL: https://chromiumcodereview.appspot.com//10388019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7422 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 16:27:43 +00:00
srdjan@google.com d55a9bc973 First steps toward a two stages new compiler.
Review URL: https://chromiumcodereview.appspot.com//10356051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7420 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 16:03:15 +00:00
sgjesse@google.com 6e1f264b8a Add redirect support to the HTTP client
Redirection is implemented by re-using the same HttpClientConnection
object for several request/response pairs. There is s redirect method
on the HttpClientConnection object for manual redirection. The
HttpClientConnection object also has properties followRedirects and
maxRedirects to configure automatic redirect handling.

When redirection happen the HttpClientConnection will collect the
redirection history for client einspection and for redirect loop
detection.

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

BUG=none
TEST=tests/standalone/io/http_redirect_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7415 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 13:32:45 +00:00
whesse@google.com 6d9e4b6531 Add gyp build for sample-extension.
Add Visual Studio project file for samples/sample_extension.

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7412 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 12:52:35 +00:00
sgjesse@google.com 4eea8aac7e Fix wrong type in HTTP library
R=ager@google.com

BUG=none
TEST=none

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7408 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 09:52:46 +00:00
ricow@google.com 01fc874f57 Add requested allocation size information to fatal error when heap is exhausted.
Review URL: https://chromiumcodereview.appspot.com//10375046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7403 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 07:16:48 +00:00
sgjesse@google.com 340fc48110 Update HTTP server documentation
R=ajohnsen@google.com

BUG=dart:2934
TEST=none

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7402 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 07:04:06 +00:00
ager@google.com 8a677917d5 Address review comments on Options.executable change.
R=iposva@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7401 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-08 06:41:00 +00:00
srdjan@google.com ad95f248cb Improve type checking, remove unused stub (removed also in x64 in preparation of porting the better type checking code from ia 32 to x64).
Review URL: https://chromiumcodereview.appspot.com//10381045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7399 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 21:37:39 +00:00
srdjan@google.com c8dd31e39b Fix bug 2907: cannot instantiate Dynamic.
Review URL: https://chromiumcodereview.appspot.com//10389006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7397 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 19:49:54 +00:00
regis@google.com c609c03cc2 Stop postponing instantiation of Type and remove InstantiatedType VM class.
Review URL: https://chromiumcodereview.appspot.com//10380019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7389 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 17:34:53 +00:00
sgjesse@google.com 728e5e8720 Correct comment wording
TBR=ajohnsen@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7386 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 14:53:48 +00:00
ager@google.com 16ee3e9bb3 Add executable to Options interface to get the name of the executable used to execute the script.
This is useful when you want to spawn separate dart processes. We do this from tests and we keep getting bitten by a broken search for the executable. Let's make it available instead.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7382 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 14:27:05 +00:00
sgjesse@google.com 315874e470 Add enumeration of the HTTP headers
R=ajohnsen@google.com

BUG=dart:2045
TEST=tests/standalone/io/http_headers_test.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7377 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 13:52:14 +00:00
sgjesse@google.com 370115c39d Better checking and error reporting for HTTP client
R=ager@google.com

BUG=dart:2034
TEST=none

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7371 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 11:53:16 +00:00
sgjesse@google.com 3e33c89b62 Fix error reporting for socket write failure
It now includes the OS error in the thrown exception

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7365 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-07 07:44:33 +00:00
cshapiro@google.com 4ad6942ef1 Fix breakage in the JavaScript compilers.
This change adds a mock "Uint8List" to dart2js, suppresses the new byte
array test on Frog, and renames interface parameters for dartc.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7355 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-05 00:07:25 +00:00
regis@google.com 9810dd0f9a Fix mac debug build.
Review URL: https://chromiumcodereview.appspot.com//10365026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7354 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:31:24 +00:00
srdjan@google.com 318742e413 Inline type checks for complex uninstantiated types, e.g., List<T>.
Review URL: https://chromiumcodereview.appspot.com//10317026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7353 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-04 23:28:26 +00:00