OLD | NEW |
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" |
11 #include "vm/exceptions.h" | 11 #include "vm/exceptions.h" |
| 12 #include "vm/lockers.h" |
12 #include "vm/longjump.h" | 13 #include "vm/longjump.h" |
13 #include "vm/message_handler.h" | 14 #include "vm/message_handler.h" |
14 #include "vm/object.h" | 15 #include "vm/object.h" |
15 #include "vm/object_store.h" | 16 #include "vm/object_store.h" |
16 #include "vm/port.h" | 17 #include "vm/port.h" |
17 #include "vm/resolver.h" | 18 #include "vm/resolver.h" |
18 #include "vm/snapshot.h" | 19 #include "vm/snapshot.h" |
19 #include "vm/symbols.h" | 20 #include "vm/symbols.h" |
20 #include "vm/thread.h" | |
21 | 21 |
22 namespace dart { | 22 namespace dart { |
23 | 23 |
24 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) { | 24 static uint8_t* allocator(uint8_t* ptr, intptr_t old_size, intptr_t new_size) { |
25 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size); | 25 void* new_ptr = realloc(reinterpret_cast<void*>(ptr), new_size); |
26 return reinterpret_cast<uint8_t*>(new_ptr); | 26 return reinterpret_cast<uint8_t*>(new_ptr); |
27 } | 27 } |
28 | 28 |
29 | 29 |
30 DEFINE_NATIVE_ENTRY(CapabilityImpl_factory, 1) { | 30 DEFINE_NATIVE_ENTRY(CapabilityImpl_factory, 1) { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 DEFINE_NATIVE_ENTRY(Isolate_mainPort, 0) { | 262 DEFINE_NATIVE_ENTRY(Isolate_mainPort, 0) { |
263 // The control port is being accessed as a regular port from Dart code. This | 263 // The control port is being accessed as a regular port from Dart code. This |
264 // is most likely due to the _startIsolate code in dart:isolate. Account for | 264 // is most likely due to the _startIsolate code in dart:isolate. Account for |
265 // this by increasing the number of open control ports. | 265 // this by increasing the number of open control ports. |
266 isolate->message_handler()->increment_control_ports(); | 266 isolate->message_handler()->increment_control_ports(); |
267 | 267 |
268 return ReceivePort::New(isolate->main_port()); | 268 return ReceivePort::New(isolate->main_port()); |
269 } | 269 } |
270 | 270 |
271 } // namespace dart | 271 } // namespace dart |
OLD | NEW |