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/code_generator.h" | 7 #include "vm/code_generator.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/object_store.h" | 9 #include "vm/object_store.h" |
10 #include "vm/resolver.h" | 10 #include "vm/resolver.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 arguments, | 104 arguments, |
105 arguments_descriptor); | 105 arguments_descriptor); |
106 } | 106 } |
107 | 107 |
108 | 108 |
109 RawObject* DartEntry::InvokeNoSuchMethod(const Instance& receiver, | 109 RawObject* DartEntry::InvokeNoSuchMethod(const Instance& receiver, |
110 const String& target_name, | 110 const String& target_name, |
111 const Array& arguments, | 111 const Array& arguments, |
112 const Array& arguments_descriptor) { | 112 const Array& arguments_descriptor) { |
113 ASSERT(receiver.raw() == arguments.At(0)); | 113 ASSERT(receiver.raw() == arguments.At(0)); |
114 // Allocate an InvocationMirror object. | 114 // Allocate an Invocation object. |
115 const Library& core_lib = Library::Handle(Library::CoreLibrary()); | 115 const Library& core_lib = Library::Handle(Library::CoreLibrary()); |
116 | 116 |
117 Class& invocation_mirror_class = Class::Handle( | 117 Class& invocation_mirror_class = Class::Handle( |
118 core_lib.LookupClass( | 118 core_lib.LookupClass( |
119 String::Handle(core_lib.PrivateName(Symbols::InvocationMirror())))); | 119 String::Handle(core_lib.PrivateName(Symbols::InvocationMirror())))); |
120 ASSERT(!invocation_mirror_class.IsNull()); | 120 ASSERT(!invocation_mirror_class.IsNull()); |
121 const String& function_name = | 121 const String& function_name = |
122 String::Handle(core_lib.PrivateName(Symbols::AllocateInvocationMirror())); | 122 String::Handle(core_lib.PrivateName(Symbols::AllocateInvocationMirror())); |
123 const Function& allocation_function = Function::Handle( | 123 const Function& allocation_function = Function::Handle( |
124 Resolver::ResolveStaticByName(invocation_mirror_class, | 124 Resolver::ResolveStaticByName(invocation_mirror_class, |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 String::Handle(Field::GetterName(Symbols::_id())))); | 473 String::Handle(Field::GetterName(Symbols::_id())))); |
474 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); | 474 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); |
475 ASSERT(!func.IsNull()); | 475 ASSERT(!func.IsNull()); |
476 const Array& args = Array::Handle(Array::New(1)); | 476 const Array& args = Array::Handle(Array::New(1)); |
477 args.SetAt(0, port); | 477 args.SetAt(0, port); |
478 return DartEntry::InvokeFunction(func, args); | 478 return DartEntry::InvokeFunction(func, args); |
479 } | 479 } |
480 | 480 |
481 | 481 |
482 } // namespace dart | 482 } // namespace dart |
OLD | NEW |