whesse@google.com
3b54950144
Remove dart:platform library.
...
This reverts commits r29154, r29244, r29251, r29268, and r29272.
The dart:io Platform class will not be moved to a dart:platform library.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//50573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29435 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 11:33:34 +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
floitsch@google.com
10e9a799d1
Make print interceptable.
...
BUG= http://dartbug.com/3486
R=lrn@google.com
Review URL: https://codereview.chromium.org//27112002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28650 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 16:02:07 +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
rmacnak@google.com
ecc021337d
Better error message when attempting to import dart:html on the stand-alone VM.
...
BUG=http://dartbug.com/3594
R=asiva@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//25826002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28230 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 17:36:41 +00:00
sgjesse@google.com
415d53b557
Add property base to the Uri class
...
Uri.base returns the natural base URI for the current platform.
R=ahe@google.com , floitsch@google.com , iposva@google.com , rnystrom@google.com
BUG=
Review URL: https://codereview.chromium.org//23686021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27877 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 13:52:15 +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
cbracken@google.com
43fae66ebf
Fixes to get Dart VM compiling on Ubuntu 13.04, Debian Wheezy.
...
* Convince gcc 4.7.x that len is initialized before use in callers of ReadFileFully()
* Cast RawObject* to intptr_t to avoid strict-aliasing error on gcc 4.7.x
* Replace two calls to strerror_r() with strerror() on Linux. When _GNU_SOURCE is
defined to be non-zero (as it is on Dart Linux builds), strerror_r() is
defined to return a char*, which is the correct error string to use. When
_GNU_SOURCE is zero, the XSI-compliant definition is used and the error
message is returned in the char* param. Surrounding error logging uses
strerror() which solves the problem.
* Replace int literals with char literals in test string definition.
* co19 math/tan_A01_t01 passes on Ubuntu 13.04.
Original issues:
https://code.google.com/p/dart/issues/detail?id=12085
https://code.google.com/p/dart/issues/detail?id=8807
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//22381002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25890 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-07 17:28:04 +00:00
kustermann@google.com
a38ea2076d
Fixed memory leaks in runtime/bin/dartutils.cc
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//21022008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25608 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 07:13:33 +00:00
floitsch@google.com
3c45bbcbe0
Cleanup VM error handling.
...
Unify the way the runtime throws errors. With this patch the VM goes through one location and always invokes the constructor of the errors.
It also makes it easier to rename fields in the error classes.
R=asiva@google.com
Committed: https://code.google.com/p/dart/source/detail?r=24995
Reverted: https://code.google.com/p/dart/source/detail?r=24997
Review URL: https://codereview.chromium.org//18531003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25000 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:32:37 +00:00
floitsch@google.com
f14e6b4975
Revert "Cleanup VM error handling."
...
This reverts commit r24995.
Review URL: https://codereview.chromium.org//19172002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24997 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 10:18:50 +00:00
floitsch@google.com
ef1afc7f91
Cleanup VM error handling.
...
Unify the way the runtime throws errors. With this patch the VM goes through one location and always invokes the constructor of the errors.
It also makes it easier to rename fields in the error classes.
R=asiva@google.com
Review URL: https://codereview.chromium.org//18531003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24995 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 09:28:28 +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
3c69367fb7
HTTP loading tests and package root support
...
R=asiva@google.com , iposva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//16092007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23593 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 13:52:47 +00:00
johnmccutchan@google.com
738b05471d
Fix HTTP response handling
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//16305011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23565 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 20:32:12 +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
07ff86eb19
Fix windows build
...
Review URL: https://codereview.chromium.org//15904013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23352 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 14:45: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
sgjesse@google.com
9d6a64e81b
Merge the dart:uri library into dart:core and update the Uri class
...
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.
* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization
R=floitsch@google.com , lrn@google.com , nweiz@google.com , scheglov@google.com
BUG=
Review URL: https://codereview.chromium.org//16019002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 13:35:01 +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
sgjesse@google.com
2ef54d314a
Add the ability to change the working directory
...
Directory.current have been changed from a factory constructor to a
getter and setter. The getter returns a Direcotry object holding the
current working directory. The setter changes the current working
directory of the Dart process.
R=whesse@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=6316 , https://code.google.com/p/dart/issues/detail?id=8893
Review URL: https://codereview.chromium.org//13896034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22116 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 12:43:53 +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
iposva@google.com
8b624711d7
- Check for error when creating the source string.
...
Review URL: https://codereview.chromium.org//13842019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21813 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 13:12:57 +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
asiva@google.com
61f6a96cd3
Remove redundant Dart_LoadEmbeddedScript as it doesn't seem to be used in the VM and hopefully dartium can start using Dart_Script always.
...
Review URL: https://codereview.chromium.org//12919020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20277 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 15:41:29 +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