Commit Graph

185 Commits

Author SHA1 Message Date
sgjesse@google.com 2f27215203 Remove the reply port form the native isolate handler
The handler function for a native isolate no longer gets an explicit
reply port. Instead the reply port must be sent as part of the message
if required.

The Dart_CObject structure now exposes the send ports in a message to
a native isolate.

R=asiva@google.com, floitsch@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//43483004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29418 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 08:45:32 +00:00
whesse@google.com 265c25a4a2 Add fields to platform library, implement them on runtime dart.
BUG=
R=ahe@google.com, ajohnsen@google.com, floitsch@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//36883005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29244 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 11:48:28 +00:00
asiva@google.com 1a2f236fab Fix issue 13942 - Dart_Error function invokes OS::VSNPrint with the "format" string containing data derived from the string
R=iposva@google.com

Review URL: https://codereview.chromium.org//27694005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28809 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 17:49:45 +00:00
srdjan@google.com 3a8252f90d Cleanups: int -> intptr_t for "array" lengths, memory sizes.
R=asiva@google.com

Review URL: https://codereview.chromium.org//26294002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28324 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 20:19:37 +00:00
iposva@google.com 35a8e25648 Fix http://dartbug.com/13297
- Error out early if the current working directory cannot be determined.

R=asiva@google.com

Review URL: https://codereview.chromium.org//23875023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27486 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 16:40:36 +00:00
mlippautz@google.com 94502c10ea Checks CObject lengths in native API.
Also converts the API to use intptr_t instead of a mixture of int64_t and int. Internally all variable length objects have lengths and maximum values represented as intptr_t (actually Smi ranges). In order to check for these maximum lengths we need to have a common type for 32 and 64 bit platforms.

Helping constructs like IOBuffer can still use 64bit lengths, but have to check that there values are actually in the domain of intptr_t as soon as internal objects are created.

Addresses issue 4314.

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

Review URL: https://codereview.chromium.org//23532048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27395 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:56:12 +00:00
whesse@google.com 7db2572902 dart:io | Change names for SecureSocket exceptions.
BUG=
R=ajohnsen@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//17589007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24405 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 13:54:42 +00:00
asiva@google.com 45445820da Replace uses of Dart_GetClass with Dart_GetType and Dart_InstanceGetClass with Dart_InstanceGetType (The idea is to deprecate Dart_GetClass and Dart_InstanceGetClass from the API)
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//17261011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24244 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 18:11:47 +00:00
johnmccutchan@google.com 2cf19138e3 HTTP loading cleanups
BUG=

Review URL: https://codereview.chromium.org//17183008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24165 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-19 00:02:38 +00:00
johnmccutchan@google.com e93ba804c4 Revert 24099
Review URL: https://codereview.chromium.org//17284004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24100 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 16:38:17 +00:00
johnmccutchan@google.com 5103b96715 Make implicit things explicit when loading scripts.
Explicitly:
Set current working directory
Set windows flag

Previously these were side effects of calling other functions.

Also use ' strings consistently.

R=iposva@google.com

Review URL: https://codereview.chromium.org//16368002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24099 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 15:59:13 +00:00
asiva@google.com 51651ee00b Split dart_api.h into multiple parts:
dart_api.h - Has the core API functions
dart_mirrors_api.h - Has API functions to support Mirrors or reflection
dart_native_api.h - Has parts which support the native message handling,
                    profilling and other internal tools

R=sgjesse@google.com, vsm@google.com

Review URL: https://codereview.chromium.org//16973003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24062 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 23:47:40 +00:00
ajohnsen@google.com 5ce3b9ddea Clean up dart:io exceptions.
- Introduce IOException.
- Remove HttpParserException.
- Merge RedirectLimitExceededException and RedirectLoopException into
RedirectException.
- Remove 'IO' from FileIOException, DirectoryIOException, LinkIOException
and SocketIOException.

BUG=https://code.google.com/p/dart/issues/detail?id=9955
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//16123036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23848 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 13:15:46 +00:00
johnmccutchan@google.com 43425cc7c7 Remove hack http client and use the one in dart:io
R=asiva@google.com

Review URL: https://codereview.chromium.org//15736023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23496 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 22:04:59 +00:00
iposva@google.com 1836035266 - Modify dart_api.h to be a proper C API.
- Verify that dart_api.h can be used from C
  by changing the test_extension to be a pure C file.

R=asiva@google.com

Review URL: https://codereview.chromium.org//15689013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +00:00
johnmccutchan@google.com 9d264aaee5 Add support for loading scripts from http
R=iposva@google.com

