In preparation of inlining remainder and modulo binary Smi operations:

- Add REM token
- Fix checking of function fingerprints.
- Remove unused intrinsic for remainder (the function gets inlined and intrinsic is not generated)

R=hausner@google.com

Review URL: https://codereview.chromium.org//59933004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29929 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
srdjan@google.com 2013-11-05 19:27:46 +00:00
parent d892cb6e92
commit 2b9fad92c7
13 changed files with 190 additions and 298 deletions

View file

@ -59,9 +59,6 @@ static const char* package_root = NULL;
// Global flag that is used to indicate that we want to compile all the
// dart functions and not run anything.
static bool has_compile_all = false;
// Global flag that is used to indicate that we want to check function
// fingerprints.
static bool has_check_function_fingerprints = false;
// Global flag that is used to indicate that we want to print the source code
// for script that is being run.
@ -187,16 +184,6 @@ static bool ProcessCompileAllOption(const char* arg) {
}
static bool ProcessFingerprintedFunctions(const char* arg) {
ASSERT(arg != NULL);
if (*arg != '\0') {
return false;
}
has_check_function_fingerprints = true;
return true;
}
static bool ProcessDebugOption(const char* port) {
// TODO(hausner): Add support for specifying an IP address on which
// the debugger should listen.
@ -298,7 +285,6 @@ static struct {
{ "--debug", ProcessDebugOption },
{ "--snapshot=", ProcessGenScriptSnapshotOption },
{ "--print-script", ProcessPrintScriptOption },
{ "--check-function-fingerprints", ProcessFingerprintedFunctions },
{ "--enable-vm-service", ProcessEnableVmServiceOption },
{ "--trace-debug-protocol", ProcessTraceDebugProtocolOption },
{ NULL, NULL }
@ -912,13 +898,6 @@ int main(int argc, char** argv) {
}
}
if (has_check_function_fingerprints) {
result = Dart_CheckFunctionFingerprints();
if (Dart_IsError(result)) {
return DartErrorExit(result);
}
}
if (Dart_IsNull(root_lib)) {
return ErrorExit(kErrorExitCode,
"Unable to find root library for '%s'\n",

View file

@ -185,10 +185,4 @@ DART_EXPORT Dart_Handle Dart_HeapProfile(Dart_FileWriteCallback callback,
*/
DART_EXPORT Dart_Handle Dart_CompileAll();
/**
* Check that all function fingerprints are OK.
*
*/
DART_EXPORT Dart_Handle Dart_CheckFunctionFingerprints();
#endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */

View file

@ -275,8 +275,8 @@ class _Smi extends _IntegerImplementation implements int {
while (val > 0) {
int digit = val % 10;
reversed[index++] = (digit + 0x30);
val = val ~/ 10;
reversed[index++] = (digit + 0x30);
}
if (negative) reversed[index++] = 0x2D; // '-'.

View file

@ -38,6 +38,8 @@ namespace dart {
DECLARE_FLAG(bool, print_class_table);
DECLARE_FLAG(bool, verify_handles);
DEFINE_FLAG(bool, check_function_fingerprints, false,
"Check function fingerprints");
DEFINE_FLAG(bool, trace_api, false,
"Trace invocation of API calls (debug mode only)");
@ -819,6 +821,9 @@ DART_EXPORT Dart_Isolate Dart_CreateIsolate(const char* script_uri,
Error::Handle(isolate,
Dart::InitializeIsolate(snapshot, callback_data));
if (error_obj.IsNull()) {
if (FLAG_check_function_fingerprints) {
Library::CheckFunctionFingerprints();
}
START_TIMER(time_total_runtime);
return reinterpret_cast<Dart_Isolate>(isolate);
}

View file

@ -29,21 +29,21 @@ class String;
// (factory-name-symbol, result-cid, fingerprint).
// TODO(srdjan): Store the values in the snapshot instead.
#define RECOGNIZED_LIST_FACTORY_LIST(V) \
V(_ListFactory, kArrayCid, 1436567945) \
V(_GrowableListWithData, kGrowableObjectArrayCid, 461305701) \
V(_GrowableListFactory, kGrowableObjectArrayCid, 910639199) \
V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 810750844) \
V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 1246070930) \
V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 1882603960) \
V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 565702275) \
V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 745756560) \
V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 2141385820) \
V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 2076467298) \
V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 1223523117) \
V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 1032112679) \
V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 1863852388) \
V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 1986018007) \
V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 1144749257) \
V(_ListFactory, kArrayCid, 176587978) \
V(_GrowableListWithData, kGrowableObjectArrayCid, 264792196) \
V(_GrowableListFactory, kGrowableObjectArrayCid, 1720763678) \
V(_Int8ArrayFactory, kTypedDataInt8ArrayCid, 545976988) \
V(_Uint8ArrayFactory, kTypedDataUint8ArrayCid, 981297074) \
V(_Uint8ClampedArrayFactory, kTypedDataUint8ClampedArrayCid, 1617830104) \
V(_Int16ArrayFactory, kTypedDataInt16ArrayCid, 300928419) \
V(_Uint16ArrayFactory, kTypedDataUint16ArrayCid, 480982704) \
V(_Int32ArrayFactory, kTypedDataInt32ArrayCid, 1876611964) \
V(_Uint32ArrayFactory, kTypedDataUint32ArrayCid, 1811693442) \
V(_Int64ArrayFactory, kTypedDataInt64ArrayCid, 958749261) \
V(_Uint64ArrayFactory, kTypedDataUint64ArrayCid, 767338823) \
V(_Float64ArrayFactory, kTypedDataFloat64ArrayCid, 1599078532) \
V(_Float32ArrayFactory, kTypedDataFloat32ArrayCid, 1721244151) \
V(_Float32x4ArrayFactory, kTypedDataFloat32x4ArrayCid, 879975401) \
// A class to collect the exits from an inlined function during graph

