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

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

Issue 471283002: Runtime support for evaluation of static field initializer expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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/exceptions.h ('k') | runtime/vm/flow_graph_builder.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/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
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 kCyclicInitializationError:
751 library = Library::CoreLibrary();
752 class_name = &Symbols::CyclicInitializationError();
750 } 753 }
751 754
752 return DartLibraryCalls::InstanceCreate(library, 755 return DartLibraryCalls::InstanceCreate(library,
753 *class_name, 756 *class_name,
754 *constructor_name, 757 *constructor_name,
755 arguments); 758 arguments);
756 } 759 }
757 760
758 761
759 // Throw JavascriptCompatibilityError exception. 762 // Throw JavascriptCompatibilityError exception.
760 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) { 763 void Exceptions::ThrowJavascriptCompatibilityError(const char* msg) {
761 const Array& exc_args = Array::Handle(Array::New(1)); 764 const Array& exc_args = Array::Handle(Array::New(1));
762 const String& msg_str = String::Handle(String::New(msg)); 765 const String& msg_str = String::Handle(String::New(msg));
763 exc_args.SetAt(0, msg_str); 766 exc_args.SetAt(0, msg_str);
764 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args); 767 Exceptions::ThrowByType(Exceptions::kJavascriptCompatibilityError, exc_args);
765 } 768 }
766 769
767 } // namespace dart 770 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698