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

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

Issue 9316071: Dart_PropagateError, take 2. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « runtime/vm/bootstrap.h ('k') | runtime/vm/bootstrap_nocorelib.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 20 matching lines...) Expand all
31 Heap::kOld)); 31 Heap::kOld));
32 const String& src = String::Handle(String::New(corelib_impl_source_, 32 const String& src = String::Handle(String::New(corelib_impl_source_,
33 Heap::kOld)); 33 Heap::kOld));
34 34
35 const Script& result = 35 const Script& result =
36 Script::Handle(Script::New(url, src, RawScript::kSource)); 36 Script::Handle(Script::New(url, src, RawScript::kSource));
37 return result.raw(); 37 return result.raw();
38 } 38 }
39 39
40 40
41 void Bootstrap::Compile(const Library& library, const Script& script) { 41 RawError* Bootstrap::Compile(const Library& library, const Script& script) {
42 if (FLAG_print_bootstrap) { 42 if (FLAG_print_bootstrap) {
43 OS::Print("Bootstrap source '%s':\n%s\n", 43 OS::Print("Bootstrap source '%s':\n%s\n",
44 String::Handle(script.url()).ToCString(), 44 String::Handle(script.url()).ToCString(),
45 String::Handle(script.source()).ToCString()); 45 String::Handle(script.source()).ToCString());
46 } 46 }
47 library.SetLoadInProgress(); 47 library.SetLoadInProgress();
48 Compiler::Compile(library, script); 48 const Error& error = Error::Handle(Compiler::Compile(library, script));
49 library.SetLoaded(); 49 if (error.IsNull()) {
50 library.SetLoaded();
51 }
52 return error.raw();
50 } 53 }
51 54
52 } // namespace dart 55 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap.h ('k') | runtime/vm/bootstrap_nocorelib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698