| 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 "vm/bootstrap.h" | 5 #include "vm/bootstrap.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/bootstrap_natives.h" | 9 #include "vm/bootstrap_natives.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 if (update_lib_status) { | 147 if (update_lib_status) { |
| 148 library.SetLoadInProgress(); | 148 library.SetLoadInProgress(); |
| 149 } | 149 } |
| 150 const Error& error = Error::Handle(Compiler::Compile(library, script)); | 150 const Error& error = Error::Handle(Compiler::Compile(library, script)); |
| 151 if (update_lib_status) { | 151 if (update_lib_status) { |
| 152 if (error.IsNull()) { | 152 if (error.IsNull()) { |
| 153 library.SetLoaded(); | 153 library.SetLoaded(); |
| 154 } else { | 154 } else { |
| 155 // Compilation errors are not Dart instances, so just mark the library | 155 // Compilation errors are not Dart instances, so just mark the library |
| 156 // as having failed to load without providing an error instance. | 156 // as having failed to load without providing an error instance. |
| 157 library.SetLoadError(Instance::Handle()); | 157 library.SetLoadError(Object::null_instance()); |
| 158 } | 158 } |
| 159 } | 159 } |
| 160 return error.raw(); | 160 return error.raw(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 | 163 |
| 164 static Dart_Handle LoadPartSource(Isolate* isolate, | 164 static Dart_Handle LoadPartSource(Isolate* isolate, |
| 165 const Library& lib, | 165 const Library& lib, |
| 166 const String& uri) { | 166 const String& uri) { |
| 167 const String& part_source = String::Handle( | 167 const String& part_source = String::Handle( |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 Compiler::CompileClass(cls); | 329 Compiler::CompileClass(cls); |
| 330 } | 330 } |
| 331 | 331 |
| 332 // Restore the library tag handler for the isolate. | 332 // Restore the library tag handler for the isolate. |
| 333 isolate->set_library_tag_handler(saved_tag_handler); | 333 isolate->set_library_tag_handler(saved_tag_handler); |
| 334 | 334 |
| 335 return error.raw(); | 335 return error.raw(); |
| 336 } | 336 } |
| 337 | 337 |
| 338 } // namespace dart | 338 } // namespace dart |
| OLD | NEW |