Commit Graph

1132 Commits

Author SHA1 Message Date
asiva@google.com a323a9c9db The dart version of typeddata library has changed to be compatible with the dart2js implementation
(typeddata does not implement ByteBuffer anymore).
Added new Dart API functions to account for this change.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38351 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 22:08:07 +00:00
asiva@google.com a2d7a425c9 - Remove Dart_ReceivePortGetId, Dart_GetReceivePort and Dart_PostMessage.
- Change _EventHandler._sendData to use a sendport object instead of a
  receiveport object.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37827 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 17:46:26 +00:00
hausner@google.com 4090b57cd8 Defer marking libraries as ‘loaded’
Now that loading of libraries and library parts are loaded asynchronously and calls to Dart_LoadLibrary are serialized instead of nested, we must wait until the last load request is satisfied before marking libraries as ‘loaded’.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37824 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 17:11:09 +00:00
fschneider@google.com bd110db87a Use range information for optimizing integer boxing and fix bug in range analysis.
1. When the input to a BoxInteger operation is in smi-range, we can eliminate
the range check and just perform a smi-tag operation on the input.

2. There was a bug in checking for smi-overflow for range boundaries: Calling Smi::IsValid
with a int64_t argument resulted in silent truncation of the input and therefore a wrong result.

Compiling with -Wconversion would have caught this, but currently we cannot compile with this flag
because of too many broken places.

Instead, I removed Smi::IsValid64 and created one variant Smi::IsValid that is specialized for the
input type with a template parameter. This way calling Smi::IsValid is always safe and will never
 result in silent alteration of the input argument.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37657 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 13:41:48 +00:00
asiva@google.com 51d2a5d219 Fix build breakage.
Review URL: https://codereview.chromium.org//345973003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37569 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 21:20:30 +00:00
asiva@google.com 9a718b8235 Add a function Dart_AllocateWithNativeFields which allocates an object and sets the native fields in one call.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37568 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 21:08:33 +00:00
zra@google.com 1dc0e2331b Removes open arrays (e.g. data[0]) from raw objects.
Replaces them with data() methods as in RawArray.

R=asiva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37450 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 15:58:16 +00:00
hausner@google.com 6cc8cbc53b Adding embedder API function Dart_FinalizeLoading
Embedder must call Dart_FinalizeLoading when all outstanding
load requests are satisfied, to complete the deferred loading
futures.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37423 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 21:05:30 +00:00
rmacnak@google.com 7ce5c53f0b Pass around the current isolate in exception handling code.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37409 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 18:17:03 +00:00
johnmccutchan@google.com 03854e0e8c Make TypedList not implement ByteBuffer.
BUG=https://code.google.com/p/dart/issues/detail?id=10136
R=asiva@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37397 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 14:34:45 +00:00
koda@google.com 9098859cb0 Refactor creation of FinalizablePersistentHandle into proper factory.
This exposes an issue (19482) with the API and external size tracking.

BUG=dart:19482
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37381 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-16 23:55:34 +00:00
hausner@google.com 4eac05607f Lazy loading of deferred libraries
Defer reading of source code of deferred libraries until the
Dart code executes the loadLibrary() call.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37334 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 22:43:31 +00:00
vegorov@google.com 4e286b316f Split GuardField into GuardFieldType and GuardFieldLength instructions.
Record expected length offset that matches guarded_cid.

This greatly simplifies code generation and control flow inside these guards.

Fixes the bug that was causing unoptimized code to call into runtime even when guard did not fail.

Add --trace-field-guards flags to trace updates to the state of guarded fields' properties.

BUG=http://dartbug.com/19003
R=fschneider@google.com, johnmccutchan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36872 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 13:53:53 +00:00
rmacnak@google.com 443faa9700 Add accessors for Maps to the embedding API.
(To be used by Dartium.)

R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36840 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 21:49:28 +00:00
asiva@google.com de6a12ce6a - Add Dart_EmptyString to return the canonical empty string similar to how
Null, True and False are done
- Removed check for current isolate from Dart_Null, Dart_True, Dart_False,
  Dart_EmptyString as these are returning singleton objects.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36823 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-30 17:33:15 +00:00
