| 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 2980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2991 CURRENT_FUNC, url_str.ToCString()); | 2991 CURRENT_FUNC, url_str.ToCString()); |
| 2992 } | 2992 } |
| 2993 Dart_Handle result; | 2993 Dart_Handle result; |
| 2994 CompileSource(isolate, | 2994 CompileSource(isolate, |
| 2995 library, | 2995 library, |
| 2996 url_str, | 2996 url_str, |
| 2997 source_str, | 2997 source_str, |
| 2998 RawScript::kLibrary, | 2998 RawScript::kLibrary, |
| 2999 &result); | 2999 &result); |
| 3000 // Propagate the error out right now. | 3000 // Propagate the error out right now. |
| 3001 if (Dart_IsError(result)) { | 3001 if (::Dart_IsError(result)) { |
| 3002 return result; | 3002 return result; |
| 3003 } | 3003 } |
| 3004 | 3004 |
| 3005 // If this is the dart:builtin library, register it with the VM. | 3005 // If this is the dart:builtin library, register it with the VM. |
| 3006 if (url_str.Equals("dart:builtin")) { | 3006 if (url_str.Equals("dart:builtin")) { |
| 3007 isolate->object_store()->set_builtin_library(library); | 3007 isolate->object_store()->set_builtin_library(library); |
| 3008 const char* msg = CheckIsolateState(isolate); | 3008 const char* msg = CheckIsolateState(isolate); |
| 3009 if (msg != NULL) { | 3009 if (msg != NULL) { |
| 3010 return Api::NewError(msg); | 3010 return Api::NewError(msg); |
| 3011 } | 3011 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3091 *buffer = NULL; | 3091 *buffer = NULL; |
| 3092 } | 3092 } |
| 3093 delete debug_region; | 3093 delete debug_region; |
| 3094 } else { | 3094 } else { |
| 3095 *buffer = NULL; | 3095 *buffer = NULL; |
| 3096 *buffer_size = 0; | 3096 *buffer_size = 0; |
| 3097 } | 3097 } |
| 3098 } | 3098 } |
| 3099 | 3099 |
| 3100 } // namespace dart | 3100 } // namespace dart |
| OLD | NEW |