on the dartium usage pattern:
- Dart_GetNativeStringArgument (gets a String object, peer etc. directly from
the native arguments)
- Dart_SetWeakHandleReturnValue (allows a weak handle to be passed to the
return value, this ensures a new local handle does not have to be created
from a weak handle just to return a value)
- Dart_StringGetProperties (gets some common properties of a string, avoids
multiple API calls to set up a native string)
R=srdjan@google.com, vsm@google.com
Review URL: https://codereview.chromium.org//22632010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26046 260f80e4-7a28-3924-810f-c04153c831b5
which combines Dart_GetNativeArgument and Dart_GetNativeInstanceField
Dartium always gets the receiver by first getting the NativeArgument
corresponding to 0 using Dart_GetNativeArgument and then invokes
Dart_GetNativeInstanceField on the returned handle to get the native
field corresponding to the native DOM element.
When Dartium is changed to use this combined API call the numbers for a
sample Dromaeo-drt benchmark is as follows:
Dromaeo-drt getAttribute runs-per-second 653.0
Dromaeo-drt element_property_access runs-per-second 579.0
Dromaeo-drt setAttribute runs-per-second 396.0
Dromaeo-drt element_property_assignment runs-per-second 539.0
When the old API calls are used:
Dromaeo-drt getAttribute runs-per-second 596.0
Dromaeo-drt element_property_access runs-per-second 528.0
Dromaeo-drt setAttribute runs-per-second 385.0
Dromaeo-drt element_property_assignment runs-per-second 513.49
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19563005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25354 260f80e4-7a28-3924-810f-c04153c831b5
This change allows us to allocate Dart objects from C++ without
invoking a constructor. In turn, it allows us to declare Dartium DOM
types with no public generative constructor.
Note, the current constructor has to be public as dart:html Element is
subclassed by dart:svg SvgElement (and eventually by user defined
custom elements as well). This leads to unfortunate holes such as: https://code.google.com/p/dart/issues/detail?id=11277
This should also give a modest boost in DOM perf as the existing
constructor does absolutely nothing.
BUG=11277
R=asiva@google.com
Review URL: https://codereview.chromium.org//16968006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24189 260f80e4-7a28-3924-810f-c04153c831b5
- 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
- Adding token number in text location data. Line number will be
removed when the editor knows how to convert a token number to its
line number.
- "location" field in stack frames is now optional. If it is not present, there
is no corresponding textual location for the code location.
- Add location info of "paused" and "interrupted" events.
Stack trace will go away in these events.
Review URL: https://codereview.chromium.org//13144018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20816 260f80e4-7a28-3924-810f-c04153c831b5
- 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
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
- 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