fschneider@google.com 9ba867f748 Add fast path to ListGetAsBytes for byte-size ExternalTypedData.
This speeds up deserializing snapshots which come in as ExternalUint8Array.

This API function should be generalized to be fast for all built-in array
types in a future CL.

R=ajohnsen@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36671 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 13:05:56 +00:00
johnmccutchan@google.com b3f2fb14d0 Reduce CPU usage when no isolates need to be profiled (e.g. when an isolate calls readLineSync or sleep the isolate owns the thread but is blocked).
This CL does the following:

- Introduces two new API entry points: Dart_IsolateBlocked and Dart_IsolateUnblocked.
- The thread interrupter thread goes into a deep sleep if no isolates need to be profiled (not scheduled on a thread or are in a blocking call).
- When an isolate unblocks, the thread interrupter thread resumes regular interrupts.
- dart:io readLineSync and sleep mark that they are making a blocking call.

This fixes https://code.google.com/p/dart/issues/detail?id=18126 reducing CPU usage to 0% when waiting for stdin or sleeping.

R=ajohnsen@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36632 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-26 11:53:49 +00:00
hausner@google.com c6101ca4b5 First step towards asynchronous loading of sources. With this change, sources are read asynchronously in dart code (builtin.dart) and when the i/o future completes, a callback in the VM loads and compiles the script or library code.
In a next step, the i/o will be moved to the service isolate so that not all isolates have to import dart:io.

Fallout from this change:
1) Loading has become a tad slower. Will have to investigate why.

2) Errors that happen during loading (file not found, compilation error in an imported library)  are no longer reported at the offending import clause. This can be fixed later if necessary by passing the import clause source location to the library tag handler.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36575 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-23 17:43:14 +00:00
asiva@google.com d5fbbd593a Add a new API function to extract all the native arguments into an array
passed in by the caller.

This call can be used in DOM bindings patterns as follows:
Old code -

Dart_Handle exception = 0;
{
        WebGL* receiver = DartDOMWrapper::receiver< WebGL >(args);
        unsigned srcRGB = DartUtilities::dartToUnsigned(args, 1, exception);
        if (exception)
            goto fail;
        unsigned dstRGB = DartUtilities::dartToUnsigned(args, 2, exception);
        if (exception)
            goto fail;
        unsigned srcAlpha = DartUtilities::dartToUnsigned(args, 3, exception);
        if (exception)
            goto fail;
        unsigned dstAlpha = DartUtilities::dartToUnsigned(args, 4, exception);
        if (exception)
            goto fail;
        receiver->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
        return;
}
fail:
    Dart_ThrowException(exception);
    ASSERT_NOT_REACHED();


Proposed new code -

/**
 * One time initialization code for setting up argument descriptors
 */
const int kNumArgs = 5;
const int kNumNativeFields = 2;
static const uint8_t native_arg_descriptor[kNumArgs] = {
  DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kNativeFields, 0),
  DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kUint32, 1),
  DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kUint32, 2),
  DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kUint32, 3),
  DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kUint32, 4),
};
Dart_NativeArgument_Value native_args[kNumArgs];
intptr_t native_fields[kNumNativeFields];
native_args[0].as_native_fields.num_fields = kNumNativeFields;
native_args[0].as_native_fields.values = native_fields;

/**
 * Code executed for each invocation of the binding method
 */
Dart_Handle result = Dart_GetNativeArguments(args, kNumArgs, native_arg_descriptor, native_args);
if (Dart_IsError(result)) {
    Dart_ThrowException(result);
}
WebGL* receiver = DartDOMWrapper::receiver< WebGL >(native_args[0].as_native_fields.values);
unsigned srcRGB = native_args[1].as_uint32;
unsigned dstRGB = native_args[2].as_uint32;
unsigned srcAlpha = native_args[3].as_uint32;
unsigned dstAlpha = native_args[4].as_uint32;
receiver->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
return;

