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

Unified Diff: runtime/vm/json_stream.h

Issue 1400393002: Use offset and count to request slices of lists, maps, and typed_data. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code review Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/tests/service/get_object_rpc_test.dart ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index cd8fe62d3f200f53d33f63c8c21e9e8164d437c4..f467eea292dd90f2e5ac21e4f52ab827ba316745 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -109,6 +109,20 @@ class JSONStream : ValueObject {
const char** param_keys() const { return param_keys_; }
const char** param_values() const { return param_values_; }
+ void set_offset(intptr_t value) {
+ ASSERT(value > 0);
+ offset_ = value;
+ }
+
+ void set_count(intptr_t value) {
+ ASSERT(value > 0);
+ count_ = value;
+ }
+
+ void ComputeOffsetAndCount(intptr_t length,
+ intptr_t* offset,
+ intptr_t* count);
+
private:
void Clear();
void PostNullReply(Dart_Port port);
@@ -188,6 +202,8 @@ class JSONStream : ValueObject {
const char** param_keys_;
const char** param_values_;
intptr_t num_params_;
+ intptr_t offset_;
+ intptr_t count_;
int64_t setup_time_micros_;
friend class JSONObject;
« no previous file with comments | « runtime/observatory/tests/service/get_object_rpc_test.dart ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698