asiva@google.com
02049c689e
Fix for issue 7089 (Symbols::New was not quite working correctly
...
when there are non ASCII Latin-1 characters in the string).
Review URL: https://codereview.chromium.org//11411341
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15711 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 22:18:12 +00:00
asiva@google.com
311e4c8c19
Partial cleanup towards fixing Issue 6726
...
(try to add all constants strings in the VM to the symbols list).
Review URL: https://codereview.chromium.org//11419261
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15618 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-01 00:34:19 +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
asiva@google.com
a76bd61fcb
When externalizing a string ensure that the basic tag bits are preserved.
...
Also make sure we do not try to externalize read only strings that are in
the VM isolate.
Review URL: https://codereview.chromium.org//11411204
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15553 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 23:19:17 +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
iposva@google.com
3d61f5d16a
Fix bug 6467:
...
- Do not attempt to Dart_ExitScope if no scope exists.
- Print more informative message if Dart_Initialization fails.
Review URL: https://codereview.chromium.org//11308166
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15242 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 07:54:21 +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
erikcorry@google.com
84da84c22d
Revert "Add some support for the code-point code-unit distinction."
...
This reverts commit r15150
R=karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//11411092
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15152 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:23:41 +00:00
erikcorry@google.com
547cbf9da6
Add some support for the code-point code-unit distinction.
...
Adds String.fromCodeUnits and String.codeUnitAt, and modifies
String.fromCodePoints and String.codePointAt to actually use code points.
Fixes String.charCodes to use code points and adds String.codeUnits.
Reenables some tests, and adds new ones for non-BMP characters.
Fixes issues 6418, 6501 and 1357.
R=floitsch@google.com
BUG=
Review URL: https://codereview.chromium.org//11368138
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15150 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 14:51:25 +00:00
regis@google.com
01a31275bd
Make creation of list literal more resilient to changes in the underlying
...
dart implementation of List in the core library.
Do the same for map literal creation.
Review URL: https://codereview.chromium.org//11299020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14997 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 01:31:15 +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
ager@google.com
7d834933c3
Don't copy Int8Arrays when passing them in as lists of bytes and don't
...
call from C to Dart to get the values either.
Just copying the values over as is will behave the same as it does
now and will be a lot faster.
R=sgjesse@google.com
BUG=
Review URL: https://codereview.chromium.org//11418004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14951 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 11:03:02 +00:00
sgjesse@google.com
a64fd270bd
Address comments to r14887
...
TBR=iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//11308031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14943 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 08:16:27 +00:00
hausner@google.com
7eb3efc2ba
Fix native argument handling
...
Native functions need to fetch arguments differently if they are
called through a closure.
fixes issue 6696.
Review URL: https://codereview.chromium.org//11293290
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14937 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 01:14:01 +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
iposva@google.com
0c6ff657ed
- Do not mix scalar values and object fields in RawInstance to
...
simplify the traversal for GC. Classes with native fields
have a hidden reference to a typed array containing the
native fields.
Review URL: https://codereview.chromium.org//11312183
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14821 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 23:21:04 +00:00
regis@google.com
d372a816bb
Pass closure object as first implicit argument to closure functions.
...
Remove code passing captured receiver to native instance closures; instead,
access captured receiver in context, as non-native functions do.
Review URL: https://codereview.chromium.org//11360116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14698 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 18:28:07 +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
tball@google.com
209499c17f
Merged String subclasses into String.
...
Merged String subclasses (OneByteString, etc.) into String, keeping
their raw types. This allows String handles to continue to point
to a String after its raw type is changed, such as to make its data
external.
BUG=
Review URL: https://codereview.chromium.org//11367044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14545 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 22:22:19 +00:00
srdjan@google.com
081e765eb5
Fix issue 6288, move DeoptimizeAll to top level parsing. Allow optimizing compiler to optimize even when ooptimzied code is active.
...
Review URL: https://codereview.chromium.org//11293038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14422 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 18:10:30 +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
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
iposva@google.com
5473080454
- Remove a couple static_cast and make them safe, by checking
...
the handle types.
- Ensure that the obj handle does not survive past the zone unwind.
Review URL: https://codereview.chromium.org//11188070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13803 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-18 22:33:45 +00:00
tball@google.com
058a5a10ba
Removed StackZone allocation from DARTSCOPE macro, added StackZones in the few places they were still needed.
...
BUG=
Review URL: https://codereview.chromium.org//11185015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13751 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 18:06:26 +00:00
tball@google.com
2cd8436c5a
Changed StackZone and ApiZone to be containers for Zone.
...
BUG=
Review URL: https://codereview.chromium.org//11028145
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13707 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 22:05:40 +00:00
hausner@google.com
1811a6b913
Support for type dynamic in VM
...
Old name Dynamic is supported, and automatically converted to
lower-case dynamic when parsed.
VM flag --warn_legacy_dynamic prints warnings when Dynamic
is found.
Review URL: https://codereview.chromium.org//11125005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13637 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-12 22:40:24 +00:00
asiva@google.com
1bf642129d
- Get rid of RawClosure class and use RawInstance for closures.
...
- Simplify SetRaw to not require an access to the Current Isolate.
Review URL: https://codereview.chromium.org//11087070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13581 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-11 20:34:08 +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
cshapiro@google.com
5e5049047e
Add missing scope initializations.
...
Review URL: https://codereview.chromium.org//11017064
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13506 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-10 23:36:13 +00:00
srdjan@google.com
e01b80da2c
Report error in APIs if type is malformed instead of crashing. Example:
...
Dart_FunctionReturnType: malformed type encountered: 'file:///sources/dartall/dart/pkg/intl/lib/intl.dart': Error: line 235 pos 10: cannot resolve class name 'dynamic' from 'Intl'
Review URL: https://codereview.chromium.org//11099049
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13500 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-10 20:54:49 +00:00
ager@google.com
abee5139e5
Reapply change to hide VM-only List implementation classes.
...
The performance issue was that I had not updated the method
recognizer.
BUG=
Review URL: https://codereview.chromium.org//10990083
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13003 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-28 11:08:38 +00:00
ager@google.com
fe66a0af1a
Revert hiding of VM-only coreimpl list implementation types. While I
...
investigate performance regression (even after fixing constructors
in the intrinsifier).
R=iposva@google.com ,srdjan@google.com ,fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//11000025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12963 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 14:07:56 +00:00
ager@google.com
8e6a2c8345
Hide VM-only coreimpl List implementation types. These should not be
...
exposed as visible parts of coreimpl.
Review URL: https://codereview.chromium.org//10990055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12952 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 12:37:30 +00:00
hausner@google.com
201bce4219
Support for show/hide combinators
...
- Add a new VM object called a Namespace.
- A Namespace is a library, and two list of names to hide/show.
- Convert Library and LibraryPrefix to contain Namespace
objects instead of Libraries in their import list.
Review URL: https://codereview.chromium.org//10967052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12804 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 20:46:56 +00:00
cshapiro@google.com
69e1aefb72
Constraint List length values to the Smi type.
...
This change also makes the fast path and slow path cases in some integer
handling functions explicit. Values are asserted not to be a Smi in the
slow path as they should have been picked off in the fast path.
BUG=https://code.google.com/p/dart/issues/detail?id=1750
Review URL: https://codereview.chromium.org//10941018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12527 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 01:11:37 +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
regis@google.com
e860f819a0
Limit the maximum number of formal parameters (32K fixed and 32K optional)
...
in order to save space in function objects.
Naming cleanup.
Review URL: https://codereview.chromium.org//10928160
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12288 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 23:35:05 +00:00
srdjan@google.com
67871d3098
Finish implementing lazy deoptimization (ia32, x64). Ran tests with --deoptimize-alot.
...
Review URL: https://chromiumcodereview.appspot.com//10912146
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12093 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-09 15:00:51 +00:00
regis@google.com
7cc84c2892
Implement new optional parameters syntax in the vm (issue 4290).
...
Provide --reject_named_argument_as_positional flag to ease transition to new
syntax (default is false).
Add tests.
Review URL: https://chromiumcodereview.appspot.com//10910119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12004 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 01:13:27 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
turnidge@google.com
4e7971f61e
The forward declaration of Dart_SetReturnValue in native_arguments.h
...
was causing the function to appear to be ambiguous on windows due to
the DART_EXTERN_C annotation. Refactor the code so that a different
function is forward-declared in order to fix the build.
Another fix would have been to prefix all calls to Dart_SetReturnValue
by :: in lib/mirrors.cc, but that looks ugly.
Review URL: https://chromiumcodereview.appspot.com//10919039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11719 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 20:12:21 +00:00
turnidge@google.com
55c13e1994
Use SetReturnUnsafe in dart_api_impl.cc.
...
Before (median of 5):
UseDartApi(RunTime): 384366
After (median of 5);
UseDartApi(RunTime): 313525
Review URL: https://chromiumcodereview.appspot.com//10907012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11717 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 19:59:37 +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