Commit Graph

139 Commits

Author SHA1 Message Date
asiva@google.com 0a5bf36268 Changes per discussion with Anton
- Add a new API call Dart_StringTolatin1 so that the contents of a
  string object that satisfies Dart_IsStringLatin1 can be gotten
- Tweak Dart_MakeExternalString to copy out the contents of the string
  for valid string objects that can not be externalized by the VM
  (e.g strings in the VM isolate)
Review URL: https://codereview.chromium.org//11580003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16149 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-14 06:44:26 +00:00
cshapiro@google.com f5c4d7a381 Unify specification of file open, close, and write callbacks.
Review URL: https://codereview.chromium.org//11442024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15807 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 21:56:31 +00:00
regis@google.com 91ad9a0180 Remove support for interfaces.
For now, disable tests using obsolete syntax.
Tests disabled in this cl and in previous ones removing default factory classes
will either be deleted or updated in a later cl.
Review URL: https://codereview.chromium.org//11411271

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15562 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 01:26:31 +00:00
asiva@google.com 9d41d29b1a Fix StringBase_createFromCodePoints to correctly accept Latin-1 characters
as one_byte_string.

Rename Dart_NewExternalUTF8String to Dart_NewExternalLatin1String, this reflects
the functionality correctly.
Review URL: https://codereview.chromium.org//11280241

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15554 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 23:43:47 +00:00
regis@google.com 7e9531a1d2 Remove support for default factory classes.
For now, disable tests using obsolete syntax. More will get disabled as support
for interfaces is completely removed. We may then permanently remove some tests,
while updating and reenabling others whose purpose is not related to interfaces.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15480 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 23:39:27 +00:00
tball@google.com bf5f0db5d0 Added support for isolate unhandled exceptions.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15352 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 23:31:47 +00:00
cshapiro@google.com 979571d3ee Use a signed 32-bit integer for representing code points.
Review URL: https://codereview.chromium.org//11419086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15188 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 00:30:27 +00:00
asiva@google.com e1adedb421 Revert OneByteString back to ISO Latin-1 instead of ASCII
as webkit supports ISO Latin-1 and UTF-16 encodings for strings.
Review URL: https://codereview.chromium.org//11365243

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14989 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 00:13:18 +00:00
asiva@google.com 271a1f96ae - Add functionality to morph a string into an external string
- Add Dart API call Dart_MakeExternalString
Review URL: https://codereview.chromium.org//11360114

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14978 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 21:37:26 +00:00
sgjesse@google.com cde0bb06dd Add support for non ASCII strings when communicating with native ports
The string representation in a Dart_CObject strructure is now
UTF8. All strings read are now converted to UTF8 from either ASCII or
UTF16 serialization. All strings posted should be valid UTF8 and are
serialized as either ASCII or UTF16 depending on the content.

Proper andling of surrogate pairs is missing, but will be added when
https://codereview.chromium.org/11368138/ lands.

R=ager@google.com, erikcorry@google.com, asiva@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14887 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 13:01:57 +00:00
asiva@google.com ab2cf23a19 Fix length computation in Dart_StringToUTF8.
Review URL: https://codereview.chromium.org//11275107

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14588 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 19:07:43 +00:00
sgjesse@google.com a248c61b14 New APIs for external byte arrays
The following APIs have been added:

Dart_IsExternalByteArray: Check whether an object is an external byte
array.

Dart_ExternalByteArrayGetData: Return the pointer to the external data
hosted by the external byte array.

R=cshapiro@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14380 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 07:53:33 +00:00
cshapiro@google.com 35ef297dc7 Remove extra vertical white space.
Review URL: https://codereview.chromium.org//11360023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14379 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 01:18:55 +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 2d74d2b6d0 Introduce VM API for the patching mechanism.
This will be used to use patching for the dart:io library.

R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14121 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-26 08:00:05 +00:00
asiva@google.com 6b07453dd6 - Remove deprecated Dart API calls Dart_ClosureSmrck and DartClosureSetSmrck
- Remove the smrck field from RawClosure object.
Review URL: https://codereview.chromium.org//11017069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13559 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 17:08:30 +00:00
fschneider@google.com 5113b2411a Remove support for generating visualizer format file for the flowgraph.
Review URL: https://codereview.chromium.org//11099061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13536 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 12:25:55 +00:00
iposva@google.com bc26800a4f - Generate a version string based on the VERSION file.
- Add a Dart_VersionString to the API.
- Print version string when passing --version to the standalone binary.
Review URL: https://codereview.chromium.org//11086065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13514 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 07:17:09 +00:00
asiva@google.com ceed3e5beb - Add support to interrupt a running isolate with the following command:
<===  InterruptCmd = "{" RequestId "," command ":" interrupt "," params ":" "{" isolateId ":" Integer "}" "}"
===>  InterruptCmdResp = "{" RequestId "}"

