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

Issue 10693071: Use VM type cast and save handles. (Closed)

Created:
8 years, 5 months ago by regis
Modified:
8 years, 5 months ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Use VM type cast and save handles. Committed: https://code.google.com/p/dart/source/detail?r=9317

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+267 lines, -426 lines) Patch
M runtime/lib/isolate.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download
M runtime/lib/mirrors.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/ast.h View 1 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/ast.cc View 1 2 chunks +3 lines, -7 lines 0 comments Download
M runtime/vm/benchmark_test.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/class_finalizer.cc View 1 3 chunks +3 lines, -7 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 6 chunks +10 lines, -14 lines 0 comments Download
M runtime/vm/dart_api_impl.h View 1 2 chunks +33 lines, -33 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 43 chunks +86 lines, -129 lines 0 comments Download
M runtime/vm/dart_entry_test.cc View 1 2 chunks +2 lines, -6 lines 0 comments Download
M runtime/vm/debugger.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M runtime/vm/debugger_api_impl.cc View 1 12 chunks +28 lines, -43 lines 0 comments Download
M runtime/vm/exceptions.h View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/exceptions.cc View 1 2 chunks +4 lines, -11 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/isolate.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M runtime/vm/native_entry.h View 1 1 chunk +7 lines, -10 lines 0 comments Download
M runtime/vm/object.h View 1 2 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/object.cc View 1 27 chunks +46 lines, -98 lines 0 comments Download
M runtime/vm/object_store.cc View 1 1 chunk +2 lines, -5 lines 0 comments Download
M runtime/vm/parser.cc View 1 11 chunks +21 lines, -34 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
regis
8 years, 5 months ago (2012-07-02 18:16:31 UTC) #1
siva
Nice change. LGTM https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/dart_api_impl.cc File runtime/vm/dart_api_impl.cc (right): https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/dart_api_impl.cc#newcode2405 runtime/vm/dart_api_impl.cc:2405: Class& cls = Class::Handle( const Class& ...
8 years, 5 months ago (2012-07-02 20:22:14 UTC) #2
Ivan Posva
LGTM with a couple comments. -Ivan https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/debugger_api_impl.cc File runtime/vm/debugger_api_impl.cc (right): https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/debugger_api_impl.cc#newcode28 runtime/vm/debugger_api_impl.cc:28: } while (0) ...
8 years, 5 months ago (2012-07-02 21:01:38 UTC) #3
regis
8 years, 5 months ago (2012-07-02 21:42:32 UTC) #4
Thanks

https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/dart_api_im...
File runtime/vm/dart_api_impl.cc (right):

https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/dart_api_im...
runtime/vm/dart_api_impl.cc:2405: Class& cls = Class::Handle(
On 2012/07/02 20:22:14, asiva wrote:
> const Class& cls = .....

Done.

https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/debugger_ap...
File runtime/vm/debugger_api_impl.cc (right):

https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/debugger_ap...
runtime/vm/debugger_api_impl.cc:28: } while (0)
On 2012/07/02 21:01:38, Ivan Posva wrote:
> Why here, but not below in CHECK_AND_CAST?

You would have to ask Matthias :-)
Now wrapped in do while(0) and moved line continuation slashes to column 80.
I also moved the var declaration from the use location to inside the macro.

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

https://chromiumcodereview.appspot.com/10693071/diff/1/runtime/vm/exceptions....
runtime/vm/exceptions.cc:357: PropagateError(result);
On 2012/07/02 21:01:38, Ivan Posva wrote:
> I personally do not like how the type check and the cast are split across two
> different functions here. PropagateError should take a "const Error& err".
> Please fix.

Done.

Powered by Google App Engine
This is Rietveld 408576698