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

Unified Diff: runtime/lib/integers.cc

Issue 19106008: Fix for issue 11680 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
Index: runtime/lib/integers.cc
===================================================================
--- runtime/lib/integers.cc (revision 25435)
+++ runtime/lib/integers.cc (working copy)
@@ -9,6 +9,7 @@
#include "vm/exceptions.h"
#include "vm/native_entry.h"
#include "vm/object.h"
+#include "vm/object_store.h"
#include "vm/symbols.h"
namespace dart {
@@ -318,6 +319,17 @@
}
+DEFINE_NATIVE_ENTRY(Mint_shlFromInt, 2) {
+ // Use the preallocated out of memory exception to avoid calling
+ // into dart code or allocating any code.
+ const Instance& exception =
+ Instance::Handle(isolate->object_store()->out_of_memory());
+ Exceptions::Throw(exception);
+ UNREACHABLE();
+ return 0;
+}
+
+
// Bigint natives.
DEFINE_NATIVE_ENTRY(Bigint_bitNegate, 1) {
@@ -328,4 +340,15 @@
return result.AsValidInteger();
}
+
+DEFINE_NATIVE_ENTRY(Bigint_shlFromInt, 2) {
+ // Use the preallocated out of memory exception to avoid calling
+ // into dart code or allocating any code.
+ const Instance& exception =
+ Instance::Handle(isolate->object_store()->out_of_memory());
+ Exceptions::Throw(exception);
+ UNREACHABLE();
+ return 0;
+}
+
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698