- Send isolate events over to the debugger client in the following format:
===>  "{" event ":" isolate "," params ":" "{" reason ":" created "," id ":" Integer "}" "}"
===>  "{" event ":" isolate "," params ":" "{" reason ":" shutdown "," id ":" Integer "}" "}"
===>  "{" event ":" paused "," params ":" "{" reason ":" interrupted "," callFrames ":" StackTrace "}" "}"

- Added id ";" Integer, to params in all paused events messages

- create per isolate debugger message queues, instead of the global static one

- Add 'i' command in ddbg to exercise the interrupt feature

- Add support for handling isolave event messages in ddbg
Review URL: https://codereview.chromium.org//11028040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13333 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 23:10:28 +00:00
asiva@google.com 6076250adb 1. Create a port when a debugger object is created for an isolate, use this
port as the unique ID to represent an isolate in the debugger message
   format.

2. Switch the Event handler API to use an isolate id instead of the isolate
   object itself.

3. Add a unit test case for isolate debugger event handling with an
   interrupt of isolate to ensure that interrupting the isolate runs
   the interrupt event handler.
Review URL: https://codereview.chromium.org//11052006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13207 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:13:37 +00:00
asiva@google.com 27e1b05914 Add isolate event handler setup in order to be able to propagate isolate
events (create/shutdown/interrupted)
Review URL: https://codereview.chromium.org//11026011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13130 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 18:09:55 +00:00
cshapiro@google.com 40604757dc Lazy peer API.
This change provides getters and setters for a lazily allocated field
associated with every heap allocated object.  It is a generalization
of the peer field of external string instances, external byte array
instances, and the smrck field of closure instances.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12511 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 21:15:46 +00:00
turnidge@google.com a28d475ff3 Implement more of the mirrors library, primarily stuff to do with types.
Highlights:

- Implement FunctionClassMirror, used to reflect on the class of
  function objects.

- Implement TypeVariableMirror, used to reflect on type variables.

- Implement TypedefMirror, used to reflect on typedefs.

- Implement returnType for MethodMirror

- Implement type for VariableMirror/ParameterMirror

- Added supporting functions to the dart embedding api:
  - Dart_ClassIsTypedef
  - Dart_ClassGetTypedefReferent
  - Dart_ClassIsFunctionClass
  - Dart_ClassGetFunctionClassSignature
  - Dart_FunctionReturnType
  - Dart_FunctionParameterType
  - Dart_VariableType
  - Dart_GetTypeVariableNames
  - Dart_LookupTypeVariable
  - Dart_IsTypeVariable
  - Dart_TypeVariableOwner
  - Dart_TypeVariableUpperBound

Other stuff:

- Fixed bug in Function::NumberOfImplicitParameters for signature
  functions.

- Chnaged the default upper bound for type variables to Object from
  Dynamic.  Discussed this with Gilad and Regis.

- Fixed some smaller problems in mirrors_impl.dart.
Review URL: https://chromiumcodereview.appspot.com//10916252

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12342 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 17:47:25 +00:00
devoncarew@google.com fdae229dcc Fix for http://code.google.com/p/dart/issues/detail?id=5085 - break-on-exceptions in the debugger can recurse.
This CL turns off the break-on-exceptions behavior when evaluating Dart code in the debugger (in particular, the toString() method).
Review URL: https://chromiumcodereview.appspot.com//10928149

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12275 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 18:01:50 +00:00
asiva@google.com 9ed2e66130 Get rid of support for string interpolation in #import strings.
Review URL: https://chromiumcodereview.appspot.com//10911025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11698 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 16:55:03 +00:00
ager@google.com 2ad46b61fe Beginning support for library prefixes in the dart API.
This is a request for comments. Do we want to expose library
prefixes like this? Is there a way to import with a prefix already
and lookup members?

The reason why I would like to do this is so that I can import the
user-supplied builtins library under a prefix. This will be a useful
first step to move the print function to corelib while preserving
the ability to patch in a print implementation via the builtins
library.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11494 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 08:35:43 +00:00
ager@google.com d6fde19b9d Revert "Start adding TLS (SSL) sockets to dart:io."
Revert "Add stub for TlsSocket to dart2js library."

R=whesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10700 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 05:50:35 +00:00
whesse@google.com 5c55f1dd28 Start adding TLS (SSL) sockets to dart:io.
Add Linux implementation for SSL client sockets.

BUG=dart:3950
TEST=standalone/io/tls_socket_test

Committed: https://code.google.com/p/dart/source/detail?r=10565
Reverted: r=10567

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10650 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 14:34:02 +00:00
whesse@google.com e46ed16ce1 Revert "Start adding TLS (SSL) sockets to dart:io."
This reverts commit 10565.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10567 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 12:31:36 +00:00
whesse@google.com 7ad7023d79 Start adding TLS (SSL) sockets to dart:io.
Add Linux implementation for SSL client sockets.

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10565 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 12:22:03 +00:00
turnidge@google.com 6e19e3c4cb Two edits based on feedback from whesse:
1. Simplify the ThrowException test to make it less confusing.

