srdjan@google.com
154eb30f58
ONe more iteration of PcDesacriptor iterator imporvement: do not copy record but access individual values when needed.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//403643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38408 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 20:11:29 +00:00
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
aa86bbc562
Fix for issue 20045.
...
R=koda@google.com
Review URL: https://codereview.chromium.org//396803012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38341 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 19:34:29 +00:00
srdjan@google.com
1259bda234
Fix PcDescriptor iterator to never return a pointer to a memory location since the PcDescriptor can move with the GC.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//396213005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38338 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 18:30:38 +00:00
iposva@google.com
727648d0e5
- Properly setup an Api scope before calling out through the API.
...
R=vegorov@google.com
Review URL: https://codereview.chromium.org//394343003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38326 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 12:46:04 +00:00
koda@google.com
d2bfa8f0ec
Fix build (by outlining static double constant).
...
TBR=asiva@google.com
Review URL: https://codereview.chromium.org//395223003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38296 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 17:54:33 +00:00
koda@google.com
b51526fea3
Use new hash table template for compressing token streams.
...
Uses the flexible low-level interface to minimize lookups and allocation.
BUG=dart:13747
R=asiva@google.com
Review URL: https://codereview.chromium.org//398583003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38294 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 17:39:10 +00:00
fschneider@google.com
26470e8384
Avoid allocating an exception object in the snapshot reader.
...
The unhandled exception object needs only be allocated before
actually returning an error from the snapshot reader, and not
at each invocation of ReadObject.
R=asiva@google.com
Review URL: https://codereview.chromium.org//388963003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38280 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 11:49:45 +00:00
mlippautz@google.com
a97bafab93
vm/observatory: Clean up script access
...
Addresses issues from https://codereview.chromium.org/346003003/
BUG=
R=hausner@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//392933003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38264 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 22:55:19 +00:00
srdjan@google.com
611b665762
Attempt to fix llvm 4.2 compiler errors.
...
Review URL: https://codereview.chromium.org//395953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38247 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 18:07:39 +00:00
srdjan@google.com
9c8a395f6f
More PcDescriptor cleanups, compress recors if no try index is needed (frequent).
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//382993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38242 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 17:07:03 +00:00
lrn@google.com
f48e9cb218
Address comments on double-parse implementation from earlier CL.
...
Comments at https://codereview.chromium.org/368483004/#msg7
R=fschneider@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//381603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38224 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 08:25:12 +00:00
lrn@google.com
cf8ac68c0d
Make VM JSON parser parse doubles without doing substring.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//385163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38155 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 12:14:23 +00:00
rmacnak@google.com
0c7531c941
Implement Evaluate without creating temp classes by storing an eval function's script in the function's data field.
...
This means Evaluate doesn't burn through CIDs, mitigating the problem where class table entries are treated as strong references. More generally the whole tangle of objects created during eval is collectable, and running eval in a loop doesn't lead to heap growth.
http://dartbug.com/18284
R=hausner@google.com
Review URL: https://codereview.chromium.org//379353003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38140 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 23:23:01 +00:00
srdjan@google.com
4c69c06f27
Specify descriptor kind to iterate on.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//383523005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38128 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 19:44:49 +00:00
mlippautz@google.com
4544fe683b
Observatory: Promote function to ServiceObject
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//376293003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38105 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 21:32:09 +00:00
regis@google.com
f58908bfdd
Tweaks for speed in integer arithmetic runtime.
...
Unrelated:
Removed annoying svn property on utils.cc (indicated by MM):
svn propdel svn:eol-style runtime/platform/utils.cc
R=srdjan@google.com
Review URL: https://codereview.chromium.org//381543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38090 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 17:16:10 +00:00
srdjan@google.com
2bb77cd8d5
Iterate over PcDescriptors only via iterators, not via an index. (preparation for more compression of PcDescriptors).
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//356923006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38032 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:25:45 +00:00
fschneider@google.com
7f7b986ac7
Closure call inlining for constant closures.
...
Until now, constant closure functions (e.g. implicit static closures) were
not considered as inlining candidates. This CL enables inlining for them.
e.g. in code like
var f = math.max;
f();
the call to f will now be inlined.
I changed the source fingerprint computation for implicit closure functions
because the signature string of implicit closure functions is different
from the parent function's.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//372733003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38027 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 16:22:36 +00:00
mlippautz@google.com
f7e931bb7d
observatory: add class view based on end token position
...
vm: add method to compute end token positions
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//361743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37964 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 23:22:50 +00:00
hausner@google.com
5d720cad82
Fix assertion in Dartium loading
...
A library may be marked as “loaded with error” multiple times it it
consists of parts. Fix an assertion that caused some tests in Dartium
to fail.
Fixes issue 19758.
R=regis@google.com
Review URL: https://codereview.chromium.org//369573006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37958 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 22:09:29 +00:00
rmacnak@google.com
14fcffb2b6
Hide synthetic metadata field exposed in r35926.
...
Also remove Object::CreateInternalMetaData.
BUG=http://dartbug.com/19731
R=iposva@google.com , regis@google.com
Review URL: https://codereview.chromium.org//363473004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37900 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 20:09:09 +00:00
lrn@google.com
7a32a75dcc
Avoid unnecessary copying when parsing doubles.
...
R=sgjesse@google.com , vegorov@google.com
Review URL: https://codereview.chromium.org//368483004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37863 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 11:59:31 +00:00
koda@google.com
7dfd991f9f
Resubmit r37716: Hash tables templates, wrapping Array.
...
(Patch Set 1 is identical to r37716; Patch Set 2 renames some typedefs to avoid confusing MSVC)
Highly customizable to support various internal uses as well as the basis for user-level classes.
Use in Library's resolved names cache.
Next step is to add new instance classes for the user-level maps/sets (akin to GrowableObjectArray).
TBR=asiva@google.com
Review URL: https://codereview.chromium.org//348313005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37800 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 22:34:00 +00:00
mlippautz@google.com
f2db35a741
Coverage API supports proper filtering
...
(Partly) addressing concerns of https://codereview.chromium.org/346003003/
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//351373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37793 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 17:51:52 +00:00
koda@google.com
d3b9bc5d2e
Add Instance::HashCode that matches hashCode.
...
Implement in C++ for strings and integers.
This is in preparation for internalized hash maps/sets.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//358723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37763 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-26 21:53:05 +00:00
koda@google.com
486a4527a5
Revert r37716 due to Windows compilation errors.
...
TBR=asiva@google.com
Review URL: https://codereview.chromium.org//353553007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37719 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-26 01:45:48 +00:00
koda@google.com
5ef8d94639
Hash tables templates, wrapping Array.
...
Highly customizable to support various internal uses as well as the basis for user-level classes.
Use in Library's resolved names cache.
Next step is to add new instance classes for the user-level maps/sets (akin to GrowableObjectArray).
R=asiva@google.com
Review URL: https://codereview.chromium.org//304253002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37716 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-26 00:51:02 +00:00
rmacnak@google.com
f127126ff9
Don't add the catch frame at a rethrow to the stacktrace.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//342473006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37712 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-25 23:01:54 +00:00
mlippautz@google.com
85ce6bffb9
Coverage data for single entities can be obtained by querying:
...
* script: isolate/id/script/name/coverage
* class: isolate/id/class/id/coverage
* library: isolate/id/library/id/coverage
Some numbers (curl on vm service):
* old base line (full coverage of dart:core + script computing faculty): ~1.2s
* generation for just the script file: ~12ms
* generation of dart:core (after executing fac script): ~150ms
* generation of dart:core-patch/array.dart: ~12ms
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//346003003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37676 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-25 00:06:53 +00:00
srdjan@google.com
41827cddcd
Reduce size of PCDescriptors. Order struct fields so that they do not get padded unnecessarily.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//356623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37674 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 23:50:55 +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
srdjan@google.com
97021b5861
Add class id constants fields to dart:_internal class 'ClassID'. Use the fields in the library (more uses to come).
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//351673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37628 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 22:41:59 +00:00
fschneider@google.com
0d82ac5c05
Remove unused pc-descriptor kind kReturn.
...
This kind is not needed since the only place where it is used
can be just replaced with kRuntimeCall as it behaves the same.
R=hausner@google.com
Review URL: https://codereview.chromium.org//345103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37592 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 10:50:50 +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
koda@google.com
bd979f84d5
Send allocation stats with each class and show in class view.
...
For each class, if there are any allocations, shows current number of instances, shallow size, and the already existing link for retained size.
Also refactor code in ClassTable to reduce duplication.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//345543003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37566 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 20:17:42 +00:00
regis@google.com
32f3e11d99
Cleanup of error and warning reporting.
...
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//340203003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37468 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 22:30:34 +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
koda@google.com
2b2d188df7
Heap::AllocateExternal may trigger GC, so fix String::MakeExternal.
...
Note that this may happen even for size 0 (since we may be overdue for a GC).
Some unit tests still optimistically expect that GC will not trigger.
R=asiva@google.com
Review URL: https://codereview.chromium.org//342503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37414 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 19:41:13 +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
srdjan@google.com
58fd318f4c
Cleanup: use a ZoneGrowableArray instead of Array for ICData map.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//333403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37400 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-17 15:52:05 +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
srdjan@google.com
8f2dc961d0
Save ICData of unoptimized code in the function, thus preserving it across repated unoptimized compilations.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//335173002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37378 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-16 22:24:05 +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
regis@google.com
2d4f431b50
Add missing javascript integer overflow check on 64-bit platforms.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//329793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37244 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-11 20:46:30 +00:00
iposva@google.com
e601c56e31
- Revert to use DEBUG_ASSERT again.
...
Review URL: https://codereview.chromium.org//334443003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37234 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-11 17:17:04 +00:00
iposva@google.com
00b1eb8d53
- DEBUG_ASSERT -> ASSERT where appropriate.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//323373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37233 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-11 16:58:14 +00:00
iposva@google.com
47f215a84b
- Ensure positive keys for private mangling.
...
R=jacobr@google.com
Review URL: https://codereview.chromium.org//326243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37217 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 23:46:44 +00:00
iposva@google.com
ab18821876
- Fix the external_test.dart as it was relying on outdated
...
functionality and broken syntax. So some tests were passing
for the wrong reason.
- Fix the VM parser to properly report the compilation errors.
- Fix the generation of pretty names of private identifiers.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//269253007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37208 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 22:19:33 +00:00
asiva@google.com
6f6aa9e61a
Hoist creation of Smi handles and String handles out of the loop in
...
Script::GenerateLineNumberArray()
R=hausner@google.com
Review URL: https://codereview.chromium.org//321903002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37200 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 20:49:27 +00:00