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

Side by Side Diff: runtime/vm/json_stream.h

Issue 2254543006: Reduce copying in sending service responses. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: dbc, sync Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_JSON_STREAM_H_ 5 #ifndef VM_JSON_STREAM_H_
6 #define VM_JSON_STREAM_H_ 6 #define VM_JSON_STREAM_H_
7 7
8 #include "include/dart_api.h" // for Dart_Port 8 #include "include/dart_api.h" // for Dart_Port
9 #include "platform/text_buffer.h" 9 #include "platform/text_buffer.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void set_id_zone(ServiceIdZone* id_zone) { 90 void set_id_zone(ServiceIdZone* id_zone) {
91 id_zone_ = id_zone; 91 id_zone_ = id_zone;
92 } 92 }
93 ServiceIdZone* id_zone() { 93 ServiceIdZone* id_zone() {
94 return id_zone_; 94 return id_zone_;
95 } 95 }
96 96
97 TextBuffer* buffer() { return &buffer_; } 97 TextBuffer* buffer() { return &buffer_; }
98 const char* ToCString() { return buffer_.buf(); } 98 const char* ToCString() { return buffer_.buf(); }
99 99
100 void Steal(const char** buffer, intptr_t* buffer_length); 100 void Steal(char** buffer, intptr_t* buffer_length);
101 101
102 void set_reply_port(Dart_Port port); 102 void set_reply_port(Dart_Port port);
103 103
104 void SetParams(const char** param_keys, const char** param_values, 104 void SetParams(const char** param_keys, const char** param_values,
105 intptr_t num_params); 105 intptr_t num_params);
106 106
107 Dart_Port reply_port() const { return reply_port_; } 107 Dart_Port reply_port() const { return reply_port_; }
108 108
109 intptr_t NumObjectParameters() const; 109 intptr_t NumObjectParameters() const;
110 RawObject* GetObjectParameterKey(intptr_t i) const; 110 RawObject* GetObjectParameterKey(intptr_t i) const;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 friend class JSONObject; 428 friend class JSONObject;
429 429
430 DISALLOW_ALLOCATION(); 430 DISALLOW_ALLOCATION();
431 DISALLOW_COPY_AND_ASSIGN(JSONArray); 431 DISALLOW_COPY_AND_ASSIGN(JSONArray);
432 }; 432 };
433 433
434 } // namespace dart 434 } // namespace dart
435 435
436 #endif // VM_JSON_STREAM_H_ 436 #endif // VM_JSON_STREAM_H_
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698