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

Issue 10175011: Rework mirrors implementation. (Closed)

Created:
8 years, 8 months ago by turnidge
Modified:
8 years, 8 months ago
Reviewers:
hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Rework mirrors implementation. (Note that the current mirrors implementation is just a heartbeat implementation of a single method) Use native code instead of dart code to do the work. Use JSON instead of Lists/Maps for commands/responses. Reenable disabled tests. Committed: https://code.google.com/p/dart/source/detail?r=6864

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -104 lines) Patch
A runtime/lib/mirrors.h View 1 chunk +18 lines, -0 lines 0 comments Download
M runtime/lib/mirrors.cc View 1 2 3 2 chunks +97 lines, -16 lines 0 comments Download
M runtime/lib/mirrors_impl.dart View 1 chunk +10 lines, -26 lines 0 comments Download
M runtime/lib/mirrors_sources.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/tests/vm/vm_dart.status View 1 chunk +0 lines, -3 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 2 chunks +1 line, -1 line 0 comments Download
M runtime/vm/dart_entry.h View 1 chunk +0 lines, -5 lines 0 comments Download
M runtime/vm/dart_entry.cc View 1 chunk +0 lines, -42 lines 0 comments Download
M runtime/vm/isolate.cc View 2 chunks +2 lines, -11 lines 0 comments Download
M runtime/vm/json.h View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/vm/json.cc View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
turnidge
8 years, 8 months ago (2012-04-23 21:03:42 UTC) #1
hausner
lgtm https://chromiumcodereview.appspot.com/10175011/diff/6001/runtime/lib/mirrors.cc File runtime/lib/mirrors.cc (right): https://chromiumcodereview.appspot.com/10175011/diff/6001/runtime/lib/mirrors.cc#newcode111 runtime/lib/mirrors.cc:111: if (!JSONGetLiteral(json_text, "ok", &ok, &ok_len) || If you ...
8 years, 8 months ago (2012-04-23 21:54:17 UTC) #2
turnidge
8 years, 8 months ago (2012-04-23 22:14:19 UTC) #3
https://chromiumcodereview.appspot.com/10175011/diff/6001/runtime/lib/mirrors.cc
File runtime/lib/mirrors.cc (right):

https://chromiumcodereview.appspot.com/10175011/diff/6001/runtime/lib/mirrors...
runtime/lib/mirrors.cc:111: if (!JSONGetLiteral(json_text, "ok", &ok, &ok_len)
||
On 2012/04/23 21:54:17, hausner wrote:
> If you don't throw away the JSONReader object after finding the "ok" value
pair,
> you could do something like:
> 
> if (r.Seek("ok") && r.IsLiteral("true")) { ...
> 
> Where IsLiteral is a trivial function that you can add to JSONReader.

Instead of IsLiteral I added IsTrue(), IsFalse(), and IsNull().

Powered by Google App Engine
This is Rietveld 408576698