| 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/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 RawScript* Bootstrap::LoadIsolateScript(bool patch) { | 66 RawScript* Bootstrap::LoadIsolateScript(bool patch) { |
| 67 const char* url = patch ? "dart:isolate-patch" : "dart:isolate"; | 67 const char* url = patch ? "dart:isolate-patch" : "dart:isolate"; |
| 68 const char* source = patch ? isolate_patch_ : isolate_source_; | 68 const char* source = patch ? isolate_patch_ : isolate_source_; |
| 69 return LoadScript(url, source, patch); | 69 return LoadScript(url, source, patch); |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 RawScript* Bootstrap::LoadJsonScript(bool patch) { | 73 RawScript* Bootstrap::LoadJsonScript(bool patch) { |
| 74 const char* url = patch ? "dart:json-patch" : "dart:json"; | 74 const char* url = patch ? "dart:json-patch" : "dart:json"; |
| 75 const char* source = patch ? json_source_ : json_source_; | 75 const char* source = patch ? json_patch_ : json_source_; |
| 76 return LoadScript(url, source, patch); | 76 return LoadScript(url, source, patch); |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 RawScript* Bootstrap::LoadMathScript(bool patch) { | 80 RawScript* Bootstrap::LoadMathScript(bool patch) { |
| 81 const char* url = patch ? "dart:math-patch" : "dart:math"; | 81 const char* url = patch ? "dart:math-patch" : "dart:math"; |
| 82 const char* source = patch ? math_patch_ : math_source_; | 82 const char* source = patch ? math_patch_ : math_source_; |
| 83 return LoadScript(url, source, patch); | 83 return LoadScript(url, source, patch); |
| 84 } | 84 } |
| 85 | 85 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const Error& error = Error::Handle(Compiler::Compile(library, script)); | 122 const Error& error = Error::Handle(Compiler::Compile(library, script)); |
| 123 if (error.IsNull()) { | 123 if (error.IsNull()) { |
| 124 library.SetLoaded(); | 124 library.SetLoaded(); |
| 125 } else { | 125 } else { |
| 126 library.SetLoadError(); | 126 library.SetLoadError(); |
| 127 } | 127 } |
| 128 return error.raw(); | 128 return error.raw(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace dart | 131 } // namespace dart |
| OLD | NEW |