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

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

Issue 1584223006: Remove signature classes from the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 current->Id()); 196 current->Id());
197 message.AddProperty("size", current->len()); 197 message.AddProperty("size", current->len());
198 message.AddProperty("index", depth++); 198 message.AddProperty("index", depth++);
199 message.AddPropertyF("_destinationPort", "%" Pd64 "", 199 message.AddPropertyF("_destinationPort", "%" Pd64 "",
200 static_cast<int64_t>(current->dest_port())); 200 static_cast<int64_t>(current->dest_port()));
201 message.AddProperty("_priority", 201 message.AddProperty("_priority",
202 Message::PriorityAsString(current->priority())); 202 Message::PriorityAsString(current->priority()));
203 // TODO(johnmccutchan): Move port -> handler map out of Dart and into the 203 // TODO(johnmccutchan): Move port -> handler map out of Dart and into the
204 // VM, that way we can lookup the handler without invoking Dart code. 204 // VM, that way we can lookup the handler without invoking Dart code.
205 msg_handler = DartLibraryCalls::LookupHandler(current->dest_port()); 205 msg_handler = DartLibraryCalls::LookupHandler(current->dest_port());
206 if (msg_handler.IsInstance() && Instance::Cast(msg_handler).IsClosure()) { 206 if (msg_handler.IsClosure()) {
207 // Grab function from closure. 207 // Grab function from closure.
208 msg_handler = Closure::function(Instance::Cast(msg_handler)); 208 msg_handler = Closure::Cast(msg_handler).function();
209 } 209 }
210 if (msg_handler.IsFunction()) { 210 if (msg_handler.IsFunction()) {
211 const Function& function = Function::Cast(msg_handler); 211 const Function& function = Function::Cast(msg_handler);
212 message.AddProperty("handler", function); 212 message.AddProperty("handler", function);
213 213
214 const Script& script = Script::Handle(function.script()); 214 const Script& script = Script::Handle(function.script());
215 if (!script.IsNull()) { 215 if (!script.IsNull()) {
216 message.AddLocation(script, function.token_pos(), 216 message.AddLocation(script, function.token_pos(),
217 function.end_token_pos()); 217 function.end_token_pos());
218 } 218 }
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 } // namespace dart 223 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698