2. Provide better documentation for Dart_ThrowException and
Dart_PropagateError.
Review URL: https://chromiumcodereview.appspot.com//10823189

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10346 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 18:01:46 +00:00
kmillikin@google.com 70bd677417 Reapply "Use platform-independent format specifiers when disassembling code objects."
This reapplies svn revision 10163 with a (tested) fix for Windows.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10282 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 10:50:38 +00:00
rmacnak@google.com a3468803c5 Made it possible to distinguish between a method or top-level function and the
function for a closure defined in such. Addresses issue 4337.
Review URL: https://chromiumcodereview.appspot.com//10831165

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10266 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:56:21 +00:00
kmillikin@google.com effc29cd25 Revert "Use platform-independent format specifiers when disassembling code objects."
This is still broken on Windows.

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10175 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:52:05 +00:00
kmillikin@google.com b73d4d2af2 Reapply "Use platform-independent format specifiers when disassembling code objects."
This reapplies svn revision 10163 with a fix for Windows.

R=ager@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10174 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:45:00 +00:00
kmillikin@google.com 20083dfd85 Revert "Use platform-independent format specifiers when disassembling code objects."
Revert svn revision 10163 while working on a Windows fix.

R=ager@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10169 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:51:23 +00:00
kmillikin@google.com 9acfb0e622 Fix windows build.
TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10165 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:34:18 +00:00
kmillikin@google.com 515f92ea3f Use platform-independent format specifiers when disassembling code objects.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10163 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:19:28 +00:00
nweiz@google.com 637f6fe616 Fix the definition of kIllegalPort in dart_api.h.
Declaring a variable directly in a header will cause C to be unable to link
multiple object files that both include that header, even if that variable is
const.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10135 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:47:33 +00:00
rmacnak@google.com 407f371e3b Added Dart_FunctionEnclosingClassOrLibrary.
Review URL: https://chromiumcodereview.appspot.com//10834096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10096 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 22:47:52 +00:00
cshapiro@google.com 772a399cab Emit symbol maps for compiled code for use by the Linux perf tool.
Review URL: https://chromiumcodereview.appspot.com//10831005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9922 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 00:21:25 +00:00
rmacnak@google.com 99ad7f4170 Added ClosureMirror to dart:mirrors. Added Dart_ClosureFunction to the
embedding API. ClosureMirrors currently implement answering the closure's
function and applying the closure.
Review URL: https://chromiumcodereview.appspot.com//10800065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9860 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:59:12 +00:00
hausner@google.com 67191621a4 Debugger API to enable/disable debugging of libraries
Review URL: https://chromiumcodereview.appspot.com//10797033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9772 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 22:51:09 +00:00
rmacnak@google.com 3d1c598ed5 Add a limited version of ParameterMirrors that can only tell whether they are
optional. Add Dart_FunctionParameterCounts. Drop passing isSimpleValue to
instance mirrors: they can compute this on the Dart-side.
Review URL: https://chromiumcodereview.appspot.com//10778005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9683 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-16 22:05:16 +00:00
rmacnak@google.com 3cc8d2e0a0 Added a comment for Dart_LoadSource.
Review URL: https://chromiumcodereview.appspot.com//10694163

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9606 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 19:21:08 +00:00
turnidge@google.com 22fb45f640 Implement method and variable reflection in dart:mirrors.
Review URL: https://chromiumcodereview.appspot.com//10687004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9493 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 23:57:08 +00:00
ager@google.com 52230ca22b Support posting of external data into dart as external uint8 arrays through the Dart API.
The native ports use the snapshot reader to create the dart objects. Added support for reading external arrays from snapshots but no support for writing them. The only way an external array is written to a snapshot is through the api message writer.

This allows dart:io to avoid one copy of data read from files and sockets. This change only contains one use of the new API.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9281 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 07:22:32 +00:00
turnidge@google.com a45c6255ba Add Dart_CurrentIsolateData().
Review URL: https://chromiumcodereview.appspot.com//10690027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9228 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 21:28:12 +00:00
turnidge@google.com 3f940819a7 Add a callback to inform embedders when an isolate is being shut down.
Review URL: https://chromiumcodereview.appspot.com//10450016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9211 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-28 18:15:17 +00:00
hausner@google.com fbeaabda52 Debugger support to display global variables
- Add library id to ActivationFrame
- Add debugger function to get all global variables visible in
  a library (including imported variables).
- Add LibraryPrefixIterator
- Fix Dart_GetLibraryImports
Review URL: https://chromiumcodereview.appspot.com//10657048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9121 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:32:34 +00:00