| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_debugger_api.h" | 6 #include "include/dart_debugger_api.h" |
| 7 #include "platform/json.h" | 7 #include "platform/json.h" |
| 8 #include "vm/bootstrap_natives.h" | 8 #include "vm/bootstrap_natives.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/exceptions.h" | 10 #include "vm/exceptions.h" |
| 11 #include "vm/message.h" | 11 #include "vm/message.h" |
| 12 #include "vm/port.h" | 12 #include "vm/port.h" |
| 13 #include "vm/resolver.h" | 13 #include "vm/resolver.h" |
| 14 | 14 |
| 15 namespace dart { | 15 namespace dart { |
| 16 | 16 |
| 17 inline Dart_Handle NewString(const char* str) { | 17 inline Dart_Handle NewString(const char* str) { |
| 18 return Dart_NewStringFromCString(str); | 18 return Dart_NewStringFromCString(str); |
| 19 } | 19 } |
| 20 | 20 |
| 21 | 21 |
| 22 DEFINE_NATIVE_ENTRY(Mirrors_isLocalPort, 1) { | 22 DEFINE_NATIVE_ENTRY(Mirrors_isLocalPort, 1) { |
| 23 GET_NATIVE_ARGUMENT(Instance, port, arguments->NativeArgAt(0)); | 23 GET_NON_NULL_NATIVE_ARGUMENT(Instance, port, arguments->NativeArgAt(0)); |
| 24 | 24 |
| 25 // Get the port id from the SendPort instance. | 25 // Get the port id from the SendPort instance. |
| 26 const Object& id_obj = Object::Handle(DartLibraryCalls::PortGetId(port)); | 26 const Object& id_obj = Object::Handle(DartLibraryCalls::PortGetId(port)); |
| 27 if (id_obj.IsError()) { | 27 if (id_obj.IsError()) { |
| 28 Exceptions::PropagateError(Error::Cast(id_obj)); | 28 Exceptions::PropagateError(Error::Cast(id_obj)); |
| 29 UNREACHABLE(); | 29 UNREACHABLE(); |
| 30 } | 30 } |
| 31 ASSERT(id_obj.IsSmi() || id_obj.IsMint()); | 31 ASSERT(id_obj.IsSmi() || id_obj.IsMint()); |
| 32 Integer& id = Integer::Handle(); | 32 Integer& id = Integer::Handle(); |
| 33 id ^= id_obj.raw(); | 33 id ^= id_obj.raw(); |
| (...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 | 1199 |
| 1200 void HandleMirrorsMessage(Isolate* isolate, | 1200 void HandleMirrorsMessage(Isolate* isolate, |
| 1201 Dart_Port reply_port, | 1201 Dart_Port reply_port, |
| 1202 const Instance& message) { | 1202 const Instance& message) { |
| 1203 UNIMPLEMENTED(); | 1203 UNIMPLEMENTED(); |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 } // namespace dart | 1206 } // namespace dart |
| OLD | NEW |