Commit Graph

266 Commits

Author SHA1 Message Date
asiva@google.com a7b617c5d4 Provide implementations for
Dart_ScalarListAcquireData & Dart_ScalarListReleaseData
Review URL: https://codereview.chromium.org//12209075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18330 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 19:48:32 +00:00
regis@google.com feb7329e2f Resubmitting r18013.
Review URL: https://codereview.chromium.org//12084120

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18018 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 00:18:37 +00:00
regis@google.com 450bf7c06c Revert r18013 failing on Windows.
Review URL: https://codereview.chromium.org//12169002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18015 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 23:58:53 +00:00
regis@google.com c651283897 Cleanup api for isolate state checking.
This should avoid the breakage on Windows observed by reverted r17962.
Review URL: https://codereview.chromium.org//12082126

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18013 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 23:43:33 +00:00
asiva@google.com c64871d699 First set of changes towards cleaning up the bytearray access APIs
- Added unimplemented versions of Dart_ByteArrayAcquireData and
  Dart_ByteArrayReleaseData
- Added infrastructure to prevent callbacks into an API function that
  allocates a new object on the Dart heap or invokes dart code.
- Removed the old Dart_ByteArrayGet* access functions as it was felt that
  they have become redundant once we provide direct access to the internal
  data pointers.
- Removed DARTSCOPE_NOCHECKS as it seems to be redundant after the change
  to not create explicit stack zones on each Dart API call.
Review URL: https://codereview.chromium.org//12036098

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17958 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 23:56:48 +00:00
asiva@google.com f644dfc14e Fix for issue-7157 - set the stack marker in the top API local scope just before entering dart code. It used to be set in Dart_EnterScope and this was causing problems as the marker could potentially end up being lower than the stack pointer at the time of entering Dart code resulting in an destruction of the top scope during 'state->UnwindScopes(...)'
Review URL: https://codereview.chromium.org//12118002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17939 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 19:16:47 +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
ager@google.com 6c6e8f4f4e Change a couple of API functions to return unhandled exception errors instead of fatal errors on immutable array (by calling into dart code for immutable arrays).
Add regression tests.

We should look at all the API errors returned from the API and
figure out if they should actually be fatal errors or just
exceptions.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17750 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 10:15:50 +00:00
asiva@google.com f4fe42c280 Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
asiva@google.com 8579ac9bb5 Allow externalization of canonical strings also. Only restrict canonical strings
in the VM isolate heap.
Review URL: https://codereview.chromium.org//11969029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17437 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 05:57:29 +00:00
srdjan@google.com d1c4735609 Transition ^= to |=
Review URL: https://codereview.chromium.org//11867022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17309 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:53:17 +00:00
vegorov@google.com a77fc9701c When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C.
This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17261 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 11:54:45 +00:00
srdjan@google.com 37a715bbbf Lookup functions by name that contains the private key, except for dart_api which allows ignoring the private key.
Review URL: https://codereview.chromium.org//11968022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17178 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 00:42:03 +00:00
srdjan@google.com 843e48f6f0 Add Dart class for _ExternalUint8ClampedArray and API to allocate it.
Review URL: https://codereview.chromium.org//11881031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17040 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-15 01:14:17 +00:00
hausner@google.com 7e70aaddf7 Support for embedded Dart scripts
Add a line and column offset to scripts so that errors and exceptions
in embedded Dart scripts are reported at the proper location.
New API call Dart_LoadEmbeddedScript() that allows to specify
line and column offsets.

Stumbled on and fixed a bug. Script::kind field was not externalized to snapshot.
Review URL: https://codereview.chromium.org//11824067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16934 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 21:47:09 +00:00
asiva@google.com 7022b39e35 Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
meh@google.com 432978367e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction.
Move Pprof logic to the OS abstraction.
Remove pprof from VM tests because now pprof logic is in the VM itself.
Add DISALLOW and AllStatic to Code Observers where appropriate.

Previous review: https://codereview.chromium.org/11572032/