Review URL: https://codereview.chromium.org//15966002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23351 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 14:34:15 +00:00
whesse@google.com fb8471244f dart:io | Add FileSystemEntity.stat() and FileStat class.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//15018011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22685 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-14 16:26:13 +00:00
asiva@google.com 89ef11e004 Final step towards loading core library scripts directly from the sources
- Modify bin.gypi to ensure that the io library and patch files are read
  directly from the sources. Remove the source buffer generation step in
  the gypi files for all the io library and patch files.

- Restructure the code a bit to eliminate some code duplication.

- Delete runtime/tools/concat_library.py

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

Review URL: https://codereview.chromium.org//14752008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22514 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 16:42:46 +00:00
asiva@google.com ea5a3919c5 Resubmit 22380 after fixing the windows build.
R=hausner@google.com

Review URL: https://codereview.chromium.org//14645025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00
asiva@google.com dab8758e7a Revert 22380 to investigate windows build break.
Review URL: https://codereview.chromium.org//14927003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:26:34 +00:00
asiva@google.com 27e78fb6f8 Second step towards loading core library scripts directly from the sources
- Modify the library source generator to generate a source mapping array
  The generated array is of the following format:
  const char* dart::Bootstrap::corelib_source_paths_[] = {
    "dart:core", "/workspace1/dart-all/dart/sdk/lib/core/core.dart", 

    "bool.dart", "/workspace1/dart-all/dart/sdk/lib/core/bool.dart", 
    ...
    ...
  };

- Read the source file using the source mapping array instead of relying on
  a generated buffer containing the sources

- Modify the gyp files to ensure that all libraries are read directly
  from the sources. This CL does not change the patch part yet.
  Remove the source concatentation step in the gypi files for all the core
  libraries.

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

Review URL: https://codereview.chromium.org//14786012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:12:24 +00:00
smok@google.com ebbc2020a2 Put everything in runtime/bin into '::dart::bin' namespace.
Review URL: https://codereview.chromium.org//14341015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22032 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 14:22:30 +00:00
sgjesse@google.com 640e6a9e63 Fix wrong ASSERT
TBR=ager@google.com

Fix building of extension sample

TBR=ager@google.com
BUG=

Review URL: https://codereview.chromium.org//14046011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21427 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 09:56:41 +00:00
sgjesse@google.com 6507357ca0 Add support for more typed data types on native ports
Renamed the kUint8Array type for a Dart_CObject structure to
kByteArray to support all typed data types. The specific type is
stored in a separate type field. No matter what the specific type is,
the length of the byte array is always in bytes.

R=ager@google.com
BUG=

Review URL: https://codereview.chromium.org//14142008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21423 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 09:01:56 +00:00
asiva@google.com a192f216f0 Fix build break in dart2js. The snapshot length was not accounting for the magic number.
Review URL: https://codereview.chromium.org//12419009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20342 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-21 19:49:50 +00:00
asiva@google.com 5858afd74a Write the magic number 0xf5f5dcdc into a script snapshot file and use this to distinguish whether a script snapshot or a regular script file is being passed on the command line (removed the --use-script-snapshot option).
Review URL: https://codereview.chromium.org//12438033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20339 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-21 18:47:49 +00:00
ajohnsen@google.com 28daa7ba59 Introduce ZLibInflater and ZLibDeflater to dart:io.
BUG=

Review URL: https://codereview.chromium.org//12451004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19551 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-06 11:38:41 +00:00
iposva@google.com b564104ea5 - Properly load the core libraries as libraries and not as scripts.
This will honor their imports and library names.
Review URL: https://codereview.chromium.org//12321082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19017 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:25:29 +00:00
asiva@google.com 97ef3c86d3 Move json, uri, utf and crypto libraries into the VM.
This should ensure that we would not need a patch per embedder for these libraries in case somebody decides to patch these.
Review URL: https://codereview.chromium.org//12318031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18865 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 01:24:57 +00:00
asiva@google.com 067b8ba92c Add snapshot size to the VM benchmarks suite.
Review URL: https://codereview.chromium.org//12226068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18367 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 02:39:00 +00:00
sra@google.com b82378e3e4 Revert "Fresh try at "Use browsers JSON.parse for parsing JSON.""
Review URL: https://codereview.chromium.org//12220009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18117 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 07:11:12 +00:00
sra@google.com 2a3de27007 Fresh try at "Use browsers JSON.parse for parsing JSON."
Review URL: https://codereview.chromium.org//12221009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18116 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 07:00:47 +00:00
sra@google.com 42ccc2aa4a Revert "Revert "Revert "Use browsers JSON.parse for parsing JSON."""
Review URL: https://codereview.chromium.org//12192003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18024 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 04:01:28 +00:00
sra@google.com 75a7b7e0f6 Revert "Revert "Use browsers JSON.parse for parsing JSON.""
with missing gyp file.

