| OLD | NEW |
| 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/exceptions.h" | 5 #include "vm/exceptions.h" |
| 6 | 6 |
| 7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 case kFallThrough: | 740 case kFallThrough: |
| 741 library = Library::CoreLibrary(); | 741 library = Library::CoreLibrary(); |
| 742 class_name = &Symbols::FallThroughError(); | 742 class_name = &Symbols::FallThroughError(); |
| 743 constructor_name = &Symbols::DotCreate(); | 743 constructor_name = &Symbols::DotCreate(); |
| 744 break; | 744 break; |
| 745 case kAbstractClassInstantiation: | 745 case kAbstractClassInstantiation: |
| 746 library = Library::CoreLibrary(); | 746 library = Library::CoreLibrary(); |
| 747 class_name = &Symbols::AbstractClassInstantiationError(); | 747 class_name = &Symbols::AbstractClassInstantiationError(); |
| 748 constructor_name = &Symbols::DotCreate(); | 748 constructor_name = &Symbols::DotCreate(); |
| 749 break; | 749 break; |
| 750 case kMirroredCompilationError: | |
| 751 library = Library::MirrorsLibrary(); | |
| 752 class_name = &Symbols::MirroredCompilationError(); | |
| 753 break; | |
| 754 } | 750 } |
| 755 | 751 |
| 756 return DartLibraryCalls::InstanceCreate(library, | 752 return DartLibraryCalls::InstanceCreate(library, |
| 757 *class_name, | 753 *class_name, |
| 758 *constructor_name, | 754 *constructor_name, |
| 759 arguments); | 755 arguments); |
| 760 } | 756 } |
| 761 | 757 |
| 762 | 758 |
| 763 // Throw JavascriptCompatibilityError exception. | 759 // Throw JavascriptCompatibilityError exception. |
| 764 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { | 760 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { |
| 765 const Array& exc_args = Array::Handle(Array::New(1)); | 761 const Array& exc_args = Array::Handle(Array::New(1)); |
| 766 const String& msg_str = String::Handle(String::New(msg)); | 762 const String& msg_str = String::Handle(String::New(msg)); |
| 767 exc_args.SetAt(0, msg_str); | 763 exc_args.SetAt(0, msg_str); |
| 768 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); | 764 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); |
| 769 } | 765 } |
| 770 | 766 |
| 771 } // namespace dart | 767 } // namespace dart |
| OLD | NEW |