| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef RUNTIME_VM_METHOD_RECOGNIZER_H_ | 5 #ifndef RUNTIME_VM_METHOD_RECOGNIZER_H_ |
| 6 #define RUNTIME_VM_METHOD_RECOGNIZER_H_ | 6 #define RUNTIME_VM_METHOD_RECOGNIZER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, Dynamic, \ | 132 V(_HashVMBase, set:_deletedKeys, LinkedHashMap_setDeletedKeys, Dynamic, \ |
| 133 0x5e83ecad) \ | 133 0x5e83ecad) \ |
| 134 V(::, _classRangeCheck, ClassRangeCheck, Bool, 0x16a2fc83) \ | 134 V(::, _classRangeCheck, ClassRangeCheck, Bool, 0x16a2fc83) \ |
| 135 V(::, _classRangeCheckNegative, ClassRangeCheckNegated, Bool, 0x46898c74) \ | 135 V(::, _classRangeCheckNegative, ClassRangeCheckNegated, Bool, 0x46898c74) \ |
| 136 V(::, _classRangeAssert, ClassRangeAssert, Dynamic, 0x3ccbdf6e) \ | 136 V(::, _classRangeAssert, ClassRangeAssert, Dynamic, 0x3ccbdf6e) \ |
| 137 V(::, _classIdEqualsAssert, ClassIdEqualsAssert, Dynamic, 0x4dc80932) \ | 137 V(::, _classIdEqualsAssert, ClassIdEqualsAssert, Dynamic, 0x4dc80932) \ |
| 138 | 138 |
| 139 | 139 |
| 140 // List of intrinsics: | 140 // List of intrinsics: |
| 141 // (class-name, function-name, intrinsification method, fingerprint). | 141 // (class-name, function-name, intrinsification method, fingerprint). |
| 142 #define CORE_LIB_NON_HASH_INTRINSIC_LIST(V) \ | 142 #define CORE_LIB_INTRINSIC_LIST(V) \ |
| 143 V(_Smi, ~, Smi_bitNegate, Smi, 0x6574c6b0) \ | 143 V(_Smi, ~, Smi_bitNegate, Smi, 0x6574c6b0) \ |
| 144 V(_Smi, get:bitLength, Smi_bitLength, Smi, 0x25b356ab) \ | 144 V(_Smi, get:bitLength, Smi_bitLength, Smi, 0x25b356ab) \ |
| 145 V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, Smi, 0x490a4da1) \ | 145 V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, Smi, 0x490a4da1) \ |
| 146 V(_Bigint, _lsh, Bigint_lsh, Dynamic, 0x40d9f1cc) \ | 146 V(_Bigint, _lsh, Bigint_lsh, Dynamic, 0x40d9f1cc) \ |
| 147 V(_Bigint, _rsh, Bigint_rsh, Dynamic, 0x703f1a40) \ | 147 V(_Bigint, _rsh, Bigint_rsh, Dynamic, 0x703f1a40) \ |
| 148 V(_Bigint, _absAdd, Bigint_absAdd, Dynamic, 0x50fb1e47) \ | 148 V(_Bigint, _absAdd, Bigint_absAdd, Dynamic, 0x50fb1e47) \ |
| 149 V(_Bigint, _absSub, Bigint_absSub, Dynamic, 0x2beeb34d) \ | 149 V(_Bigint, _absSub, Bigint_absSub, Dynamic, 0x2beeb34d) \ |
| 150 V(_Bigint, _mulAdd, Bigint_mulAdd, Dynamic, 0x4feffd35) \ | 150 V(_Bigint, _mulAdd, Bigint_mulAdd, Dynamic, 0x4feffd35) \ |
| 151 V(_Bigint, _sqrAdd, Bigint_sqrAdd, Dynamic, 0x1acf0bbe) \ | 151 V(_Bigint, _sqrAdd, Bigint_sqrAdd, Dynamic, 0x1acf0bbe) \ |
| 152 V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, Dynamic, 0x0a2898bb) \ | 152 V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, Dynamic, 0x0a2898bb) \ |
| (...skipping 30 matching lines...) Expand all Loading... |
| 183 V(_OneByteString, get:hashCode, OneByteString_getHashCode, Smi, 0x78c35fe7) \ | 183 V(_OneByteString, get:hashCode, OneByteString_getHashCode, Smi, 0x78c35fe7) \ |
| 184 V(_OneByteString, _substringUncheckedNative, \ | 184 V(_OneByteString, _substringUncheckedNative, \ |
| 185 OneByteString_substringUnchecked, OneByteString, 0x3538ad86) \ | 185 OneByteString_substringUnchecked, OneByteString, 0x3538ad86) \ |
| 186 V(_OneByteString, _setAt, OneByteStringSetAt, Dynamic, 0x7d1b2b10) \ | 186 V(_OneByteString, _setAt, OneByteStringSetAt, Dynamic, 0x7d1b2b10) \ |
| 187 V(_OneByteString, _allocate, OneByteString_allocate, OneByteString, \ | 187 V(_OneByteString, _allocate, OneByteString_allocate, OneByteString, \ |
| 188 0x604ec475) \ | 188 0x604ec475) \ |
| 189 V(_OneByteString, ==, OneByteString_equality, Bool, 0x4719e83f) \ | 189 V(_OneByteString, ==, OneByteString_equality, Bool, 0x4719e83f) \ |
| 190 V(_TwoByteString, ==, TwoByteString_equality, Bool, 0x4719e83f) \ | 190 V(_TwoByteString, ==, TwoByteString_equality, Bool, 0x4719e83f) \ |
| 191 | 191 |
| 192 | 192 |
| 193 #define CORE_LIB_IN_HEADER_HASH_INTRINSIC_LIST(V) \ | |
| 194 V(::, _getHash, Object_getHash, Smi, 0x2827856d) \ | |
| 195 V(::, _setHash, Object_setHash, Object, 0x302d1fe8) \ | |
| 196 | |
| 197 #if defined(HASH_IN_OBJECT_HEADER) | |
| 198 #define CORE_LIB_INTRINSIC_LIST(V) \ | |
| 199 CORE_LIB_NON_HASH_INTRINSIC_LIST(V) \ | |
| 200 CORE_LIB_IN_HEADER_HASH_INTRINSIC_LIST(V) | |
| 201 #else | |
| 202 #define CORE_LIB_INTRINSIC_LIST(V) \ | |
| 203 CORE_LIB_NON_HASH_INTRINSIC_LIST(V) | |
| 204 #endif | |
| 205 | |
| 206 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ | 193 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ |
| 207 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ | 194 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ |
| 208 Dynamic, 0x6a10c54a) \ | 195 Dynamic, 0x6a10c54a) \ |
| 209 V(_IntegerImplementation, +, Integer_add, Dynamic, 0x5125faaa) \ | 196 V(_IntegerImplementation, +, Integer_add, Dynamic, 0x5125faaa) \ |
| 210 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, Dynamic, \ | 197 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, Dynamic, \ |
| 211 0x3fa4b1ed) \ | 198 0x3fa4b1ed) \ |
| 212 V(_IntegerImplementation, -, Integer_sub, Dynamic, 0x0c94540b) \ | 199 V(_IntegerImplementation, -, Integer_sub, Dynamic, 0x0c94540b) \ |
| 213 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ | 200 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ |
| 214 Dynamic, 0x3216e299) \ | 201 Dynamic, 0x3216e299) \ |
| 215 V(_IntegerImplementation, *, Integer_mul, Dynamic, 0x4535624c) \ | 202 V(_IntegerImplementation, *, Integer_mul, Dynamic, 0x4535624c) \ |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 // Class that recognizes factories and returns corresponding result cid. | 581 // Class that recognizes factories and returns corresponding result cid. |
| 595 class FactoryRecognizer : public AllStatic { | 582 class FactoryRecognizer : public AllStatic { |
| 596 public: | 583 public: |
| 597 // Return kDynamicCid if factory is not recognized. | 584 // Return kDynamicCid if factory is not recognized. |
| 598 static intptr_t ResultCid(const Function& factory); | 585 static intptr_t ResultCid(const Function& factory); |
| 599 }; | 586 }; |
| 600 | 587 |
| 601 } // namespace dart | 588 } // namespace dart |
| 602 | 589 |
| 603 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_ | 590 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_ |
| OLD | NEW |