| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 va_end(args2); | 207 va_end(args2); |
| 208 | 208 |
| 209 const String& message = String::Handle(String::New(buffer)); | 209 const String& message = String::Handle(String::New(buffer)); |
| 210 const Object& obj = Object::Handle(ApiError::New(message)); | 210 const Object& obj = Object::Handle(ApiError::New(message)); |
| 211 return Api::NewLocalHandle(obj); | 211 return Api::NewLocalHandle(obj); |
| 212 } | 212 } |
| 213 | 213 |
| 214 | 214 |
| 215 // TODO(iposva): This is a placeholder for the eventual external Dart API. | 215 // TODO(iposva): This is a placeholder for the eventual external Dart API. |
| 216 DART_EXPORT bool Dart_Initialize(int argc, | 216 DART_EXPORT bool Dart_Initialize(int argc, |
| 217 char** argv, | 217 const char** argv, |
| 218 Dart_IsolateInitCallback callback) { | 218 Dart_IsolateInitCallback callback) { |
| 219 return Dart::InitOnce(argc, argv, callback); | 219 return Dart::InitOnce(argc, argv, callback); |
| 220 } | 220 } |
| 221 | 221 |
| 222 | 222 |
| 223 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot, | 223 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot, |
| 224 void* data) { | 224 void* data) { |
| 225 Isolate* isolate = Dart::CreateIsolate(); | 225 Isolate* isolate = Dart::CreateIsolate(); |
| 226 ASSERT(isolate != NULL); | 226 ASSERT(isolate != NULL); |
| 227 LongJump* base = isolate->long_jump_base(); | 227 LongJump* base = isolate->long_jump_base(); |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2192 ASSERT(isolate != NULL); | 2192 ASSERT(isolate != NULL); |
| 2193 ApiState* state = isolate->api_state(); | 2193 ApiState* state = isolate->api_state(); |
| 2194 ASSERT(state != NULL); | 2194 ASSERT(state != NULL); |
| 2195 ApiLocalScope* scope = state->top_scope(); | 2195 ApiLocalScope* scope = state->top_scope(); |
| 2196 ASSERT(scope != NULL); | 2196 ASSERT(scope != NULL); |
| 2197 return scope->zone().Reallocate(ptr, old_size, new_size); | 2197 return scope->zone().Reallocate(ptr, old_size, new_size); |
| 2198 } | 2198 } |
| 2199 | 2199 |
| 2200 | 2200 |
| 2201 } // namespace dart | 2201 } // namespace dart |
| OLD | NEW |