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

Side by Side Diff: runtime/vm/message.cc

Issue 1660063002: Remove many features when building product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/json_test.cc ('k') | runtime/vm/metrics.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #include "vm/message.h" 5 #include "vm/message.h"
6 6
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/json_stream.h" 8 #include "vm/json_stream.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/port.h" 10 #include "vm/port.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 ASSERT(current != NULL); 174 ASSERT(current != NULL);
175 if (current->Id() == id) { 175 if (current->Id() == id) {
176 return current; 176 return current;
177 } 177 }
178 } 178 }
179 return NULL; 179 return NULL;
180 } 180 }
181 181
182 182
183 void MessageQueue::PrintJSON(JSONStream* stream) { 183 void MessageQueue::PrintJSON(JSONStream* stream) {
184 if (!FLAG_support_service) {
185 return;
186 }
184 JSONArray messages(stream); 187 JSONArray messages(stream);
185 188
186 Object& msg_handler = Object::Handle(); 189 Object& msg_handler = Object::Handle();
187 190
188 MessageQueue::Iterator it(this); 191 MessageQueue::Iterator it(this);
189 intptr_t depth = 0; 192 intptr_t depth = 0;
190 while (it.HasNext()) { 193 while (it.HasNext()) {
191 Message* current = it.Next(); 194 Message* current = it.Next();
192 JSONObject message(&messages); 195 JSONObject message(&messages);
193 message.AddProperty("type", "Message"); 196 message.AddProperty("type", "Message");
(...skipping 20 matching lines...) Expand all
214 const Script& script = Script::Handle(function.script()); 217 const Script& script = Script::Handle(function.script());
215 if (!script.IsNull()) { 218 if (!script.IsNull()) {
216 message.AddLocation(script, function.token_pos(), 219 message.AddLocation(script, function.token_pos(),
217 function.end_token_pos()); 220 function.end_token_pos());
218 } 221 }
219 } 222 }
220 } 223 }
221 } 224 }
222 225
223 } // namespace dart 226 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/json_test.cc ('k') | runtime/vm/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698