Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Zachary Anderson
89e81a4620
Handle empty string messages in Dart_PostCObject
...
R=asiva@google.com
Review URL: https://codereview.chromium.org/2278763002 .
2016-08-25 12:39:35 -07:00
Ryan Macnak
4b369f6a0c
Remove dead full snapshot support from the recursive descent serializer.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org/2161853002 .
2016-07-19 17:50:49 -07:00
Ryan Macnak
1e8fdaee68
Support for taking full snapshots from 'dart', not just 'dart_bootstrap'.
...
- Don't create rival copies of the predefined symbols in isolates in dart_bootstrap.
- Don't do work to save these rival copies during symbol table compaction.
- Create unified symbol table just before writing the vm isolate.
- Create unified list of scripts to include in the vm isolate.
- Ignore object ids of the old vm isolate when writing a new one.
- Ensure token stream private keys are hashed.
- Use the type of isolate we are writing instead of an object's current isolate to decide if vm isolate objects are written symbolically.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1944213002 .
2016-05-10 10:13:33 -07:00
Florian Schneider
fbdce6a59e
VM: Const-correctness fixes.
...
Three types of fixes:
1. Remove redundant const_cast
2. Remove const_cast by adding const when appropiate.
3. Remove const_cast by removing const (e.g. places where we call free with it)
For now I only fixed places where the fix is local enough - i.e. does not require
changed a large amount of code.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1526123002 .
2015-12-15 19:24:40 +01:00
Zachary Anderson
fa8a0613a3
Fold ApiObjectConverter use into ApiMessageReader
...
TODO from change on Friday.
R=turnidge@google.com
Review URL: https://codereview.chromium.org/1523013002 .
2015-12-14 11:12:25 -08:00
Siva Annamalai
f92f63baa5
1. Do not mark an object by storing the object id used during serialization in the object header.
...
2. Removed all the GC task locking code which was needed to ensure that a garbage collection was not in progress when writing a message as the message writer was manipulating the object header
3. Use the rawobject => object_id hash map to store and retrieve the object id for an object.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1399663002 .
2015-10-13 15:26:04 -07:00
Siva Annamalai
02c702bf92
1. Write the backing data array of a GrowableObjectArray as a reference
...
2. Cleanup and refactor WriteObjectRef and WriteObjectInlined and pass as_reference as a parameter to the WriteTo function to allow respective types to deal with it.
3. Added a as_reference parameter to the ReadFrom functions (currently the parameter is not used but the next round of changes will cleanup ReadObjectRef and ReadObjectInlined similarly).
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1388543008 .
2015-10-12 12:45:59 -07:00
Siva Annamalai
810823f8d5
Use the zone in ApiNativeScope for allocating objects in the ApiMessageReader instead of passing in an allocator.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1319583003 .
2015-08-25 14:48:41 -07:00
Siva Annamalai
e61f1dc8ce
1. Reclaim the CreatedFromSnapshot bit and use the bit to indicate VM heap object.
...
2. Cleanup calls to set_tags when reading objects from a snapshot.
3. Fixes issue 21816
R=regis@google.com
Review URL: https://codereview.chromium.org//1221503004 .
2015-08-10 11:02:31 -07:00
Siva Annamalai
521dee763c
1. Fix the type arguments recursion problem that gets introduced when canonicalization of type arguments is deferred while reading a script snapshot. This problem was shows up as random stack overflow crashes when running pub
...
2. Patching of the type arguments field in a GrowableObjectArray was missed
BUG=23930
R=regis@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//1276753002 .
2015-08-06 10:55:48 -07:00
Todd Turnidge
53dbc3764d
Support sending and receiving Capability objects from C code.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//1267603003 .
2015-07-30 14:07:36 -07:00
Siva Annamalai
b0c9f2ef9b
Fix for issue 23244
...
Refactoring of WriteObjectImpl and ReadObjectImpl to enable inlining of canonical objects in the snapshot stream.
BUG=23244
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1260033004 .
2015-07-28 10:52:05 -07:00
Siva Annamalai
969005dfe6
Fix for issue 23834 ( https://github.com/dart-lang/sdk/issues/23834 )
...
Script snapshots do not use VM isolate object indexes and hence we should not be accounting for max_vm_isolate_object_id.
This is related to the fix done in https://github.com/dart-lang/sdk/issues/23647
BUG=23834
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//1234803008 .
2015-07-15 16:56:13 -07:00
Siva Annamalai
b810ff86f9
Fix build bot error.
...
BUG=
Review URL: https://codereview.chromium.org//1153853002
2015-05-22 12:59:46 -07:00
Siva Annamalai
5e0a3d66e5
Move bootstrap scripts and token streams to the VM isolate so that they become read only objects. This reduces the per isolate heap size as follows:
...
Before the change:
Size of isolate snapshot = 780799
New space (0k of 1024k) Old space (758k of 1024k)
After the change:
Size of isolate snapshot = 279696
New space (0k of 1024k) Old space (602k of 1024k)
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//1151113002
2015-05-22 12:48:11 -07:00
asiva@google.com
05d7eb5dfa
Move symbol table from per isolate snapshot to vm isolate snapshot, this reduces the per isolate initial heap size
...
from New space (0k of 1024k) Old space (1274k of 1536k)
to New space (0k of 1024k) Old space (756k of 1280k)
R=hausner@google.com
Review URL: https://codereview.chromium.org//1123813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45795 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 20:14:37 +00:00
asiva@google.com
ca1c3241c4
Fix for issue 21398.
...
Accept only 'literal-like' objects when sending messages to isolates
spawned using spawnURI. Allow all objects for isolates spawned using
spawnFunction.
R=iposva@google.com
Review URL: https://codereview.chromium.org//834233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42793 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 23:14:30 +00:00
srdjan@google.com
5ef243e688
Make sure Bigint._digits is always a Uint32List and bever null. Adapt type information for get:_digits.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//580903004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40463 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 21:18:25 +00:00
regis@google.com
0220e41d72
New bigint implementation in the vm.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//509153003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +00:00
zra@google.com
c686b2c624
Finishes removing intptr_t from raw object fields.
...
Also removes {Read,Write}IntptrValue from the snapshot reader and writer.
R=asiva@google.com
Review URL: https://codereview.chromium.org//343803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40048 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 19:51:22 +00:00
koda@google.com
c645b0ab71
Object ids in snapshots are assigned sequentially, and can in many cases be omitted by the writer and inferred by the reader. The exceptions are the classes that are serialized in two steps (arrays and user-level Dart instances), where the second step must include the id.
...
For standalone, makes full snapshot 5% smaller, and startup ~1.5% faster when measured on a Nexus 10.
R=zra@google.com
Review URL: https://codereview.chromium.org//387993007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38261 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 21:47:00 +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
zra@google.com
2ab7fa6c72
Omits size bits when writing RawObject tags to a snapshot.
...
Makes snapshot ~30KB smaller.
R=asiva@google.com
Review URL: https://codereview.chromium.org//349293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37626 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 22:18:04 +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
zra@google.com
86ca6ef5a6
Adds an assertion to limit snapshot intptr_t size.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//323163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37196 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 20:15:49 +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
iposva@google.com
dd7d6dd375
- Handle doubles transferred in message snapshots specially.
...
- Do not encode doubles using integer compression.
R=asiva@google.com
Review URL: https://codereview.chromium.org//221973004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34681 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-03 00:58:14 +00:00
ajohnsen@google.com
a3e5a06a90
Speed up snapshots of *int8lists, by using memmove.
...
BUG=https://code.google.com/p/dart/issues/detail?id=17951
R=asiva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//221943002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34649 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 15:53:23 +00:00
regis@google.com
6650adae3b
Write the type arguments instantiations field to full snapshots only.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//151773006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32524 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 23:37:06 +00:00
regis@google.com
61ba258618
Fix snapshotting of TypeArguments.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//132623007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32457 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 23:02:54 +00:00
iposva@google.com
781f737c6a
First round of http://dartbug.com/15922 :
...
- Address warnings about 64-bit to 32-bit conversions.
- Remove heap profiler.
R=asiva@google.com
Review URL: https://codereview.chromium.org//139043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31867 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 05:05:35 +00:00
asiva@google.com
48e5bebfe3
Compute next field offset correctly.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//56033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29818 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 16:51:48 +00:00
sgjesse@google.com
2f27215203
Remove the reply port form the native isolate handler
...
The handler function for a native isolate no longer gets an explicit
reply port. Instead the reply port must be sent as part of the message
if required.
The Dart_CObject structure now exposes the send ports in a message to
a native isolate.
R=asiva@google.com , floitsch@google.com , whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//43483004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29418 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 08:45:32 +00:00
mlippautz@google.com
94502c10ea
Checks CObject lengths in native API.
...
Also converts the API to use intptr_t instead of a mixture of int64_t and int. Internally all variable length objects have lengths and maximum values represented as intptr_t (actually Smi ranges). In order to check for these maximum lengths we need to have a common type for 32 and 64 bit platforms.
Helping constructs like IOBuffer can still use 64bit lengths, but have to check that there values are actually in the domain of intptr_t as soon as internal objects are created.
Addresses issue 4314.
BUG=
R=asiva@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//23532048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27395 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 16:56:12 +00:00
mlippautz@google.com
6b175bbada
"Reverting 27298"
...
BUG=
Review URL: https://codereview.chromium.org//23816010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27302 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 17:26:07 +00:00
mlippautz@google.com
dc9fca00eb
Add length checks to ApiMessageWriter.
...
Addresses issue 4314.
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//23479010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27298 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 16:50:41 +00:00
asiva@google.com
703bad2d2a
Revert change 23636 as it is causing issues on dartium. Will resubmit after investigating the dartium failure.
...
Review URL: https://codereview.chromium.org//16378004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23641 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 17:28:01 +00:00
asiva@google.com
bd14296eb7
Fix for issue 1755.
...
Use 'new' in all the snapshot reallocation functions instead of realloc.
This would result in program termination when allocation fails and will
ensure that a NULL will not be returned.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//16271010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23636 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 16:21:04 +00:00
iposva@google.com
1836035266
- Modify dart_api.h to be a proper C API.
...
- Verify that dart_api.h can be used from C
by changing the test_extension to be a pure C file.
R=asiva@google.com
Review URL: https://codereview.chromium.org//15689013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +00:00
ager@google.com
431954b584
Rename dart:typeddata to dart:typed_data.
...
R=asiva@google.com , floitsch@google.com , srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//14426006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21871 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:54:54 +00:00
ajohnsen@google.com
3bc864da88
Fix incremental allocation of forward_list_ in dart_api_message.
...
BUG=
Review URL: https://codereview.chromium.org//14031006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21667 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 08:13:49 +00:00
sgjesse@google.com
83bd0f1aa9
Add support for even more typed data on native ports
...
The only types missing now are: Float32x4, Float32x4List and
Uint32x4 (currently no Uint32x4List).
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//13998008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21455 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 14:19:46 +00:00
sgjesse@google.com
7ddac4a7be
Fix GCC compiler warning
...
TBR=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//14046010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21425 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 09:12:49 +00:00
sgjesse@google.com
6507357ca0
Add support for more typed data types on native ports
...
Renamed the kUint8Array type for a Dart_CObject structure to
kByteArray to support all typed data types. The specific type is
stored in a separate type field. No matter what the specific type is,
the length of the byte array is always in bytes.
R=ager@google.com
BUG=
Review URL: https://codereview.chromium.org//14142008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21423 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 09:01:56 +00:00
sgjesse@google.com
52f54a2edd
Add support for typed data views on native threads
...
The deserializer running outside the VM can now decode typed data
views. As the typed data views are implemented as normal Dart
instances and not a internal VM object the deserializer have been
expanded to process serialized objects of the type used to create
these views. The typed data object that the view is based on will
always be serialized as part of the message.
Currently only vews created with constructor Uint8List.view on top of
an Uint8List are supported.
R=ager@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=9484
Review URL: https://codereview.chromium.org//14065006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21252 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 07:15:08 +00:00
whesse@google.com
e1c70ce932
dart:io | Fix error in deserializing of native port messages.
...
BUG=dartbug.com/9369
Review URL: https://codereview.chromium.org//12893013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20380 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 14:53:25 +00:00
asiva@google.com
69d0484d2a
- Use dart:typedata types in the Dart API calls.
...
- Change the dart/io code to not use dart:scalarlist
Review URL: https://codereview.chromium.org//12730013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19848 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 10:57:48 +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
asiva@google.com
4c069867e4
- Make Boolean 'true' and 'false' singleton VM isolate objects.
...
- Change all uses of it
Review URL: https://codereview.chromium.org//11745022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 01:52:05 +00:00