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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 RawObject* DartLibraryCalls::HandleMessage(Dart_Port dest_port_id, | 202 RawObject* DartLibraryCalls::HandleMessage(Dart_Port dest_port_id, |
203 Dart_Port reply_port_id, | 203 Dart_Port reply_port_id, |
204 const Instance& message) { | 204 const Instance& message) { |
205 const String& class_name = | 205 const String& class_name = |
206 String::Handle(String::NewSymbol("ReceivePortImpl")); | 206 String::Handle(String::NewSymbol("ReceivePortImpl")); |
207 const String& function_name = | 207 const String& function_name = |
208 String::Handle(String::NewSymbol("_handleMessage")); | 208 String::Handle(String::NewSymbol("_handleMessage")); |
209 const int kNumArguments = 3; | 209 const int kNumArguments = 3; |
210 const Array& kNoArgumentNames = Array::Handle(); | 210 const Array& kNoArgumentNames = Array::Handle(); |
211 const Function& function = Function::Handle( | 211 const Function& function = Function::Handle( |
212 Resolver::ResolveStatic(Library::Handle(Library::CoreLibrary()), | 212 Resolver::ResolveStatic(Library::Handle(Library::IsolateLibrary()), |
213 class_name, | 213 class_name, |
214 function_name, | 214 function_name, |
215 kNumArguments, | 215 kNumArguments, |
216 kNoArgumentNames, | 216 kNoArgumentNames, |
217 Resolver::kIsQualified)); | 217 Resolver::kIsQualified)); |
218 GrowableArray<const Object*> arguments(kNumArguments); | 218 GrowableArray<const Object*> arguments(kNumArguments); |
219 arguments.Add(&Integer::Handle(Integer::New(dest_port_id))); | 219 arguments.Add(&Integer::Handle(Integer::New(dest_port_id))); |
220 arguments.Add(&Integer::Handle(Integer::New(reply_port_id))); | 220 arguments.Add(&Integer::Handle(Integer::New(reply_port_id))); |
221 arguments.Add(&message); | 221 arguments.Add(&message); |
222 const Object& result = Object::Handle( | 222 const Object& result = Object::Handle( |
223 DartEntry::InvokeStatic(function, arguments, kNoArgumentNames)); | 223 DartEntry::InvokeStatic(function, arguments, kNoArgumentNames)); |
224 ASSERT(result.IsNull() || result.IsError()); | 224 ASSERT(result.IsNull() || result.IsError()); |
225 return result.raw(); | 225 return result.raw(); |
226 } | 226 } |
227 | 227 |
228 } // namespace dart | 228 } // namespace dart |
OLD | NEW |