View file

@ -39,12 +39,12 @@ class Range;
// See intrinsifier for fingerprint computation.
#define RECOGNIZED_LIST(V) \
V(::, identical, ObjectIdentical, 496869842) \
V(Object, ==, ObjectEquals, 180968008) \
V(Object, Object., ObjectConstructor, 1058585294) \
V(Object, get:_cid, ObjectCid, 1498721510) \
V(_List, get:length, ObjectArrayLength, 215153395) \
V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \
V(_TypedList, get:length, TypedDataLength, 26616328) \
V(Object, ==, ObjectEquals, 1068471689) \
V(Object, Object., ObjectConstructor, 1058615085) \
V(Object, get:_cid, ObjectCid, 1498751301) \
V(_List, get:length, ObjectArrayLength, 215183186) \
V(_ImmutableList, get:length, ImmutableArrayLength, 578762861) \
V(_TypedList, get:length, TypedDataLength, 26646119) \
V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \
V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \
V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \
@ -55,27 +55,27 @@ class Range;
V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \
V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \
V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 163795162) \
V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1443265945) \
V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1864204733) \
V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1807419109) \
V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1246454605) \
V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 517505240) \
V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1425812717) \
V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1457395244) \
V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 49127618) \
V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1261559935) \
V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1871750680) \
V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \
V(_GrowableList, get:_capacity, GrowableArrayCapacity, 817090003) \
V(_GrowableList, _setData, GrowableArraySetData, 1375509957) \
V(_GrowableList, _setLength, GrowableArraySetLength, 1227678442) \
V(_StringBase, get:length, StringBaseLength, 1483520063) \
V(_StringBase, get:isEmpty, StringBaseIsEmpty, 879849436) \
V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1793798234) \
V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 67253374) \
V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 10467750) \
V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1596986894) \
V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 868037529) \
V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1776345006) \
V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1807927533) \
V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 399659907) \
V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1612092224) \
V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 74799321) \
V(_GrowableList, get:length, GrowableArrayLength, 1654255033) \
V(_GrowableList, get:_capacity, GrowableArrayCapacity, 817119794) \
V(_GrowableList, _setData, GrowableArraySetData, 970836644) \
V(_GrowableList, _setLength, GrowableArraySetLength, 823005129) \
V(_StringBase, get:length, StringBaseLength, 1483549854) \
V(_StringBase, get:isEmpty, StringBaseIsEmpty, 1599468763) \
V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \
V(_StringBase, [], StringBaseCharAt, 990046076) \
V(_StringBase, _interpolate, StringBaseInterpolate, 1824308855) \
V(_OneByteString, _setAt, OneByteStringSetAt, 308408714) \
V(_IntegerImplementation, toDouble, IntegerToDouble, 2011998508) \
V(_StringBase, [], StringBaseCharAt, 585372763) \
V(_StringBase, _interpolate, StringBaseInterpolate, 2013078843) \
V(_OneByteString, _setAt, OneByteStringSetAt, 658941003) \
V(_IntegerImplementation, toDouble, IntegerToDouble, 1947355341) \
V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \
2095943661) \
V(_Double, toInt, DoubleToInteger, 1328149975) \
@ -87,21 +87,21 @@ class Range;
V(::, sqrt, MathSqrt, 465520247) \
V(::, sin, MathSin, 730107143) \
V(::, cos, MathCos, 1282146521) \
V(::, min, MathMin, 1830216388) \
V(::, max, MathMax, 234565686) \
V(::, _doublePow, MathDoublePow, 1728171041) \
V(Float32x4, Float32x4., Float32x4Constructor, 786169160) \
V(Float32x4, Float32x4.zero, Float32x4Zero, 1589383280) \
V(Float32x4, Float32x4.splat, Float32x4Splat, 62513275) \
V(::, min, MathMin, 1022567780) \
V(::, max, MathMax, 612058870) \
V(::, _doublePow, MathDoublePow, 1591032382) \
V(Float32x4, Float32x4., Float32x4Constructor, 1314950569) \
V(Float32x4, Float32x4.zero, Float32x4Zero, 1432281809) \
V(Float32x4, Float32x4.splat, Float32x4Splat, 1148280442) \
V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, \
1933861675) \
872145194) \
V(_Float32x4, shuffle, Float32x4Shuffle, 1178727105) \
V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 927956119) \
V(_Float32x4, get:x, Float32x4ShuffleX, 1351717838) \
V(_Float32x4, get:y, Float32x4ShuffleY, 217386410) \
V(_Float32x4, get:z, Float32x4ShuffleZ, 2144923721) \
V(_Float32x4, get:w, Float32x4ShuffleW, 1447699119) \
V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198849347) \
V(_Float32x4, get:x, Float32x4ShuffleX, 1351747629) \
V(_Float32x4, get:y, Float32x4ShuffleY, 217416201) \
V(_Float32x4, get:z, Float32x4ShuffleZ, 2144953512) \
V(_Float32x4, get:w, Float32x4ShuffleW, 1447728910) \
V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198879138) \
V(_Float32x4, _cmpequal, Float32x4Equal, 1944929844) \
V(_Float32x4, _cmpgt, Float32x4GreaterThan, 499965951) \
V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1003006845) \
@ -121,66 +121,66 @@ class Range;
V(_Float32x4, withY, Float32x4WithY, 1806065938) \
V(_Float32x4, withZ, Float32x4WithZ, 320659034) \
V(_Float32x4, withW, Float32x4WithW, 1108437255) \
V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 1477593884) \
V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 295910141) \
V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, \
1955567428) \
V(_Int32x4, get:flagX, Int32x4GetFlagX, 729235803) \
V(_Int32x4, get:flagY, Int32x4GetFlagY, 430840849) \
V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 1981076496) \
V(_Int32x4, get:flagW, Int32x4GetFlagW, 629356099) \
V(_Int32x4, get:signMask, Int32x4GetSignMask, 1598787746) \
893850947) \
V(_Int32x4, get:flagX, Int32x4GetFlagX, 729265594) \
V(_Int32x4, get:flagY, Int32x4GetFlagY, 430870640) \
V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 1981106287) \
V(_Int32x4, get:flagW, Int32x4GetFlagW, 629385890) \
V(_Int32x4, get:signMask, Int32x4GetSignMask, 1598817537) \
V(_Int32x4, shuffle, Int32x4Shuffle, 599391160) \
V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 1491641197) \
V(_Int32x4, select, Int32x4Select, 598942806) \
V(_Int32x4, select, Int32x4Select, 194269493) \
V(_Int32x4, withFlagX, Int32x4WithFlagX, 63248661) \
V(_Int32x4, withFlagY, Int32x4WithFlagY, 1498755850) \
V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 457856832) \
V(_Int32x4, withFlagW, Int32x4WithFlagW, 690638779) \
V(_List, [], ObjectArrayGetIndexed, 1079829188) \
V(_List, []=, ObjectArraySetIndexed, 748954698) \
V(_ImmutableList, [], ImmutableArrayGetIndexed, 25983597) \
V(_GrowableList, [], GrowableArrayGetIndexed, 1686777561) \
V(_GrowableList, []=, GrowableArraySetIndexed, 327404102) \
V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \
V(_Float32Array, []=, Float32ArraySetIndexed, 1155155195) \
V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \
V(_Float64Array, []=, Float64ArraySetIndexed, 214271306) \
V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \
V(_Int8Array, []=, Int8ArraySetIndexed, 25452746) \
V(_Uint8Array, [], Uint8ArrayGetIndexed, 502448555) \
V(_Uint8Array, []=, Uint8ArraySetIndexed, 182237960) \
V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 1292893603) \
V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 670971404) \
V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1831383216) \
V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 1660673499) \
V(_List, [], ObjectArrayGetIndexed, 675155875) \
V(_List, []=, ObjectArraySetIndexed, 1228569706) \
V(_ImmutableList, [], ImmutableArrayGetIndexed, 1768793932) \
V(_GrowableList, [], GrowableArrayGetIndexed, 1282104248) \
V(_GrowableList, []=, GrowableArraySetIndexed, 807019110) \
V(_Float32Array, [], Float32ArrayGetIndexed, 1461569776) \
V(_Float32Array, []=, Float32ArraySetIndexed, 1318757370) \
V(_Float64Array, [], Float64ArrayGetIndexed, 1107401598) \
V(_Float64Array, []=, Float64ArraySetIndexed, 377873481) \
V(_Int8Array, [], Int8ArrayGetIndexed, 436208801) \
V(_Int8Array, []=, Int8ArraySetIndexed, 1257450859) \
V(_Uint8Array, [], Uint8ArrayGetIndexed, 738731818) \
V(_Uint8Array, []=, Uint8ArraySetIndexed, 1414236073) \
V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 1529176866) \
V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 1902969517) \
V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 2067666479) \
V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 745187964) \
V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
1831906095) \
2068189358) \
V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \
19235519) \
V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \
V(_Int16Array, []=, Int16ArraySetIndexed, 1182335435) \
V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \
V(_Uint16Array, []=, Uint16ArraySetIndexed, 663508528) \
V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \
V(_Int32Array, []=, Int32ArraySetIndexed, 1515238594) \
V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \
V(_Uint32Array, []=, Uint32ArraySetIndexed, 1980947178) \
V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \
V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1419416331) \
V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 1675579883) \
V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 809970636) \
1251233632) \
V(_Int16Array, [], Int16ArrayGetIndexed, 1428082706) \
V(_Int16Array, []=, Int16ArraySetIndexed, 266849900) \
V(_Uint16Array, [], Uint16ArrayGetIndexed, 1050460407) \
V(_Uint16Array, []=, Uint16ArraySetIndexed, 1895506641) \
V(_Int32Array, [], Int32ArrayGetIndexed, 1023604903) \
V(_Int32Array, []=, Int32ArraySetIndexed, 599753059) \
V(_Uint32Array, [], Uint32ArrayGetIndexed, 1658205989) \
V(_Uint32Array, []=, Uint32ArraySetIndexed, 1065461643) \
V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 2137410088) \
V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1583018506) \
V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 1911863146) \
V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 973572811) \
// A list of core function that should always be inlined.
#define INLINE_WHITE_LIST(V) \
V(_List, get:length, ObjectArrayLength, 215153395) \
V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \
V(_TypedList, get:length, TypedDataLength, 26616328) \
V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \
V(_StringBase, get:length, StringBaseLength, 1483520063) \
V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \
V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \
V(_GrowableList, forEach, GrowableArrayForEach, 1675430533) \
V(_List, get:length, ObjectArrayLength, 215183186) \
V(_ImmutableList, get:length, ImmutableArrayLength, 578762861) \
V(_TypedList, get:length, TypedDataLength, 26646119) \
V(_GrowableList, get:length, GrowableArrayLength, 1654255033) \
V(_StringBase, get:length, StringBaseLength, 1483549854) \
V(ListIterator, moveNext, ListIteratorMoveNext, 881367324) \
V(_GrowableList, get:iterator, GrowableArrayIterator, 1155241039) \
V(_GrowableList, forEach, GrowableArrayForEach, 195359970) \
// A list of core functions that internally dispatch based on received id.
#define POLYMORPHIC_TARGET_LIST(V) \

