Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: runtime/vm/bootstrap.cc

Issue 11274043: Move Arrays, Collections and Maps into a new library, dart:collections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rename collections->collection. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 24 matching lines...) Expand all
35 35
36 36
37 RawScript* Bootstrap::LoadCoreImplScript(bool patch) { 37 RawScript* Bootstrap::LoadCoreImplScript(bool patch) {
38 // TODO(iposva): Use proper library name. 38 // TODO(iposva): Use proper library name.
39 const char* url = patch ? "dart:coreimpl-patch" : "bootstrap_impl"; 39 const char* url = patch ? "dart:coreimpl-patch" : "bootstrap_impl";
40 const char* source = patch ? corelib_impl_patch_ : corelib_impl_source_; 40 const char* source = patch ? corelib_impl_patch_ : corelib_impl_source_;
41 return LoadScript(url, source, patch); 41 return LoadScript(url, source, patch);
42 } 42 }
43 43
44 44
45 RawScript* Bootstrap::LoadCollectionScript(bool patch) {
Ivan Posva 2012/10/26 04:48:17 I thought that the dart:collection library was not
Anders Johnsen 2012/10/26 09:23:15 I'm not sure if we are going to patch it yet. I'll
46 const char* url = patch ? "dart:collection-patch" : "dart:collection";
47 const char* source = patch ? collection_source_ : collection_source_;
48 return LoadScript(url, source, patch);
49 }
50
51
45 RawScript* Bootstrap::LoadMathScript(bool patch) { 52 RawScript* Bootstrap::LoadMathScript(bool patch) {
46 const char* url = patch ? "dart:math-patch" : "dart:math"; 53 const char* url = patch ? "dart:math-patch" : "dart:math";
47 const char* source = patch ? math_patch_ : math_source_; 54 const char* source = patch ? math_patch_ : math_source_;
48 return LoadScript(url, source, patch); 55 return LoadScript(url, source, patch);
49 } 56 }
50 57
51 58
52 RawScript* Bootstrap::LoadIsolateScript(bool patch) { 59 RawScript* Bootstrap::LoadIsolateScript(bool patch) {
53 const char* url = patch ? "dart:isolate-patch" : "dart:isolate"; 60 const char* url = patch ? "dart:isolate-patch" : "dart:isolate";
54 const char* source = patch ? isolate_patch_ : isolate_source_; 61 const char* source = patch ? isolate_patch_ : isolate_source_;
(...skipping 25 matching lines...) Expand all
80 const Error& error = Error::Handle(Compiler::Compile(library, script)); 87 const Error& error = Error::Handle(Compiler::Compile(library, script));
81 if (error.IsNull()) { 88 if (error.IsNull()) {
82 library.SetLoaded(); 89 library.SetLoaded();
83 } else { 90 } else {
84 library.SetLoadError(); 91 library.SetLoadError();
85 } 92 }
86 return error.raw(); 93 return error.raw();
87 } 94 }
88 95
89 } // namespace dart 96 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698