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

Issue 8380020: Refactor the dart api a bit: (Closed)

Created:
9 years, 2 months ago by turnidge
Modified:
9 years, 1 month ago
Reviewers:
Anton Muhin, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Refactor the dart api a bit: - Dart_Result is gone. Dart_Handle mostly replaces it. - Name/signature changes - IsValidResult -> IsValid - GetErrorCString -> GetError - many more... - Make details of persistent handle freelist private. - Add persistent "True" handle to api state. Things I am not doing in this changelist: - Documentation updates Committed: https://code.google.com/p/dart/source/detail?r=778

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+948 lines, -980 lines) Patch
M runtime/bin/builtin.cc View 1 2 1 chunk +5 lines, -3 lines 0 comments Download
M runtime/bin/builtin_in.cc View 1 2 5 chunks +25 lines, -29 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 2 1 chunk +19 lines, -16 lines 0 comments Download
M runtime/bin/eventhandler.cc View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M runtime/bin/file.cc View 1 2 4 chunks +15 lines, -11 lines 0 comments Download
M runtime/bin/gen_snapshot.cc View 1 2 3 chunks +6 lines, -7 lines 0 comments Download
M runtime/bin/main.cc View 1 2 6 chunks +30 lines, -35 lines 0 comments Download
M runtime/bin/process.cc View 1 2 1 chunk +5 lines, -6 lines 0 comments Download
M runtime/bin/process_script.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/process_script.cc View 1 2 2 chunks +30 lines, -34 lines 0 comments Download
M runtime/bin/socket.cc View 1 2 4 chunks +11 lines, -9 lines 0 comments Download
M runtime/include/dart_api.h View 1 2 9 chunks +64 lines, -137 lines 0 comments Download
M runtime/vm/dart_api_impl.h View 1 2 2 chunks +9 lines, -12 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 60 chunks +300 lines, -254 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 51 chunks +348 lines, -362 lines 0 comments Download
M runtime/vm/dart_api_state.h View 1 2 5 chunks +31 lines, -5 lines 0 comments Download
M runtime/vm/exceptions_test.cc View 1 2 1 chunk +8 lines, -10 lines 0 comments Download
M runtime/vm/isolate_test.cc View 1 2 1 chunk +5 lines, -6 lines 0 comments Download
M runtime/vm/parser.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/parser.cc View 1 2 3 chunks +6 lines, -9 lines 0 comments Download
M runtime/vm/snapshot_test.cc View 1 2 4 chunks +17 lines, -19 lines 0 comments Download
M runtime/vm/unit_test.cc View 1 2 1 chunk +7 lines, -9 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
turnidge
Ivan, Please take a look. Anton, This change will effect you, so I wanted you ...
9 years, 2 months ago (2011-10-24 21:37:43 UTC) #1
Anton Muhin
Todd, thanks a lot for keeping in the loop. I only glanced through dart_api.h changes ...
9 years, 2 months ago (2011-10-25 11:35:17 UTC) #2
Ivan Posva
LGTM after resolving the inconsistency. -Ivan http://codereview.chromium.org/8380020/diff/1/runtime/include/dart_api.h File runtime/include/dart_api.h (right): http://codereview.chromium.org/8380020/diff/1/runtime/include/dart_api.h#newcode229 runtime/include/dart_api.h:229: intptr_t* used); Not ...
9 years, 2 months ago (2011-10-25 21:50:53 UTC) #3
turnidge
9 years, 2 months ago (2011-10-25 22:07:23 UTC) #4
Ok, took care of the comments.  Now I just need to coordinate with Anton to
figure out how to check this in.

http://codereview.chromium.org/8380020/diff/1/runtime/include/dart_api.h
File runtime/include/dart_api.h (right):

http://codereview.chromium.org/8380020/diff/1/runtime/include/dart_api.h#newc...
runtime/include/dart_api.h:229: intptr_t* used);
On 2011/10/25 21:50:53, Ivan Posva wrote:
> Not sure if it makes it easier to use this way:
> 
> Dart_Handle Dart_StringGet8(Dart_Handle str, uint8_t* codepoints, intptr_t*
> length);
> 
> var used = length;
> result = Dart_StringGet8(str, buffer, &used);

Yeah, I debated that.  Changed.

http://codereview.chromium.org/8380020/diff/1/runtime/include/dart_api.h#newc...
runtime/include/dart_api.h:264: DART_EXPORT Dart_Handle
Dart_ClosureSmrck(Dart_Handle object);
On 2011/10/25 21:50:53, Ivan Posva wrote:
> This does not match the result type in dart_api_impl.cc.

Fixed.

http://codereview.chromium.org/8380020/diff/1/runtime/vm/dart_api_impl.cc
File runtime/vm/dart_api_impl.cc (right):

http://codereview.chromium.org/8380020/diff/1/runtime/vm/dart_api_impl.cc#new...
runtime/vm/dart_api_impl.cc:785: "Object is not a String");
On 2011/10/25 21:50:53, Ivan Posva wrote:
> Weird alignment here and similar places.

Fixed.

Powered by Google App Engine
This is Rietveld 408576698