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

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

Issue 12827018: Add a new implementation of HashMap that uses JS objects for its (multiple) hash tables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Prefer local variable. Created 7 years, 9 months 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 25 matching lines...) Expand all
36 RawScript* Bootstrap::LoadCoreScript(bool patch) { 36 RawScript* Bootstrap::LoadCoreScript(bool patch) {
37 // TODO(iposva): Use proper library name. 37 // TODO(iposva): Use proper library name.
38 const char* url = patch ? "dart:core-patch" : "bootstrap"; 38 const char* url = patch ? "dart:core-patch" : "bootstrap";
39 const char* source = patch ? corelib_patch_ : corelib_source_; 39 const char* source = patch ? corelib_patch_ : corelib_source_;
40 return LoadScript(url, source, patch); 40 return LoadScript(url, source, patch);
41 } 41 }
42 42
43 43
44 RawScript* Bootstrap::LoadCollectionScript(bool patch) { 44 RawScript* Bootstrap::LoadCollectionScript(bool patch) {
45 const char* url = patch ? "dart:collection-patch" : "dart:collection"; 45 const char* url = patch ? "dart:collection-patch" : "dart:collection";
46 const char* source = patch ? collection_source_ : collection_source_; 46 const char* source = patch ? collection_patch_ : collection_source_;
erikcorry 2013/03/22 12:59:24 Strange code is strange.
47 return LoadScript(url, source, patch); 47 return LoadScript(url, source, patch);
48 } 48 }
49 49
50 50
51 RawScript* Bootstrap::LoadCollectionDevScript(bool patch) { 51 RawScript* Bootstrap::LoadCollectionDevScript(bool patch) {
52 const char* url = 52 const char* url =
53 patch ? "dart:_collection-dev-patch" : "dart:_collection-dev"; 53 patch ? "dart:_collection-dev-patch" : "dart:_collection-dev";
54 const char* source = patch ? collection_dev_source_ : collection_dev_source_; 54 const char* source = patch ? collection_dev_source_ : collection_dev_source_;
55 return LoadScript(url, source, patch); 55 return LoadScript(url, source, patch);
56 } 56 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 const Error& error = Error::Handle(Compiler::Compile(library, script)); 129 const Error& error = Error::Handle(Compiler::Compile(library, script));
130 if (error.IsNull()) { 130 if (error.IsNull()) {
131 library.SetLoaded(); 131 library.SetLoaded();
132 } else { 132 } else {
133 library.SetLoadError(); 133 library.SetLoadError();
134 } 134 }
135 return error.raw(); 135 return error.raw();
136 } 136 }
137 137
138 } // namespace dart 138 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698