| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.h" | 5 #include "vm/dart.h" |
| 6 | 6 |
| 7 #include "vm/code_observers.h" | 7 #include "vm/code_observers.h" |
| 8 #include "vm/cpu.h" | 8 #include "vm/cpu.h" |
| 9 #include "vm/dart_api_state.h" | 9 #include "vm/dart_api_state.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 private: | 61 private: |
| 62 VMHandles handles_; | 62 VMHandles handles_; |
| 63 LocalHandles api_handles_; | 63 LocalHandles api_handles_; |
| 64 | 64 |
| 65 friend class Dart; | 65 friend class Dart; |
| 66 DISALLOW_COPY_AND_ASSIGN(ReadOnlyHandles); | 66 DISALLOW_COPY_AND_ASSIGN(ReadOnlyHandles); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 | 69 |
| 70 const char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot, | 70 const char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot, |
| 71 const uint8_t* instructions_snapshot, |
| 71 Dart_IsolateCreateCallback create, | 72 Dart_IsolateCreateCallback create, |
| 72 Dart_IsolateInterruptCallback interrupt, | 73 Dart_IsolateInterruptCallback interrupt, |
| 73 Dart_IsolateUnhandledExceptionCallback unhandled, | 74 Dart_IsolateUnhandledExceptionCallback unhandled, |
| 74 Dart_IsolateShutdownCallback shutdown, | 75 Dart_IsolateShutdownCallback shutdown, |
| 75 Dart_FileOpenCallback file_open, | 76 Dart_FileOpenCallback file_open, |
| 76 Dart_FileReadCallback file_read, | 77 Dart_FileReadCallback file_read, |
| 77 Dart_FileWriteCallback file_write, | 78 Dart_FileWriteCallback file_write, |
| 78 Dart_FileCloseCallback file_close, | 79 Dart_FileCloseCallback file_close, |
| 79 Dart_EntropySource entropy_source) { | 80 Dart_EntropySource entropy_source) { |
| 80 // TODO(iposva): Fix race condition here. | 81 // TODO(iposva): Fix race condition here. |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 return predefined_handles_->handles_.IsValidScopedHandle(address); | 381 return predefined_handles_->handles_.IsValidScopedHandle(address); |
| 381 } | 382 } |
| 382 | 383 |
| 383 | 384 |
| 384 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { | 385 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { |
| 385 ASSERT(predefined_handles_ != NULL); | 386 ASSERT(predefined_handles_ != NULL); |
| 386 return predefined_handles_->api_handles_.IsValidHandle(handle); | 387 return predefined_handles_->api_handles_.IsValidHandle(handle); |
| 387 } | 388 } |
| 388 | 389 |
| 389 } // namespace dart | 390 } // namespace dart |
| OLD | NEW |