Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 9303031: Add support for lists and backward references when decoding a message to a Dart_CObject object (Closed)

Created:
8 years, 10 months ago by Søren Gjesse
Modified:
8 years, 10 months ago
Reviewers:
turnidge, siva
CC:
Mads Ager (google), reviews_dartlang.org
Visibility:
Public.

Description

Add support for lists and backward references when decoding a message to a Dart_CObject object The C message reader can now read lists created like this: new List() new List<int>() new List<String>() new List<double>() new List<bool>() The backward references are now resolved and already allocated Dart_CObject objects are reused when there is a backward reference. The reuse of the Dart_CObject objects poses the issue of which objects where allocated with the supplied allocator and which where not. Currently this will work best with a zone allocator. This will be added to the tests in a subsequent change. R=asiva@google.com, turnidge@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=3831

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed review comments from asiva@ #

Patch Set 3 : Combined with https://chromiumcodereview.appspot.com/9303001/ #

Patch Set 4 : Rebased to r3830 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+383 lines, -61 lines) Patch
M runtime/include/dart_api.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/platform/assert.h View 1 2 3 chunks +13 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.h View 1 2 2 chunks +34 lines, -8 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 2 9 chunks +69 lines, -24 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 1 2 3 9 chunks +264 lines, -27 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Gjesse
This is based on https://chromiumcodereview.appspot.com/9303001/.
8 years, 10 months ago (2012-01-31 12:17:49 UTC) #1
siva
LGTM The issue of freeing reused objects in the unit tests at least can be ...
8 years, 10 months ago (2012-02-02 04:01:57 UTC) #2
Søren Gjesse
8 years, 10 months ago (2012-02-02 09:59:49 UTC) #3
I had to combine this with  https://chromiumcodereview.appspot.com/9303001/
(adding support for lists) as this depended on it.

https://chromiumcodereview.appspot.com/9303031/diff/1/runtime/vm/snapshot.cc
File runtime/vm/snapshot.cc (right):

https://chromiumcodereview.appspot.com/9303031/diff/1/runtime/vm/snapshot.cc#...
runtime/vm/snapshot.cc:633: // TODO(sgjesse): Handle back-references.
On 2012/02/02 04:01:57, asiva wrote:
> You are handling backward references now, the TODO can go.

Done.

https://chromiumcodereview.appspot.com/9303031/diff/1/runtime/vm/snapshot.cc#...
runtime/vm/snapshot.cc:638: UNREACHABLE();
On 2012/02/02 04:01:57, asiva wrote:
> Is the UNREACHABLE needed?

No, removed.

https://chromiumcodereview.appspot.com/9303031/diff/1/runtime/vm/snapshot_tes...
File runtime/vm/snapshot_test.cc (right):

https://chromiumcodereview.appspot.com/9303031/diff/1/runtime/vm/snapshot_tes...
runtime/vm/snapshot_test.cc:947: free(object);
On 2012/02/02 04:01:57, asiva wrote:
> Here too if GetDesrializedDartObject used a ZoneAllocator then you would not
> have to bother with freeing the Cobjects that were created.

Moving to a zone allocator is part up later CL.

Powered by Google App Engine
This is Rietveld 408576698