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 21 matching lines...) Expand all Loading... |
32 kPathsSourceOffset = 2, | 32 kPathsSourceOffset = 2, |
33 kPathsEntryLength = 3 | 33 kPathsEntryLength = 3 |
34 }; | 34 }; |
35 | 35 |
36 | 36 |
37 const char** Bootstrap::profiler_patch_paths_ = NULL; | 37 const char** Bootstrap::profiler_patch_paths_ = NULL; |
38 const char** Bootstrap::typed_data_patch_paths_ = NULL; | 38 const char** Bootstrap::typed_data_patch_paths_ = NULL; |
39 | 39 |
40 | 40 |
41 #define MAKE_PROPERTIES(CamelName, name) \ | 41 #define MAKE_PROPERTIES(CamelName, name) \ |
42 { ObjectStore::k##CamelName, \ | 42 {ObjectStore::k##CamelName, "dart:" #name, Bootstrap::name##_source_paths_, \ |
43 "dart:" #name, \ | 43 "dart:" #name "-patch", Bootstrap::name##_patch_paths_}, |
44 Bootstrap::name##_source_paths_, \ | |
45 "dart:" #name "-patch", \ | |
46 Bootstrap::name##_patch_paths_ \ | |
47 }, | |
48 | 44 |
49 static const BootstrapLibProps bootstrap_libraries[] = { | 45 static const BootstrapLibProps bootstrap_libraries[] = { |
50 FOR_EACH_BOOTSTRAP_LIBRARY(MAKE_PROPERTIES) | 46 FOR_EACH_BOOTSTRAP_LIBRARY(MAKE_PROPERTIES)}; |
51 }; | |
52 | 47 |
53 #undef MAKE_PROPERTIES | 48 #undef MAKE_PROPERTIES |
54 | 49 |
55 | 50 |
56 static const intptr_t kBootstrapLibraryCount = ARRAY_SIZE(bootstrap_libraries); | 51 static const intptr_t kBootstrapLibraryCount = ARRAY_SIZE(bootstrap_libraries); |
57 | 52 |
58 | 53 |
59 static RawString* GetLibrarySourceByIndex(intptr_t index, | 54 static RawString* GetLibrarySourceByIndex(intptr_t index, |
60 const String& uri, | 55 const String& uri, |
61 bool patch) { | 56 bool patch) { |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 lib.SetLoadRequested(); | 325 lib.SetLoadRequested(); |
331 lib.Register(thread); | 326 lib.Register(thread); |
332 isolate->object_store()->set_bootstrap_library(id, lib); | 327 isolate->object_store()->set_bootstrap_library(id, lib); |
333 } | 328 } |
334 } | 329 } |
335 | 330 |
336 return BootstrapFromSource(thread); | 331 return BootstrapFromSource(thread); |
337 } | 332 } |
338 | 333 |
339 } // namespace dart | 334 } // namespace dart |
OLD | NEW |