| Index: runtime/vm/intrinsifier.cc
|
| ===================================================================
|
| --- runtime/vm/intrinsifier.cc (revision 23635)
|
| +++ runtime/vm/intrinsifier.cc (working copy)
|
| @@ -11,8 +11,8 @@
|
| namespace dart {
|
|
|
| DEFINE_FLAG(bool, intrinsify, true, "Instrinsify when possible");
|
| +DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
|
|
|
| -
|
| static bool CompareNames(const Library& lib,
|
| const char* test_name,
|
| const char* name) {
|
| @@ -98,6 +98,7 @@
|
| 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) { \
|
| @@ -117,12 +118,18 @@
|
| func = cls.LookupFunctionAllowPrivate(str); \
|
| } \
|
| ASSERT(!func.IsNull()); \
|
| - func.set_is_intrinsic(true); \
|
| + func.set_is_intrinsic(set_intrinsic); \
|
|
|
| // Set up all core lib functions that can be intrisified.
|
| lib = Library::CoreLibrary();
|
| CORE_LIB_INTRINSIC_LIST(SETUP_FUNCTION);
|
|
|
| + // 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;
|
| +
|
| // Set up all math lib functions that can be intrisified.
|
| lib = Library::MathLibrary();
|
| MATH_LIB_INTRINSIC_LIST(SETUP_FUNCTION);
|
| @@ -153,6 +160,7 @@
|
|
|
| if (lib.raw() == Library::CoreLibrary()) {
|
| CORE_LIB_INTRINSIC_LIST(FIND_INTRINSICS);
|
| + 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()) {
|
|
|