BUG=7321

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16462 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-22 00:23:25 +00:00
meh@google.com ef737f105d Revert "Clean up CodeObservers"
This reverts commit 43e5ada2fba69c7d5c009b5bf70a234f12941617.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16446 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:45:36 +00:00
meh@google.com 6fbf9f1c2e Clean up CodeObservers
Move CodeObserver registration to the OS abstraction
Move Pprof logic to the OS abstraction
Add DISALLOW and AllStatic to Code Observers where appropriate

BUG=7321

Committed: https://code.google.com/p/dart/source/detail?r=16273

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16445 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 17:37:59 +00:00
asiva@google.com 7ea520f10f Create read only handles for empty_array and sentinel objects
(trying out a basic framework and will extend it to others once this
works).
Review URL: https://codereview.chromium.org//11648006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16416 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 02:33:05 +00:00
asiva@google.com 2c6de68680 Changed the API in DartEntry for invoking dart code from C++ to make it more compatible with the requirements of the runtime.
Deleted all the code duplication that was added to circumvent the old DartEntry API requirements.
Review URL: https://codereview.chromium.org//11613009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16288 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 21:36:01 +00:00
regis@google.com 849585ef7c Implement Function.apply in vm (issue 5670).
Fix a closure parameter count check bug (unveiled by an apply test).
Review URL: https://codereview.chromium.org//11564029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16175 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-14 19:04:01 +00:00
asiva@google.com e2e6ae3437 Fix windows build.
Review URL: https://codereview.chromium.org//11566025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16152 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-14 07:17:27 +00:00
asiva@google.com d3dcb3a952 Fix build break.
Review URL: https://codereview.chromium.org//11565028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16150 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-14 06:59:26 +00:00
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
meh@google.com 1125aff405 Move generate_perf_events_symbols flag to VM (new issue with @google address)
Changes reviewed and approved here:
https://chromiumcodereview.appspot.com/11490026

Created a new issue using meh@google.com instead of meh@chromium.org so I can commit to trunk.

BUG=

Committed: https://code.google.com/p/dart/source/detail?r=16016

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16084 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-13 00:42:19 +00:00
meh@google.com c9271a657a Revert "Move generate_perf_events_symbols flag to VM (new issue with @google address)"
This reverts commit d4d38edbb889d186930c9346c867a0252f425e99.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16017 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 03:41:30 +00:00
meh@google.com 9067ec4d33 Move generate_perf_events_symbols flag to VM (new issue with @google address)
Changes reviewed and approved here:
https://chromiumcodereview.appspot.com/11490026

Created a new issue using meh@google.com instead of meh@chromium.org so I can commit to trunk.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16016 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 02:55:21 +00:00
asiva@google.com 6749a3be79 Add read only handles for the following predefined symbols
"=="
 "[]"
 "[]="
 "this"
and use them in the code.
Review URL: https://codereview.chromium.org//11519006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15942 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 01:20:02 +00:00
cshapiro@google.com a7675e8dd3 Provide a mechanism for dumping of heap profiles on predefined events.
Review URL: https://codereview.chromium.org//11478012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15940 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 00:50:31 +00:00
asiva@google.com d5f055b605 - Create frame work for adding read only handles for symbols in the VM isolate
- Make the symbol corresponding to "." use this frame work and change code
  which was creating a handle to use the read only handle instead.
  (Once we agree on this frame work we could create similar read only handles
   for the frequently used symbols)
Review URL: https://codereview.chromium.org//11469036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15920 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-10 18:24:34 +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
srdjan@google.com 93dd217564 Added Uint8ClampedList. COmpielr optimziations to follow in next CL.
Review URL: https://codereview.chromium.org//11437028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15806 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 21:53:51 +00:00
asiva@google.com 4d26d87a3a Issue - 7123
Rename
 String::New(const uint8_t latin1_array......) to String::FromLatin1
 String::New(const uint16_t utf16_array......) to String::FromUTF16
 String::New(const int32_t utf32_array.......) to String::FromUTF32
Review URL: https://codereview.chromium.org//11443005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15763 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 23:37:37 +00:00
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