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

Unified Diff: runtime/vm/exceptions.cc

Issue 2708213004: Introduce a flag --limit-ints-to-64-bits in the VM in order to investigate the (Closed)
Patch Set: work in progress Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/flag_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 8823362a0ba4653ec8aeaae70577f2b6b47ae342..0ee20ad2f34ddbf796c25f926172cf0440938d47 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -719,6 +719,13 @@ void Exceptions::ThrowRangeError(const char* argument_name,
}
+void Exceptions::ThrowRangeErrorMsg(const char* msg) {
+ const Array& args = Array::Handle(Array::New(1));
+ args.SetAt(0, String::Handle(String::New(msg)));
+ Exceptions::ThrowByType(Exceptions::kRangeMsg, args);
+}
+
+
void Exceptions::ThrowCompileTimeError(const LanguageError& error) {
const Array& args = Array::Handle(Array::New(1));
args.SetAt(0, String::Handle(error.FormatMessage()));
@@ -741,6 +748,11 @@ RawObject* Exceptions::Create(ExceptionType type, const Array& arguments) {
class_name = &Symbols::RangeError();
constructor_name = &Symbols::DotRange();
break;
+ case kRangeMsg:
+ library = Library::CoreLibrary();
+ class_name = &Symbols::RangeError();
+ constructor_name = &Symbols::Dot();
+ break;
case kArgument:
library = Library::CoreLibrary();
class_name = &Symbols::ArgumentError();
« no previous file with comments | « runtime/vm/exceptions.h ('k') | runtime/vm/flag_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698