| 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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
| 6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
| 7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
| 8 | 8 |
| 9 #include "lib/stacktrace.h" | 9 #include "lib/stacktrace.h" |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 } | 1089 } |
| 1090 const char* last_backslash = strrchr(script_uri, '\\'); | 1090 const char* last_backslash = strrchr(script_uri, '\\'); |
| 1091 if (last_backslash != NULL) { | 1091 if (last_backslash != NULL) { |
| 1092 script_uri = last_backslash + 1; | 1092 script_uri = last_backslash + 1; |
| 1093 } | 1093 } |
| 1094 if (main == NULL) { | 1094 if (main == NULL) { |
| 1095 main = "main"; | 1095 main = "main"; |
| 1096 } | 1096 } |
| 1097 | 1097 |
| 1098 char* chars = NULL; | 1098 char* chars = NULL; |
| 1099 intptr_t len = OS::SNPrint(NULL, 0, "%s$%s", script_uri, main) + 1; | 1099 intptr_t len = OS::SNPrint(NULL, 0, "%s:%s()", script_uri, main) + 1; |
| 1100 chars = reinterpret_cast<char*>(malloc(len)); | 1100 chars = reinterpret_cast<char*>(malloc(len)); |
| 1101 OS::SNPrint(chars, len, "%s$%s", script_uri, main); | 1101 OS::SNPrint(chars, len, "%s:%s()", script_uri, main); |
| 1102 return chars; | 1102 return chars; |
| 1103 } | 1103 } |
| 1104 | 1104 |
| 1105 static Dart_Isolate CreateIsolate(const char* script_uri, | 1105 static Dart_Isolate CreateIsolate(const char* script_uri, |
| 1106 const char* main, | 1106 const char* main, |
| 1107 const uint8_t* snapshot_data, | 1107 const uint8_t* snapshot_data, |
| 1108 const uint8_t* snapshot_instructions, | 1108 const uint8_t* snapshot_instructions, |
| 1109 intptr_t snapshot_length, | 1109 intptr_t snapshot_length, |
| 1110 kernel::Program* kernel_program, | 1110 kernel::Program* kernel_program, |
| 1111 Dart_IsolateFlags* flags, | 1111 Dart_IsolateFlags* flags, |
| (...skipping 5587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6699 #endif | 6699 #endif |
| 6700 } | 6700 } |
| 6701 | 6701 |
| 6702 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { | 6702 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { |
| 6703 #ifndef PRODUCT | 6703 #ifndef PRODUCT |
| 6704 Profiler::DumpStackTrace(context); | 6704 Profiler::DumpStackTrace(context); |
| 6705 #endif | 6705 #endif |
| 6706 } | 6706 } |
| 6707 | 6707 |
| 6708 } // namespace dart | 6708 } // namespace dart |
| OLD | NEW |