Review URL: https://codereview.chromium.org//12179004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18023 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:36:10 +00:00
sra@google.com e525fdb517 Revert "Use browsers JSON.parse for parsing JSON."
Review URL: https://codereview.chromium.org//12190002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18022 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:25:53 +00:00
sra@google.com cafd5ddcae Use browsers JSON.parse for parsing JSON.
This shrinks swarm by 27k (3.6%)
We can't make the error messages be the same since the native error contains only a message.

Review URL: https://codereview.chromium.org//12114021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18021 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 03:17:41 +00:00
asiva@google.com c2cafbbe33 - Change the layout of external typed array objects to avoid the extra indirection when accessing elements in the array.
- Change the Dart API which create these external arrays to account for this change
Review URL: https://codereview.chromium.org//12093071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17937 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 18:53:21 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
sgjesse@google.com 3130a75c97 Make all allocation of external arrays used for IO use the IOBuffer class
This will not make a difference right now, but when we start to do
something with io buffers they should originate from the same place.

R=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//11438045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15785 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 13:44:24 +00:00
podivilov@google.com d94dd29bb8 Support symbolic links and package imports in gen_snapshot.
R=asiva@google.com,iposva@google.com

Review URL: https://codereview.chromium.org//11421215

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15702 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 20:27:00 +00:00
ager@google.com 59ea7c3f6c Fix a number of int type issues in dart:io File implementation to avoid implicit conversions that can change the value.
R=sgjesse@google.com
BUG=dartbug.com/5301

Review URL: https://codereview.chromium.org//11414293

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15635 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 14:39:05 +00:00
whesse@google.com 9dfdb4850c Add a TlsSocket class to dart:io, that implements secure client sockets using TLS (SSL).
This uses the NSS (Network Security Services) libraries from Mozilla, which is a cross-platform library for SSL and TLS sockets.  We use the patched version from the Chromium repository, which is checked into third_party by the DEPS file.

Review URL: https://codereview.chromium.org//10916081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14893 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 13:38:32 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

Review URL: https://codereview.chromium.org//11365196

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
asiva@google.com ebbb7c4134 - Represent strings internally in UTF-16 format, this makes it
compatible with webkit and will allow for easy externalization of
  strings. One byte strings are retained for pure ASCII strings.
  (The language specification was changed recently to reflect this as
   follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
  consistent and better describe the underlying functionality
  Dart_NewString => Dart_NewStringFromCString
  Dart_NewString8 => Dart_NewStringFromUTF8
  Dart_NewString16 => Dart_NewStringFromUTF16
  Dart_NewString32 => Dart_NewStringFromUTF32
  Dart_NewExternalString8 => Dart_NewExternalUTF8String
  Dart_NewExternalString16 => Dart_NewExternalUTF16String
  Dart_NewExternalString32 => Dart_NewExternalUTF32String
  Dart_StringGet8 => Dart_StringToUTF8
  Dart_StringGet16 => Dart_StringToUTF16
  Dart_StringToCString => Dart_StringToCString
  Dart_IsString8 => Removed
  Dart_IsString16 -> Removed
  Dart_StringToBytes -> Removed
  Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +00:00
ager@google.com aac030e777 Use patching for dart:io.
This allows the tools such as dartdoc to operate on dart:io
in the same way as it does with other code and allows the
implemenation of parts of dart:io for dart2js if we ever
want to do that.

The current patching is very VM specific. I have only moved
stuff to patch files when they actually need to be. For
Process and Socket everything has to be moved because they
use native fields. For the rest, only the individual native
calls have been put in patch files.

R=sgjesse@google.com,ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//11337019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14259 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:32:30 +00:00
justinfagnani@google.com 1dfb9473c1 Allow package: imports inside isolates
BUG=http://dartbug/5915

Review URL: https://codereview.chromium.org//11195017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13752 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 18:14:38 +00:00
ager@google.com e676e88f81 Introduce a VM-only dart:scalarlist library for byte arrays.
Include it in the SDK so users can use it. Create a dummy
implementation and patch file for the library for dart2js so it can be
documented. Johnni, can you think of a nicer way of making
documentation generation work for a VM only library? Also, it seems that
patching kills the documentation comments and they do not show up in
the generated docs.

R=iposva@google.com,johnniwinther@google.com
BUG=

Review URL: https://codereview.chromium.org//10919267

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12616 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 07:08:10 +00:00
lrn@google.com 978c3f6da6 Move dart:web to pkg:htmlescape.
Remove the dart:web library from the VM.
Remove reference to web library from libraries.dart.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12023 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:30:55 +00:00
kasperl@google.com 8db48e4171 Revert "Move dart:web to pkg:htmlescape."
This reverts r11943.

R=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11945 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 13:17:01 +00:00
lrn@google.com bd49eef27d Move dart:web to pkg:htmlescape.
Review URL: https://chromiumcodereview.appspot.com//10905125

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11943 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 12:54:59 +00:00