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

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

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 9 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_api_impl_test.cc ('k') | runtime/vm/isolate_test.cc » ('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/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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 const Object& result = Object::Handle( 195 const Object& result = Object::Handle(
196 DartEntry::InvokeDynamic(left, function, arguments, kNoArgumentNames)); 196 DartEntry::InvokeDynamic(left, function, arguments, kNoArgumentNames));
197 ASSERT(result.IsInstance() || result.IsError()); 197 ASSERT(result.IsInstance() || result.IsError());
198 return result.raw(); 198 return result.raw();
199 } 199 }
200 200
201 201
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 Library& isolate_lib = Library::Handle(Library::IsolateLibrary());
206 ASSERT(!isolate_lib.IsNull());
205 const String& class_name = 207 const String& class_name =
206 String::Handle(String::NewSymbol("ReceivePortImpl")); 208 String::Handle(isolate_lib.PrivateName("_ReceivePortImpl"));
207 const String& function_name = 209 const String& function_name =
208 String::Handle(String::NewSymbol("_handleMessage")); 210 String::Handle(String::NewSymbol("_handleMessage"));
209 const int kNumArguments = 3; 211 const int kNumArguments = 3;
210 const Array& kNoArgumentNames = Array::Handle(); 212 const Array& kNoArgumentNames = Array::Handle();
211 const Function& function = Function::Handle( 213 const Function& function = Function::Handle(
212 Resolver::ResolveStatic(Library::Handle(Library::CoreLibrary()), 214 Resolver::ResolveStatic(isolate_lib,
213 class_name, 215 class_name,
214 function_name, 216 function_name,
215 kNumArguments, 217 kNumArguments,
216 kNoArgumentNames, 218 kNoArgumentNames,
217 Resolver::kIsQualified)); 219 Resolver::kIsQualified));
218 GrowableArray<const Object*> arguments(kNumArguments); 220 GrowableArray<const Object*> arguments(kNumArguments);
219 arguments.Add(&Integer::Handle(Integer::New(dest_port_id))); 221 arguments.Add(&Integer::Handle(Integer::New(dest_port_id)));
220 arguments.Add(&Integer::Handle(Integer::New(reply_port_id))); 222 arguments.Add(&Integer::Handle(Integer::New(reply_port_id)));
221 arguments.Add(&message); 223 arguments.Add(&message);
222 const Object& result = Object::Handle( 224 const Object& result = Object::Handle(
223 DartEntry::InvokeStatic(function, arguments, kNoArgumentNames)); 225 DartEntry::InvokeStatic(function, arguments, kNoArgumentNames));
224 ASSERT(result.IsNull() || result.IsError()); 226 ASSERT(result.IsNull() || result.IsError());
225 return result.raw(); 227 return result.raw();
226 } 228 }
227 229
228 } // namespace dart 230 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698