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

Side by Side Diff: runtime/lib/isolate.cc

Issue 196443009: - First step in refactoring ports with the goal of moving (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/include/dart_api.h ('k') | runtime/lib/isolate_patch.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 22 matching lines...) Expand all
33 Function& func = 33 Function& func =
34 Function::Handle(isolate, 34 Function::Handle(isolate,
35 isolate->object_store()->receive_port_create_function()); 35 isolate->object_store()->receive_port_create_function());
36 const int kNumArguments = 1; 36 const int kNumArguments = 1;
37 if (func.IsNull()) { 37 if (func.IsNull()) {
38 Library& isolate_lib = Library::Handle(Library::IsolateLibrary()); 38 Library& isolate_lib = Library::Handle(Library::IsolateLibrary());
39 ASSERT(!isolate_lib.IsNull()); 39 ASSERT(!isolate_lib.IsNull());
40 const String& class_name = 40 const String& class_name =
41 String::Handle(isolate_lib.PrivateName(Symbols::_RawReceivePortImpl())); 41 String::Handle(isolate_lib.PrivateName(Symbols::_RawReceivePortImpl()));
42 const String& function_name = 42 const String& function_name =
43 String::Handle(isolate_lib.PrivateName(Symbols::_get_or_create())); 43 String::Handle(isolate_lib.PrivateName(Symbols::_create()));
44 func = Resolver::ResolveStatic(isolate_lib, 44 func = Resolver::ResolveStatic(isolate_lib,
45 class_name, 45 class_name,
46 function_name, 46 function_name,
47 kNumArguments, 47 kNumArguments,
48 Object::empty_array()); 48 Object::empty_array());
49 ASSERT(!func.IsNull()); 49 ASSERT(!func.IsNull());
50 isolate->object_store()->set_receive_port_create_function(func); 50 isolate->object_store()->set_receive_port_create_function(func);
51 } 51 }
52 const Array& args = Array::Handle(isolate, Array::New(kNumArguments)); 52 const Array& args = Array::Handle(isolate, Array::New(kNumArguments));
53 args.SetAt(0, Integer::Handle(isolate, Integer::New(port_id))); 53 args.SetAt(0, Integer::Handle(isolate, Integer::New(port_id)));
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 // The control port is being accessed as a regular port from Dart code. This 245 // The control port is being accessed as a regular port from Dart code. This
246 // is most likely due to the _startIsolate code in dart:isolate. Account for 246 // is most likely due to the _startIsolate code in dart:isolate. Account for
247 // this by increasing the number of open control ports. 247 // this by increasing the number of open control ports.
248 isolate->message_handler()->increment_control_ports(); 248 isolate->message_handler()->increment_control_ports();
249 249
250 return port.raw(); 250 return port.raw();
251 } 251 }
252 252
253 } // namespace dart 253 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/lib/isolate_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698