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

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

Issue 154393003: Implement eager instantiation and canonicalization of type arguments at run (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 const Object& result = 54 const Object& result =
55 Object::Handle(isolate, DartEntry::InvokeFunction(func, args)); 55 Object::Handle(isolate, DartEntry::InvokeFunction(func, args));
56 if (!result.IsError()) { 56 if (!result.IsError()) {
57 PortMap::SetLive(port_id); 57 PortMap::SetLive(port_id);
58 } 58 }
59 return result.raw(); 59 return result.raw();
60 } 60 }
61 61
62 62
63 DEFINE_NATIVE_ENTRY(RawReceivePortImpl_factory, 1) { 63 DEFINE_NATIVE_ENTRY(RawReceivePortImpl_factory, 1) {
64 ASSERT(AbstractTypeArguments::CheckedHandle( 64 ASSERT(TypeArguments::CheckedHandle(arguments->NativeArgAt(0)).IsNull());
65 arguments->NativeArgAt(0)).IsNull());
66 Dart_Port port_id = 65 Dart_Port port_id =
67 PortMap::CreatePort(arguments->isolate()->message_handler()); 66 PortMap::CreatePort(arguments->isolate()->message_handler());
68 const Object& port = Object::Handle(ReceivePortCreate(port_id)); 67 const Object& port = Object::Handle(ReceivePortCreate(port_id));
69 if (port.IsError()) { 68 if (port.IsError()) {
70 Exceptions::PropagateError(Error::Cast(port)); 69 Exceptions::PropagateError(Error::Cast(port));
71 } 70 }
72 return port.raw(); 71 return port.raw();
73 } 72 }
74 73
75 74
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 244
246 // 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
247 // 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
248 // this by increasing the number of open control ports. 247 // this by increasing the number of open control ports.
249 isolate->message_handler()->increment_control_ports(); 248 isolate->message_handler()->increment_control_ports();
250 249
251 return port.raw(); 250 return port.raw();
252 } 251 }
253 252
254 } // namespace dart 253 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698