View file

@ -16,85 +16,84 @@ namespace dart {
// When adding a new function for intrinsification add a 0 as fingerprint,
// build and run to get the correct fingerprint from the mismatch error.
#define CORE_LIB_INTRINSIC_LIST(V) \
V(_Smi, ~, Smi_bitNegate, 692936755) \
V(_Smi, get:bitLength, Smi_bitLength, 383417456) \
V(_Double, >, Double_greaterThan, 1187341070) \
V(_Double, >=, Double_greaterEqualThan, 1770896399) \
V(_Double, <, Double_lessThan, 1238163699) \
V(_Double, <=, Double_lessEqualThan, 467854831) \
V(_Double, ==, Double_equal, 1917937673) \
V(_Double, +, Double_add, 461982313) \
V(_Double, -, Double_sub, 1346226222) \
V(_Double, *, Double_mul, 18608141) \
V(_Double, /, Double_div, 2070118187) \
V(_Double, get:isNaN, Double_getIsNaN, 916566322) \
V(_Double, get:isNegative, Double_getIsNegative, 1711391869) \
V(_Double, _mulFromInteger, Double_mulFromInteger, 1238321808) \
V(_Double, .fromInteger, Double_fromInteger, 82414734) \
V(_List, ., List_Allocate, 1436567945) \
V(_List, get:length, Array_getLength, 215153395) \
V(_List, [], Array_getIndexed, 1079829188) \
V(_List, []=, Array_setIndexed, 748954698) \
V(_GrowableList, .withData, GrowableList_Allocate, 461305701) \
V(_GrowableList, get:length, GrowableList_getLength, 1654225242) \
V(_GrowableList, get:_capacity, GrowableList_getCapacity, 817090003) \
V(_GrowableList, [], GrowableList_getIndexed, 1686777561) \
V(_GrowableList, []=, GrowableList_setIndexed, 327404102) \
V(_GrowableList, _setLength, GrowableList_setLength, 1227678442) \
V(_GrowableList, _setData, GrowableList_setData, 1375509957) \
V(_GrowableList, add, GrowableList_add, 996912766) \
V(_ImmutableList, [], ImmutableList_getIndexed, 25983597) \
V(_ImmutableList, get:length, ImmutableList_getLength, 578733070) \
V(Object, ==, Object_equal, 180968008) \
V(_StringBase, get:hashCode, String_getHashCode, 654543028) \
V(_StringBase, get:isEmpty, String_getIsEmpty, 879849436) \
V(_StringBase, get:length, String_getLength, 1483520063) \
V(_Smi, ~, Smi_bitNegate, 721565906) \
V(_Smi, get:bitLength, Smi_bitLength, 383447247) \
V(_Double, >, Double_greaterThan, 196653614) \
V(_Double, >=, Double_greaterEqualThan, 1420124977) \
V(_Double, <, Double_lessThan, 1368169970) \
V(_Double, <=, Double_lessEqualThan, 117083409) \
V(_Double, ==, Double_equal, 617620743) \
V(_Double, +, Double_add, 1618778505) \
V(_Double, -, Double_sub, 355538766) \
V(_Double, *, Double_mul, 1175404333) \
V(_Double, /, Double_div, 1079430731) \
V(_Double, get:isNaN, Double_getIsNaN, 916596113) \
V(_Double, get:isNegative, Double_getIsNegative, 1711421660) \
V(_Double, _mulFromInteger, Double_mulFromInteger, 1392340623) \
V(_Double, .fromInteger, Double_fromInteger, 2033384877) \
V(_List, ., List_Allocate, 176587978) \
V(_List, get:length, Array_getLength, 215183186) \
V(_List, [], Array_getIndexed, 675155875) \
V(_List, []=, Array_setIndexed, 1228569706) \
V(_GrowableList, .withData, GrowableList_Allocate, 264792196) \
V(_GrowableList, get:length, GrowableList_getLength, 1654255033) \
V(_GrowableList, get:_capacity, GrowableList_getCapacity, 817119794) \
V(_GrowableList, [], GrowableList_getIndexed, 1282104248) \
V(_GrowableList, []=, GrowableList_setIndexed, 807019110) \
V(_GrowableList, _setLength, GrowableList_setLength, 823005129) \
V(_GrowableList, _setData, GrowableList_setData, 970836644) \
V(_GrowableList, add, GrowableList_add, 1667349856) \
V(_ImmutableList, [], ImmutableList_getIndexed, 1768793932) \
V(_ImmutableList, get:length, ImmutableList_getLength, 578762861) \
V(Object, ==, Object_equal, 1068471689) \
V(_StringBase, get:hashCode, String_getHashCode, 654572819) \
V(_StringBase, get:isEmpty, String_getIsEmpty, 1599468763) \
V(_StringBase, get:length, String_getLength, 1483549854) \
V(_StringBase, codeUnitAt, String_codeUnitAt, 1958436584) \
V(_OneByteString, get:hashCode, OneByteString_getHashCode, 1236464016) \
V(_OneByteString, get:hashCode, OneByteString_getHashCode, 1236493807) \
V(_OneByteString, _substringUncheckedNative, \
OneByteString_substringUnchecked, 25652388) \
V(_OneByteString, _setAt, OneByteString_setAt, 308408714) \
V(_OneByteString, _allocate, OneByteString_allocate, 1744068081) \
V(_OneByteString, ==, OneByteString_equality, 1064139944) \
V(_TwoByteString, ==, TwoByteString_equality, 1616855207) \
V(_OneByteString, _setAt, OneByteString_setAt, 658941003) \
V(_OneByteString, _allocate, OneByteString_allocate, 2084097266) \
V(_OneByteString, ==, OneByteString_equality, 1194175975) \
V(_TwoByteString, ==, TwoByteString_equality, 1746891238) \
#define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \
V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \
740884607) \
V(_IntegerImplementation, +, Integer_add, 772815665) \
V(_IntegerImplementation, +, Integer_add, 1875695122) \
V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \
584777821) \
V(_IntegerImplementation, -, Integer_sub, 1938559678) \
V(_IntegerImplementation, -, Integer_sub, 893955487) \
V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \
1757603756) \
V(_IntegerImplementation, *, Integer_mul, 1993715518) \
V(_IntegerImplementation, remainder, Integer_remainder, 1331308305) \
V(_IntegerImplementation, *, Integer_mul, 949111327) \
V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \
1398988805) \
V(_IntegerImplementation, ~/, Integer_truncDivide, 41718791) \
V(_IntegerImplementation, unary-, Integer_negate, 341268208) \
V(_IntegerImplementation, ~/, Integer_truncDivide, 1011141318) \
V(_IntegerImplementation, unary-, Integer_negate, 145678255) \
V(_IntegerImplementation, _bitAndFromInteger, \
Integer_bitAndFromInteger, 512285096) \
V(_IntegerImplementation, &, Integer_bitAnd, 1735910176) \
V(_IntegerImplementation, &, Integer_bitAnd, 691305985) \
V(_IntegerImplementation, _bitOrFromInteger, \
Integer_bitOrFromInteger, 333543947) \
V(_IntegerImplementation, |, Integer_bitOr, 1120891571) \
V(_IntegerImplementation, |, Integer_bitOr, 76287380) \
V(_IntegerImplementation, _bitXorFromInteger, \
Integer_bitXorFromInteger, 1746295953) \
V(_IntegerImplementation, ^, Integer_bitXor, 21793459) \
V(_IntegerImplementation, ^, Integer_bitXor, 1124672916) \
V(_IntegerImplementation, \
_greaterThanFromInteger, \
Integer_greaterThanFromInt, 1883218996) \
V(_IntegerImplementation, >, Integer_greaterThan, 253817845) \
V(_IntegerImplementation, ==, Integer_equal, 1899239372) \
V(_IntegerImplementation, >, Integer_greaterThan, 1356697302) \
V(_IntegerImplementation, ==, Integer_equal, 1631095021) \
V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \
111745915) \
V(_IntegerImplementation, <, Integer_lessThan, 1393706801) \
V(_IntegerImplementation, <=, Integer_lessEqualThan, 1022701101) \
V(_IntegerImplementation, >=, Integer_greaterEqualThan, 178259021) \
V(_IntegerImplementation, <<, Integer_shl, 1566363602) \
V(_IntegerImplementation, >>, Integer_sar, 1845114891) \
V(_IntegerImplementation, <, Integer_lessThan, 1523713072) \
V(_IntegerImplementation, <=, Integer_lessEqualThan, 671929679) \
V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1974971247) \
V(_IntegerImplementation, <<, Integer_shl, 521759411) \
V(_IntegerImplementation, >>, Integer_sar, 800510700) \
V(_Double, toInt, Double_toInt, 1328149975)
@ -102,37 +101,37 @@ namespace dart {
V(::, sqrt, Math_sqrt, 465520247) \
V(::, sin, Math_sin, 730107143) \
V(::, cos, Math_cos, 1282146521) \
V(_Random, _nextState, Random_nextState, 1145672271) \
V(_Random, _nextState, Random_nextState, 1174301422) \
#define TYPED_DATA_LIB_INTRINSIC_LIST(V) \
V(_TypedList, get:length, TypedData_getLength, 26616328) \
V(_Int8Array, _new, TypedData_Int8Array_new, 1825804665) \
V(_Uint8Array, _new, TypedData_Uint8Array_new, 1778042338) \
V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 568753997) \
V(_Int16Array, _new, TypedData_Int16Array_new, 82856584) \
V(_Uint16Array, _new, TypedData_Uint16Array_new, 1061515393) \
V(_Int32Array, _new, TypedData_Int32Array_new, 2011561738) \
V(_Uint32Array, _new, TypedData_Uint32Array_new, 601429759) \
V(_Int64Array, _new, TypedData_Int64Array_new, 682666769) \
V(_Uint64Array, _new, TypedData_Uint64Array_new, 388094865) \
V(_Float32Array, _new, TypedData_Float32Array_new, 1931183334) \
V(_Float64Array, _new, TypedData_Float64Array_new, 2119419798) \
V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 435301615) \
V(_Int32x4Array, _new, TypedData_Int32x4Array_new, 1734048395) \
V(_Int8Array, ., TypedData_Int8Array_factory, 810750844) \
V(_Uint8Array, ., TypedData_Uint8Array_factory, 1246070930) \
V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 1882603960) \
V(_Int16Array, ., TypedData_Int16Array_factory, 565702275) \
V(_Uint16Array, ., TypedData_Uint16Array_factory, 745756560) \
V(_Int32Array, ., TypedData_Int32Array_factory, 2141385820) \
V(_Uint32Array, ., TypedData_Uint32Array_factory, 2076467298) \
V(_Int64Array, ., TypedData_Int64Array_factory, 1223523117) \
V(_Uint64Array, ., TypedData_Uint64Array_factory, 1032112679) \
V(_Float32Array, ., TypedData_Float32Array_factory, 1986018007) \
V(_Float64Array, ., TypedData_Float64Array_factory, 1863852388) \
V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 1144749257) \
V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 1189356537) \
V(_TypedList, get:length, TypedData_getLength, 26646119) \
V(_Int8Array, _new, TypedData_Int8Array_new, 18350202) \
V(_Uint8Array, _new, TypedData_Uint8Array_new, 2118071523) \
V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 908783182) \
V(_Int16Array, _new, TypedData_Int16Array_new, 422885769) \
V(_Uint16Array, _new, TypedData_Uint16Array_new, 1401544578) \
V(_Int32Array, _new, TypedData_Int32Array_new, 204107275) \
V(_Uint32Array, _new, TypedData_Uint32Array_new, 941458944) \
V(_Int64Array, _new, TypedData_Int64Array_new, 1022695954) \
V(_Uint64Array, _new, TypedData_Uint64Array_new, 728124050) \
V(_Float32Array, _new, TypedData_Float32Array_new, 123728871) \
V(_Float64Array, _new, TypedData_Float64Array_new, 311965335) \
V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 775330800) \
V(_Int32x4Array, _new, TypedData_Int32x4Array_new, 2074077580) \
V(_Int8Array, ., TypedData_Int8Array_factory, 545976988) \
V(_Uint8Array, ., TypedData_Uint8Array_factory, 981297074) \
V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 1617830104) \
V(_Int16Array, ., TypedData_Int16Array_factory, 300928419) \
V(_Uint16Array, ., TypedData_Uint16Array_factory, 480982704) \
V(_Int32Array, ., TypedData_Int32Array_factory, 1876611964) \
V(_Uint32Array, ., TypedData_Uint32Array_factory, 1811693442) \
V(_Int64Array, ., TypedData_Int64Array_factory, 958749261) \
V(_Uint64Array, ., TypedData_Uint64Array_factory, 767338823) \
V(_Float32Array, ., TypedData_Float32Array_factory, 1721244151) \
V(_Float64Array, ., TypedData_Float64Array_factory, 1599078532) \
V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 879975401) \
V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 924582681) \
// TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and

