| OLD | NEW |
| 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 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
| 7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
| 8 | 8 |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1062 | 1062 |
| 1063 | 1063 |
| 1064 DART_EXPORT Dart_Handle Dart_GetReceivePort(Dart_Port port_id) { | 1064 DART_EXPORT Dart_Handle Dart_GetReceivePort(Dart_Port port_id) { |
| 1065 Isolate* isolate = Isolate::Current(); | 1065 Isolate* isolate = Isolate::Current(); |
| 1066 DARTSCOPE(isolate); | 1066 DARTSCOPE(isolate); |
| 1067 CHECK_CALLBACK_STATE(isolate); | 1067 CHECK_CALLBACK_STATE(isolate); |
| 1068 | 1068 |
| 1069 Library& isolate_lib = Library::Handle(isolate, Library::IsolateLibrary()); | 1069 Library& isolate_lib = Library::Handle(isolate, Library::IsolateLibrary()); |
| 1070 ASSERT(!isolate_lib.IsNull()); | 1070 ASSERT(!isolate_lib.IsNull()); |
| 1071 const String& class_name = String::Handle( | 1071 const String& class_name = String::Handle( |
| 1072 isolate, isolate_lib.PrivateName(Symbols::_ReceivePortImpl())); | 1072 isolate, isolate_lib.PrivateName(Symbols::_RawReceivePortImpl())); |
| 1073 // TODO(asiva): Symbols should contain private keys. | 1073 // TODO(asiva): Symbols should contain private keys. |
| 1074 const String& function_name = | 1074 const String& function_name = |
| 1075 String::Handle(isolate_lib.PrivateName(Symbols::_get_or_create())); | 1075 String::Handle(isolate_lib.PrivateName(Symbols::_get_or_create())); |
| 1076 const int kNumArguments = 1; | 1076 const int kNumArguments = 1; |
| 1077 const Function& function = Function::Handle( | 1077 const Function& function = Function::Handle( |
| 1078 isolate, | 1078 isolate, |
| 1079 Resolver::ResolveStatic(isolate_lib, | 1079 Resolver::ResolveStatic(isolate_lib, |
| 1080 class_name, | 1080 class_name, |
| 1081 function_name, | 1081 function_name, |
| 1082 kNumArguments, | 1082 kNumArguments, |
| (...skipping 3330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4413 } | 4413 } |
| 4414 { | 4414 { |
| 4415 NoGCScope no_gc; | 4415 NoGCScope no_gc; |
| 4416 RawObject* raw_obj = obj.raw(); | 4416 RawObject* raw_obj = obj.raw(); |
| 4417 isolate->heap()->SetPeer(raw_obj, peer); | 4417 isolate->heap()->SetPeer(raw_obj, peer); |
| 4418 } | 4418 } |
| 4419 return Api::Success(); | 4419 return Api::Success(); |
| 4420 } | 4420 } |
| 4421 | 4421 |
| 4422 } // namespace dart | 4422 } // namespace dart |
| OLD | NEW |