R=iposva@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36464 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 00:08:23 +00:00
turnidge@google.com 78f3f14635 Add pause/resume for isolates in vmservice/observatory.
Improve the isolate view and isolate summary.

Details:

- Rig DbgMsgQueueList so it can run even when the debugger hasn't started.

- Add <action-link> element for pause/resume actions.

- Introduce new flex-percentile css classes.

- Add <isolate-run-state>, <isolate-location>, <isolate-shared-summary>, and <isolate-counter-chart> elements.  Counters are now displayed as a pie chart instead of as text.

- Reorg <isolate-view> and <isolate-summary> substantially.

- Add shared style sheet to <script-view>.

- Combine pause-on-start/pause-on-exit with other debugger pause events and present a consistent representation for these in the vm service.  Reorg how pause events are shown in <isolate-run-state>.

- Give the user a nicer message when an isolate is still loading.

- Move the /resume command to /debug/resume.  Implement this with a bool in the Isolate class which is used to smuggle resume requests from the vm service to the dart embedding api.

- Add the /debug/pause command to the vm service

- Break the DebuggerEvent struct out into its own top-level class.  Add JSON printing.

etc.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36366 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-20 17:09:08 +00:00
asiva@google.com b6aca37c63 Ensure that the class is finalized before marking class as having
nullable fields.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36339 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-19 23:48:01 +00:00
rmacnak@google.com 92996516ed Add Dart_IdentityHash to the embedding API.
(For use in ScriptObjectTraits.)

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35750 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 17:32:21 +00:00
iposva@google.com fd8565b071 - Add a minimal implementation of Capability.
- Make RawReceivePort and SendPort VM internal objects.
- Rationalize the creation of ports and their handling within the VM.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35325 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 19:44:03 +00:00
asiva@google.com 4eb6d5f7d8 Modify the Weak Reference Set creation API to make it easier to create
these sets in the GC Prologue code.

When this new API is not used in dartium:
  Without prolog callbacks in New  gen GC:
    dom-modify createElement runs-per-second 260.94890510948903
    dom-modify createTextNode runs-per-second 172.0

  With prolog callbacks in New  gen GC:
    dom-modify createElement runs-per-second 316.0
    dom-modify createTextNode runs-per-second 197.60479041916167


When this new API is used in dartium:
  Without prolog callbacks in New  gen GC:
    dom-modify createElement runs-per-second 310.0
    dom-modify createTextNode runs-per-second 174.4765702891326

  With prolog callbacks in New  gen GC:
    dom-modify createElement runs-per-second 416.0
    dom-modify createTextNode runs-per-second 241.75824175824175

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35215 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-21 18:31:15 +00:00
asiva@google.com a561e2bd17 1. Provide a framework to traverse persistent prolog weak handles.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35066 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-15 16:32:55 +00:00
johnmccutchan@google.com ef666553a1 Add runtime and native entry tags
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
asiva@google.com db11f77af7 Use ASSERT instead of CHECK_ISOLATE in cases where we derive the isolate from the native Arguments structure.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34488 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 23:05:57 +00:00
hausner@google.com ed24226376 Support deferred library prefix syntax
First step towards deferred library support:
- Parse the “deferred as” import clause.
- Implement p.loadLibrary() which returns a future that
  completes when the library is loaded.
- Treat type annotations of deferred types as malformed.
- Throw NoSuchMethodError when calling functions from
  unloaded libraries.
- Libraries are still read synchronously, but items in the
  library won’t be visible through the deferred prefix until
  the future returned by loadLibrary() completes.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34481 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 21:20:47 +00:00