View file

@ -723,24 +723,6 @@ void Intrinsifier::Integer_moduloFromInteger(Assembler* assembler) {
}
void Intrinsifier::Integer_remainder(Assembler* assembler) {
// Check to see if we have integer division
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through);
// R1: Tagged left (dividend).
// R0: Tagged right (divisor).
// Check if modulo by zero -> exception thrown in main function.
__ cmp(R0, ShifterOperand(0));
__ b(&fall_through, EQ);
EmitRemainderOperation(assembler);
// Untagged remainder result in R1.
__ mov(R0, ShifterOperand(R1, LSL, 1)); // Tag result and return.
__ Ret();
__ Bind(&fall_through);
}
void Intrinsifier::Integer_truncDivide(Assembler* assembler) {
// Check to see if we have integer division
Label fall_through;

View file

@ -730,27 +730,6 @@ void Intrinsifier::Integer_moduloFromInteger(Assembler* assembler) {
}
void Intrinsifier::Integer_remainder(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through);
// EAX: right argument (divisor)
__ movl(EBX, EAX);
__ movl(EAX, Address(ESP, + 2 * kWordSize)); // Left argument (dividend).
// EAX: Tagged left (dividend).
// EBX: Tagged right (divisor).
// Check if modulo by zero -> exception thrown in main function.
__ cmpl(EBX, Immediate(0));
__ j(EQUAL, &fall_through, Assembler::kNearJump);
EmitRemainderOperation(assembler);
// Untagged remainder result in EDX.
__ movl(EAX, EDX);
__ SmiTag(EAX);
__ ret();
__ Bind(&fall_through);
}
void Intrinsifier::Integer_truncDivide(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through);

