| OLD | NEW |
| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 DART_EXPORT Dart_Handle Dart_Error(const char* error) { | 70 DART_EXPORT Dart_Handle Dart_Error(const char* error) { |
| 71 return Api::Error(error); | 71 return Api::Error(error); |
| 72 } | 72 } |
| 73 | 73 |
| 74 | 74 |
| 75 // TODO(iposva): This is a placeholder for the eventual external Dart API. | 75 // TODO(iposva): This is a placeholder for the eventual external Dart API. |
| 76 DART_EXPORT bool Dart_Initialize(int argc, | 76 DART_EXPORT bool Dart_Initialize(int argc, |
| 77 char** argv, | 77 const char** argv, |
| 78 Dart_IsolateInitCallback callback) { | 78 Dart_IsolateInitCallback callback) { |
| 79 return Dart::InitOnce(argc, argv, callback); | 79 return Dart::InitOnce(argc, argv, callback); |
| 80 } | 80 } |
| 81 | 81 |
| 82 | 82 |
| 83 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot, | 83 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot, |
| 84 void* data) { | 84 void* data) { |
| 85 ASSERT(Isolate::Current() == NULL); | 85 ASSERT(Isolate::Current() == NULL); |
| 86 Isolate* isolate = Dart::CreateIsolate(snapshot, data); | 86 Isolate* isolate = Dart::CreateIsolate(snapshot, data); |
| 87 START_TIMER(time_total_runtime); | 87 START_TIMER(time_total_runtime); |
| (...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 ASSERT(isolate != NULL); | 1999 ASSERT(isolate != NULL); |
| 2000 ApiState* state = isolate->api_state(); | 2000 ApiState* state = isolate->api_state(); |
| 2001 ASSERT(state != NULL); | 2001 ASSERT(state != NULL); |
| 2002 ApiLocalScope* scope = state->top_scope(); | 2002 ApiLocalScope* scope = state->top_scope(); |
| 2003 ASSERT(scope != NULL); | 2003 ASSERT(scope != NULL); |
| 2004 return scope->zone().Reallocate(ptr, old_size, new_size); | 2004 return scope->zone().Reallocate(ptr, old_size, new_size); |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 | 2007 |
| 2008 } // namespace dart | 2008 } // namespace dart |
| OLD | NEW |