iposva@google.com 0977a3bf2b - First step in refactoring ports with the goal of moving
them closer into the VM implementation.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34438 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 17:30:39 +00:00
asiva@google.com 8c2df33d13 Use a bit in the handle structure to indicate if it is a prologue weak handle instead of the tagging the address.
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34258 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 17:23:33 +00:00
asiva@google.com d302dc431a Auto delete persistent weak handles during finalization after invoking the callback associated with the weak handle.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34208 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 21:45:43 +00:00
asiva@google.com fafba0f6d9 Fix an incorrect usage of reusable handles in Dart_Allocate.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34184 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 17:07:45 +00:00
johnmccutchan@google.com 762b9a400c Set VMTag from stubs when transitioning between Dart and Native
R=asiva@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34065 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 21:26:07 +00:00
johnmccutchan@google.com 25146ce058 Basic tag infrastructure
BUG=
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33701 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 16:16:21 +00:00
iposva@google.com 021fca847c - Implement a PauseTimerScope so that we can properly exclude
times when a TimerScope is active.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33662 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 20:38:24 +00:00
asiva@google.com 76b153643c Remove Dart_AddGcPrologueCallback and Dart_RemoveGcPrologueCallback from the Dart API.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33657 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-13 18:10:06 +00:00
asiva@google.com a611f736e0 Remove the ability to allow multiple gc prologue and gc epilogue callbacks
to be registered at any given time. Dartium seems to use only one.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33622 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 22:39:15 +00:00
asiva@google.com 3f048502d4 Use CHECK_ISOLATE instead of DARTSCOPE for Dart_GetNativeInstanceField after
fixing Instance::IsValidFieldOffset to use a reusable handle instead of
creating a new one (this was the issue last time which caused assertions).

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33566 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-12 00:14:03 +00:00
asiva@google.com 4dce3eb30d Return error object from Dart_Allocate when an error occurs.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33559 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-11 22:07:22 +00:00
asiva@google.com 3af18cc4c0 1. Restructure reusable handles to make individual Scopes for each handle type
2. Add a convenience macro to make use of reusable handle scopes easier

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33471 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-08 00:26:29 +00:00
koda@google.com a69d028eb3 Track external allocated memory for weak persistent handles.
The amount of external allocation is tracked per generation
and informs GC policy.

BUG=dart:11471
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33467 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 23:53:32 +00:00
koda@google.com 87fbe42a46 Pretenure large external typed data and strings.
Also fix an incorrect API comment about handle return type.

BUG=dart:17284
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33344 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 21:09:19 +00:00
asiva@google.com e380b175f8 Pass in the isolate parameter to the weak persistent callback handler so that
there is no need to access the current isolate in the callback and delete
path (this code is run while a GC is in progress).

See https://codereview.chromium.org/185643003/ for corresponding changes
in dartium

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33282 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 18:11:19 +00:00
asiva@google.com 8e0129970c Use a tag bit for indicating prologue weak persistent handles, this avoids
the costly lookup to determine if a handle is a prologue weak persistent
handle or a regular weak persistent handle in Dart_DeleteWeakPersistentHandle

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33254 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 00:35:45 +00:00
asiva@google.com 3462e9a809 Fix dartium crasher, use DARTSCOPE when getting/setting native fields as it creates a Handle.
Review URL: https://codereview.chromium.org//180153009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33148 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 03:22:16 +00:00
asiva@google.com c059ba6f6d 1. Added new versions of Api::UnWrapStringHandle Api::UnWrapInstanceHandle to
use a reused handle instead of creating a new one
2. Use CHEK_ISOLATE instead of DARTSCOPE in some of the API functions where
   no handles are created

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33142 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-27 23:38:39 +00:00
fschneider@google.com 16857e0b13 Revert r32930 (Add more timing information in the VM to track time...)
It caused severe performance regressions that should be addressed.

TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32959 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 12:15:55 +00:00
asiva@google.com 6d313d3797 Add more timing information in the VM to track time spent is dart code Vs native code.
R=johnmccutchan@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32930 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 21:30:29 +00:00
asiva@google.com 04d7a5350f Add Dart_GetNativeFieldsOfArgument to get all the native fields of a dart
object. This is especially useful for dartium which has two native fields
the type id and the native implementation field for the wrapper. This allows
for both values to be extracted in one call.

R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32905 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-21 16:53:23 +00:00
iposva@google.com f2a6f1b4b6 Another round of cleanups for http://www.dartbug.com/15922
- Address warnings about 64-bit to 32-bit conversions.

R=ajohnsen@google.com, asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32831 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 23:35:55 +00:00