View file

@ -736,24 +736,6 @@ void Intrinsifier::Integer_moduloFromInteger(Assembler* assembler) {
}
void Intrinsifier::Integer_remainder(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through);
// T1: Tagged left (dividend).
// T0: Tagged right (divisor).
// Check if modulo by zero -> exception thrown in main function.
__ beq(T0, ZR, &fall_through);
EmitRemainderOperation(assembler);
// Untagged right in T0. Untagged remainder result in V0.
__ Ret();
__ delay_slot()->SmiTag(V0);
__ Bind(&fall_through);
}
void Intrinsifier::Integer_truncDivide(Assembler* assembler) {
Label fall_through;

View file

@ -712,24 +712,6 @@ void Intrinsifier::Integer_moduloFromInteger(Assembler* assembler) {
}
void Intrinsifier::Integer_remainder(Assembler* assembler) {
Label fall_through;
TestBothArgumentsSmis(assembler, &fall_through);
// RAX: right argument (divisor)
__ movq(RCX, RAX);
__ movq(RAX, Address(RSP, + 2 * kWordSize)); // Left argument (dividend).
// RAX: Tagged left (dividend).
// RCX: Tagged right (divisor).
__ cmpq(RCX, Immediate(0));
__ j(EQUAL, &fall_through);
EmitRemainderOperation(assembler);
// Untagged remainder result in RAX.
__ SmiTag(RAX);
__ ret();
__ Bind(&fall_through);
}
void Intrinsifier::Integer_truncDivide(Assembler* assembler) {
Label fall_through, not_32bit;
TestBothArgumentsSmis(assembler, &fall_through);

View file

@ -120,17 +120,4 @@ DART_EXPORT Dart_Handle Dart_CompileAll() {
return result;
}
DART_EXPORT Dart_Handle Dart_CheckFunctionFingerprints() {
Isolate* isolate = Isolate::Current();
DARTSCOPE(isolate);
Dart_Handle result = Api::CheckIsolateState(isolate);
if (::Dart_IsError(result)) {
return result;
}
CHECK_CALLBACK_STATE(isolate);
Library::CheckFunctionFingerprints();
return result;
}
} // namespace dart

View file

@ -131,6 +131,9 @@ namespace dart {
\
/* Support for Dart scripts. */ \
TOK(kSCRIPTTAG, "#!", 0, kNoAttribute) \
\
/* Support for optimized code */ \
TOK(kREM, "", 0, kNoAttribute) \
// List of keywords. The list must be alphabetically ordered. The
// keyword recognition code depends on the ordering.