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/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
649 // base interfaces and the implementation of the internal classes. | 649 // base interfaces and the implementation of the internal classes. |
650 Error& error = Error::Handle(); | 650 Error& error = Error::Handle(); |
651 error = Bootstrap::Compile(core_lib, script); | 651 error = Bootstrap::Compile(core_lib, script); |
652 if (!error.IsNull()) { | 652 if (!error.IsNull()) { |
653 return error.raw(); | 653 return error.raw(); |
654 } | 654 } |
655 error = Bootstrap::Compile(core_impl_lib, impl_script); | 655 error = Bootstrap::Compile(core_impl_lib, impl_script); |
656 if (!error.IsNull()) { | 656 if (!error.IsNull()) { |
657 return error.raw(); | 657 return error.raw(); |
658 } | 658 } |
659 | 659 // Load other libraries, such as dart:mirrors. |
siva
2012/02/18 01:25:55
Load and compile?
turnidge
2012/03/07 20:00:14
Changed this code to look more like how it is done
| |
660 error = Bootstrap::InitAdditionalLibraries(); | |
661 if (!error.IsNull()) { | |
662 return error.raw(); | |
663 } | |
660 Bootstrap::SetupNativeResolver(); | 664 Bootstrap::SetupNativeResolver(); |
661 | 665 |
662 // Remove the Object superclass cycle by setting the super type to null (not | 666 // Remove the Object superclass cycle by setting the super type to null (not |
663 // to the type of null). | 667 // to the type of null). |
664 cls = object_store->object_class(); | 668 cls = object_store->object_class(); |
665 cls.set_super_type(Type::Handle()); | 669 cls.set_super_type(Type::Handle()); |
666 | 670 |
667 ClassFinalizer::VerifyBootstrapClasses(); | 671 ClassFinalizer::VerifyBootstrapClasses(); |
668 return Error::null(); | 672 return Error::null(); |
669 } | 673 } |
(...skipping 7524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8194 const String& str = String::Handle(pattern()); | 8198 const String& str = String::Handle(pattern()); |
8195 const char* format = "JSRegExp: pattern=%s flags=%s"; | 8199 const char* format = "JSRegExp: pattern=%s flags=%s"; |
8196 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); | 8200 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); |
8197 char* chars = reinterpret_cast<char*>( | 8201 char* chars = reinterpret_cast<char*>( |
8198 Isolate::Current()->current_zone()->Allocate(len + 1)); | 8202 Isolate::Current()->current_zone()->Allocate(len + 1)); |
8199 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); | 8203 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); |
8200 return chars; | 8204 return chars; |
8201 } | 8205 } |
8202 | 8206 |
8203 } // namespace dart | 8207 } // namespace dart |
OLD | NEW |