| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 va_end(args2); | 200 va_end(args2); |
| 201 | 201 |
| 202 const String& message = String::Handle(String::New(buffer)); | 202 const String& message = String::Handle(String::New(buffer)); |
| 203 const Object& obj = Object::Handle(ApiError::New(message)); | 203 const Object& obj = Object::Handle(ApiError::New(message)); |
| 204 return Api::NewLocalHandle(obj); | 204 return Api::NewLocalHandle(obj); |
| 205 } | 205 } |
| 206 | 206 |
| 207 | 207 |
| 208 // TODO(iposva): This is a placeholder for the eventual external Dart API. | 208 // TODO(iposva): This is a placeholder for the eventual external Dart API. |
| 209 DART_EXPORT bool Dart_Initialize(int argc, | 209 DART_EXPORT bool Dart_Initialize(int argc, |
| 210 char** argv, | 210 const char** argv, |
| 211 Dart_IsolateInitCallback callback) { | 211 Dart_IsolateInitCallback callback) { |
| 212 return Dart::InitOnce(argc, argv, callback); | 212 return Dart::InitOnce(argc, argv, callback); |
| 213 } | 213 } |
| 214 | 214 |
| 215 | 215 |
| 216 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot, | 216 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const Dart_Snapshot* snapshot, |
| 217 void* data) { | 217 void* data) { |
| 218 Isolate* isolate = Dart::CreateIsolate(); | 218 Isolate* isolate = Dart::CreateIsolate(); |
| 219 ASSERT(isolate != NULL); | 219 ASSERT(isolate != NULL); |
| 220 LongJump* base = isolate->long_jump_base(); | 220 LongJump* base = isolate->long_jump_base(); |
| (...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2133 ASSERT(isolate != NULL); | 2133 ASSERT(isolate != NULL); |
| 2134 ApiState* state = isolate->api_state(); | 2134 ApiState* state = isolate->api_state(); |
| 2135 ASSERT(state != NULL); | 2135 ASSERT(state != NULL); |
| 2136 ApiLocalScope* scope = state->top_scope(); | 2136 ApiLocalScope* scope = state->top_scope(); |
| 2137 ASSERT(scope != NULL); | 2137 ASSERT(scope != NULL); |
| 2138 return scope->zone().Reallocate(ptr, old_size, new_size); | 2138 return scope->zone().Reallocate(ptr, old_size, new_size); |
| 2139 } | 2139 } |
| 2140 | 2140 |
| 2141 | 2141 |
| 2142 } // namespace dart | 2142 } // namespace dart |
| OLD | NEW |