| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 | 93 |
| 94 RawScript* Bootstrap::LoadScalarlistScript(bool patch) { | 94 RawScript* Bootstrap::LoadScalarlistScript(bool patch) { |
| 95 const char* url = patch ? "dart:scalarlist_patch" : "dart:scalarlist"; | 95 const char* url = patch ? "dart:scalarlist_patch" : "dart:scalarlist"; |
| 96 const char* source = patch ? scalarlist_patch_ : scalarlist_source_; | 96 const char* source = patch ? scalarlist_patch_ : scalarlist_source_; |
| 97 return LoadScript(url, source, patch); | 97 return LoadScript(url, source, patch); |
| 98 } | 98 } |
| 99 | 99 |
| 100 | 100 |
| 101 RawScript* Bootstrap::LoadTypedDataScript(bool patch) { |
| 102 const char* url = patch ? "dart:typeddata_patch" : "dart:typeddata"; |
| 103 const char* source = patch ? typeddata_patch_ : typeddata_source_; |
| 104 return LoadScript(url, source, patch); |
| 105 } |
| 106 |
| 107 |
| 101 RawScript* Bootstrap::LoadUriScript(bool patch) { | 108 RawScript* Bootstrap::LoadUriScript(bool patch) { |
| 102 const char* url = patch ? "dart:uri-patch" : "dart:uri"; | 109 const char* url = patch ? "dart:uri-patch" : "dart:uri"; |
| 103 const char* source = patch ? uri_source_ : uri_source_; | 110 const char* source = patch ? uri_source_ : uri_source_; |
| 104 return LoadScript(url, source, patch); | 111 return LoadScript(url, source, patch); |
| 105 } | 112 } |
| 106 | 113 |
| 107 | 114 |
| 108 RawScript* Bootstrap::LoadUtfScript(bool patch) { | 115 RawScript* Bootstrap::LoadUtfScript(bool patch) { |
| 109 const char* url = patch ? "dart:utf-patch" : "dart:utf"; | 116 const char* url = patch ? "dart:utf-patch" : "dart:utf"; |
| 110 const char* source = patch ? utf_source_ : utf_source_; | 117 const char* source = patch ? utf_source_ : utf_source_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 122 const Error& error = Error::Handle(Compiler::Compile(library, script)); | 129 const Error& error = Error::Handle(Compiler::Compile(library, script)); |
| 123 if (error.IsNull()) { | 130 if (error.IsNull()) { |
| 124 library.SetLoaded(); | 131 library.SetLoaded(); |
| 125 } else { | 132 } else { |
| 126 library.SetLoadError(); | 133 library.SetLoadError(); |
| 127 } | 134 } |
| 128 return error.raw(); | 135 return error.raw(); |
| 129 } | 136 } |
| 130 | 137 |
| 131 } // namespace dart | 138 } // namespace dart |
| OLD | NEW |