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

Unified Diff: runtime/vm/intrinsifier.cc

Issue 16398008: Implements checks for 53-bit overflow for x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/vm/intrinsifier.cc
===================================================================
--- runtime/vm/intrinsifier.cc (revision 23640)
+++ runtime/vm/intrinsifier.cc (working copy)
@@ -98,7 +98,6 @@
Function& func = Function::Handle(isolate);
String& str = String::Handle(isolate);
Error& error = Error::Handle(isolate);
- bool set_intrinsic = true;
#define SETUP_FUNCTION(class_name, function_name, destination, fp) \
if (strcmp(#class_name, "::") == 0) { \
@@ -118,7 +117,7 @@
func = cls.LookupFunctionAllowPrivate(str); \
} \
ASSERT(!func.IsNull()); \
- func.set_is_intrinsic(set_intrinsic); \
+ func.set_is_intrinsic(true);
// Set up all core lib functions that can be intrisified.
lib = Library::CoreLibrary();
@@ -126,9 +125,9 @@
// Integer intrinsics are in the core library, but we don't want to intrinsify
// if we are looking for javascript integer overflow.
- set_intrinsic = !FLAG_throw_on_javascript_int_overflow;
- CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION);
- set_intrinsic = true;
+ if (!FLAG_throw_on_javascript_int_overflow) {
+ CORE_INTEGER_LIB_INTRINSIC_LIST(SETUP_FUNCTION);
+ }
// Set up all math lib functions that can be intrisified.
lib = Library::MathLibrary();
@@ -160,7 +159,9 @@
if (lib.raw() == Library::CoreLibrary()) {
CORE_LIB_INTRINSIC_LIST(FIND_INTRINSICS);
- CORE_INTEGER_LIB_INTRINSIC_LIST(FIND_INTRINSICS);
+ if (!FLAG_throw_on_javascript_int_overflow) {
+ CORE_INTEGER_LIB_INTRINSIC_LIST(FIND_INTRINSICS);
+ }
} else if (lib.raw() == Library::TypedDataLibrary()) {
TYPED_DATA_LIB_INTRINSIC_LIST(FIND_INTRINSICS);
} else if (lib.raw() == Library::MathLibrary()) {

Powered by Google App Engine
This is Rietveld 408576698