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

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

Issue 125103004: Move service into VM (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.h » ('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/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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 String::Handle(isolate_lib.PrivateName( 486 String::Handle(isolate_lib.PrivateName(
487 String::Handle(Field::GetterName(Symbols::_id())))); 487 String::Handle(Field::GetterName(Symbols::_id()))));
488 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); 488 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name));
489 ASSERT(!func.IsNull()); 489 ASSERT(!func.IsNull());
490 const Array& args = Array::Handle(Array::New(1)); 490 const Array& args = Array::Handle(Array::New(1));
491 args.SetAt(0, port); 491 args.SetAt(0, port);
492 return DartEntry::InvokeFunction(func, args); 492 return DartEntry::InvokeFunction(func, args);
493 } 493 }
494 494
495 495
496 bool DartLibraryCalls::IsSendPort(const Instance& send_port) {
497 // Get instance class.
498 const Class& cls = Class::Handle(send_port.clazz());
499 // Get send port class from isolate library.
500 const Library& isolate_lib = Library::Handle(Library::IsolateLibrary());
501 const Class& send_port_cls = Class::Handle(
502 isolate_lib.LookupClassAllowPrivate(Symbols::_SendPortImpl()));
503 // Check for the same class id.
504 ASSERT(!send_port_cls.IsNull());
505 return cls.id() == send_port_cls.id();
506 }
507
496 } // namespace dart 508 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698