| OLD | NEW |
| 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/dart_entry.h" | 5 #include "vm/dart_entry.h" |
| 6 | 6 |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 RawObject* DartLibraryCalls::LookupReceivePort(Dart_Port port_id) { | 376 RawObject* DartLibraryCalls::LookupReceivePort(Dart_Port port_id) { |
| 377 Isolate* isolate = Isolate::Current(); | 377 Isolate* isolate = Isolate::Current(); |
| 378 Function& function = | 378 Function& function = |
| 379 Function::Handle(isolate, | 379 Function::Handle(isolate, |
| 380 isolate->object_store()->lookup_receive_port_function()); | 380 isolate->object_store()->lookup_receive_port_function()); |
| 381 const int kNumArguments = 1; | 381 const int kNumArguments = 1; |
| 382 if (function.IsNull()) { | 382 if (function.IsNull()) { |
| 383 Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); | 383 Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); |
| 384 ASSERT(!isolate_lib.IsNull()); | 384 ASSERT(!isolate_lib.IsNull()); |
| 385 const String& class_name = | 385 const String& class_name = |
| 386 String::Handle(isolate_lib.PrivateName(Symbols::_ReceivePortImpl())); | 386 String::Handle(isolate_lib.PrivateName(Symbols::_RawReceivePortImpl())); |
| 387 const String& function_name = | 387 const String& function_name = |
| 388 String::Handle(isolate_lib.PrivateName(Symbols::_lookupReceivePort())); | 388 String::Handle(isolate_lib.PrivateName(Symbols::_lookupReceivePort())); |
| 389 function = Resolver::ResolveStatic(isolate_lib, | 389 function = Resolver::ResolveStatic(isolate_lib, |
| 390 class_name, | 390 class_name, |
| 391 function_name, | 391 function_name, |
| 392 kNumArguments, | 392 kNumArguments, |
| 393 Object::empty_array(), | 393 Object::empty_array(), |
| 394 Resolver::kIsQualified); | 394 Resolver::kIsQualified); |
| 395 ASSERT(!function.IsNull()); | 395 ASSERT(!function.IsNull()); |
| 396 isolate->object_store()->set_lookup_receive_port_function(function); | 396 isolate->object_store()->set_lookup_receive_port_function(function); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 408 const Instance& message) { | 408 const Instance& message) { |
| 409 Isolate* isolate = Isolate::Current(); | 409 Isolate* isolate = Isolate::Current(); |
| 410 Function& function = | 410 Function& function = |
| 411 Function::Handle(isolate, | 411 Function::Handle(isolate, |
| 412 isolate->object_store()->handle_message_function()); | 412 isolate->object_store()->handle_message_function()); |
| 413 const int kNumArguments = 3; | 413 const int kNumArguments = 3; |
| 414 if (function.IsNull()) { | 414 if (function.IsNull()) { |
| 415 Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); | 415 Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); |
| 416 ASSERT(!isolate_lib.IsNull()); | 416 ASSERT(!isolate_lib.IsNull()); |
| 417 const String& class_name = | 417 const String& class_name = |
| 418 String::Handle(isolate_lib.PrivateName(Symbols::_ReceivePortImpl())); | 418 String::Handle(isolate_lib.PrivateName(Symbols::_RawReceivePortImpl())); |
| 419 const String& function_name = | 419 const String& function_name = |
| 420 String::Handle(isolate_lib.PrivateName(Symbols::_handleMessage())); | 420 String::Handle(isolate_lib.PrivateName(Symbols::_handleMessage())); |
| 421 function = Resolver::ResolveStatic(isolate_lib, | 421 function = Resolver::ResolveStatic(isolate_lib, |
| 422 class_name, | 422 class_name, |
| 423 function_name, | 423 function_name, |
| 424 kNumArguments, | 424 kNumArguments, |
| 425 Object::empty_array(), | 425 Object::empty_array(), |
| 426 Resolver::kIsQualified); | 426 Resolver::kIsQualified); |
| 427 ASSERT(!function.IsNull()); | 427 ASSERT(!function.IsNull()); |
| 428 isolate->object_store()->set_handle_message_function(function); | 428 isolate->object_store()->set_handle_message_function(function); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 String::Handle(Field::GetterName(Symbols::_id())))); | 495 String::Handle(Field::GetterName(Symbols::_id())))); |
| 496 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); | 496 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); |
| 497 ASSERT(!func.IsNull()); | 497 ASSERT(!func.IsNull()); |
| 498 const Array& args = Array::Handle(Array::New(1)); | 498 const Array& args = Array::Handle(Array::New(1)); |
| 499 args.SetAt(0, port); | 499 args.SetAt(0, port); |
| 500 return DartEntry::InvokeFunction(func, args); | 500 return DartEntry::InvokeFunction(func, args); |
| 501 } | 501 } |
| 502 | 502 |
| 503 | 503 |
| 504 } // namespace dart | 504 } // namespace dart |
| OLD | NEW |