| 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 "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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 } | 786 } |
| 787 const char* last_backslash = strrchr(script_uri, '\\'); | 787 const char* last_backslash = strrchr(script_uri, '\\'); |
| 788 if (last_backslash != NULL) { | 788 if (last_backslash != NULL) { |
| 789 script_uri = last_backslash + 1; | 789 script_uri = last_backslash + 1; |
| 790 } | 790 } |
| 791 if (main == NULL) { | 791 if (main == NULL) { |
| 792 main = "main"; | 792 main = "main"; |
| 793 } | 793 } |
| 794 | 794 |
| 795 char* chars = NULL; | 795 char* chars = NULL; |
| 796 intptr_t len = OS::SNPrint(NULL, 0, "%s/%s", script_uri, main) + 1; | 796 intptr_t len = OS::SNPrint(NULL, 0, "%s$%s", script_uri, main) + 1; |
| 797 chars = reinterpret_cast<char*>(malloc(len)); | 797 chars = reinterpret_cast<char*>(malloc(len)); |
| 798 OS::SNPrint(chars, len, "%s/%s", script_uri, main); | 798 OS::SNPrint(chars, len, "%s$%s", script_uri, main); |
| 799 return chars; | 799 return chars; |
| 800 } | 800 } |
| 801 | 801 |
| 802 | 802 |
| 803 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri, | 803 DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri, |
| 804 const char* main, | 804 const char* main, |
| 805 const uint8_t* snapshot, | 805 const uint8_t* snapshot, |
| 806 void* callback_data, | 806 void* callback_data, |
| 807 char** error) { | 807 char** error) { |
| 808 char* isolate_name = BuildIsolateName(script_uri, main); | 808 char* isolate_name = BuildIsolateName(script_uri, main); |
| (...skipping 3650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4459 } | 4459 } |
| 4460 { | 4460 { |
| 4461 NoGCScope no_gc; | 4461 NoGCScope no_gc; |
| 4462 RawObject* raw_obj = obj.raw(); | 4462 RawObject* raw_obj = obj.raw(); |
| 4463 isolate->heap()->SetPeer(raw_obj, peer); | 4463 isolate->heap()->SetPeer(raw_obj, peer); |
| 4464 } | 4464 } |
| 4465 return Api::Success(isolate); | 4465 return Api::Success(isolate); |
| 4466 } | 4466 } |
| 4467 | 4467 |
| 4468 } // namespace dart | 4468 } // namespace dart |
| OLD | NEW |