| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 HEAP_NUMBER_TYPE, | 516 HEAP_NUMBER_TYPE, |
| 517 PROXY_TYPE, | 517 PROXY_TYPE, |
| 518 BYTE_ARRAY_TYPE, | 518 BYTE_ARRAY_TYPE, |
| 519 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE | 519 EXTERNAL_BYTE_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE |
| 520 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, | 520 EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE, |
| 521 EXTERNAL_SHORT_ARRAY_TYPE, | 521 EXTERNAL_SHORT_ARRAY_TYPE, |
| 522 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, | 522 EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE, |
| 523 EXTERNAL_INT_ARRAY_TYPE, | 523 EXTERNAL_INT_ARRAY_TYPE, |
| 524 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, | 524 EXTERNAL_UNSIGNED_INT_ARRAY_TYPE, |
| 525 EXTERNAL_FLOAT_ARRAY_TYPE, | 525 EXTERNAL_FLOAT_ARRAY_TYPE, |
| 526 EXTERNAL_DOUBLE_ARRAY_TYPE, |
| 526 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE | 527 EXTERNAL_PIXEL_ARRAY_TYPE, // LAST_EXTERNAL_ARRAY_TYPE |
| 527 FILLER_TYPE, // LAST_DATA_TYPE | 528 FILLER_TYPE, // LAST_DATA_TYPE |
| 528 | 529 |
| 529 // Structs. | 530 // Structs. |
| 530 ACCESSOR_INFO_TYPE, | 531 ACCESSOR_INFO_TYPE, |
| 531 ACCESS_CHECK_INFO_TYPE, | 532 ACCESS_CHECK_INFO_TYPE, |
| 532 INTERCEPTOR_INFO_TYPE, | 533 INTERCEPTOR_INFO_TYPE, |
| 533 CALL_HANDLER_INFO_TYPE, | 534 CALL_HANDLER_INFO_TYPE, |
| 534 FUNCTION_TEMPLATE_INFO_TYPE, | 535 FUNCTION_TEMPLATE_INFO_TYPE, |
| 535 OBJECT_TEMPLATE_INFO_TYPE, | 536 OBJECT_TEMPLATE_INFO_TYPE, |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 V(SeqAsciiString) \ | 685 V(SeqAsciiString) \ |
| 685 \ | 686 \ |
| 686 V(ExternalArray) \ | 687 V(ExternalArray) \ |
| 687 V(ExternalByteArray) \ | 688 V(ExternalByteArray) \ |
| 688 V(ExternalUnsignedByteArray) \ | 689 V(ExternalUnsignedByteArray) \ |
| 689 V(ExternalShortArray) \ | 690 V(ExternalShortArray) \ |
| 690 V(ExternalUnsignedShortArray) \ | 691 V(ExternalUnsignedShortArray) \ |
| 691 V(ExternalIntArray) \ | 692 V(ExternalIntArray) \ |
| 692 V(ExternalUnsignedIntArray) \ | 693 V(ExternalUnsignedIntArray) \ |
| 693 V(ExternalFloatArray) \ | 694 V(ExternalFloatArray) \ |
| 695 V(ExternalDoubleArray) \ |
| 694 V(ExternalPixelArray) \ | 696 V(ExternalPixelArray) \ |
| 695 V(ByteArray) \ | 697 V(ByteArray) \ |
| 696 V(JSObject) \ | 698 V(JSObject) \ |
| 697 V(JSContextExtensionObject) \ | 699 V(JSContextExtensionObject) \ |
| 698 V(Map) \ | 700 V(Map) \ |
| 699 V(DescriptorArray) \ | 701 V(DescriptorArray) \ |
| 700 V(DeoptimizationInputData) \ | 702 V(DeoptimizationInputData) \ |
| 701 V(DeoptimizationOutputData) \ | 703 V(DeoptimizationOutputData) \ |
| 702 V(FixedArray) \ | 704 V(FixedArray) \ |
| 703 V(Context) \ | 705 V(Context) \ |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 FAST_ELEMENTS, | 1331 FAST_ELEMENTS, |
| 1330 // All the kinds below are "slow". | 1332 // All the kinds below are "slow". |
| 1331 DICTIONARY_ELEMENTS, | 1333 DICTIONARY_ELEMENTS, |
| 1332 EXTERNAL_BYTE_ELEMENTS, | 1334 EXTERNAL_BYTE_ELEMENTS, |
| 1333 EXTERNAL_UNSIGNED_BYTE_ELEMENTS, | 1335 EXTERNAL_UNSIGNED_BYTE_ELEMENTS, |
| 1334 EXTERNAL_SHORT_ELEMENTS, | 1336 EXTERNAL_SHORT_ELEMENTS, |
| 1335 EXTERNAL_UNSIGNED_SHORT_ELEMENTS, | 1337 EXTERNAL_UNSIGNED_SHORT_ELEMENTS, |
| 1336 EXTERNAL_INT_ELEMENTS, | 1338 EXTERNAL_INT_ELEMENTS, |
| 1337 EXTERNAL_UNSIGNED_INT_ELEMENTS, | 1339 EXTERNAL_UNSIGNED_INT_ELEMENTS, |
| 1338 EXTERNAL_FLOAT_ELEMENTS, | 1340 EXTERNAL_FLOAT_ELEMENTS, |
| 1341 EXTERNAL_DOUBLE_ELEMENTS, |
| 1339 EXTERNAL_PIXEL_ELEMENTS | 1342 EXTERNAL_PIXEL_ELEMENTS |
| 1340 }; | 1343 }; |
| 1341 | 1344 |
| 1342 // [properties]: Backing storage for properties. | 1345 // [properties]: Backing storage for properties. |
| 1343 // properties is a FixedArray in the fast case and a Dictionary in the | 1346 // properties is a FixedArray in the fast case and a Dictionary in the |
| 1344 // slow case. | 1347 // slow case. |
| 1345 DECL_ACCESSORS(properties, FixedArray) // Get and set fast properties. | 1348 DECL_ACCESSORS(properties, FixedArray) // Get and set fast properties. |
| 1346 inline void initialize_properties(); | 1349 inline void initialize_properties(); |
| 1347 inline bool HasFastProperties(); | 1350 inline bool HasFastProperties(); |
| 1348 inline StringDictionary* property_dictionary(); // Gets slow properties. | 1351 inline StringDictionary* property_dictionary(); // Gets slow properties. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1370 inline bool HasDictionaryElements(); | 1373 inline bool HasDictionaryElements(); |
| 1371 inline bool HasExternalPixelElements(); | 1374 inline bool HasExternalPixelElements(); |
| 1372 inline bool HasExternalArrayElements(); | 1375 inline bool HasExternalArrayElements(); |
| 1373 inline bool HasExternalByteElements(); | 1376 inline bool HasExternalByteElements(); |
| 1374 inline bool HasExternalUnsignedByteElements(); | 1377 inline bool HasExternalUnsignedByteElements(); |
| 1375 inline bool HasExternalShortElements(); | 1378 inline bool HasExternalShortElements(); |
| 1376 inline bool HasExternalUnsignedShortElements(); | 1379 inline bool HasExternalUnsignedShortElements(); |
| 1377 inline bool HasExternalIntElements(); | 1380 inline bool HasExternalIntElements(); |
| 1378 inline bool HasExternalUnsignedIntElements(); | 1381 inline bool HasExternalUnsignedIntElements(); |
| 1379 inline bool HasExternalFloatElements(); | 1382 inline bool HasExternalFloatElements(); |
| 1383 inline bool HasExternalDoubleElements(); |
| 1380 inline bool AllowsSetElementsLength(); | 1384 inline bool AllowsSetElementsLength(); |
| 1381 inline NumberDictionary* element_dictionary(); // Gets slow elements. | 1385 inline NumberDictionary* element_dictionary(); // Gets slow elements. |
| 1382 // Requires: this->HasFastElements(). | 1386 // Requires: this->HasFastElements(). |
| 1383 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); | 1387 MUST_USE_RESULT inline MaybeObject* EnsureWritableFastElements(); |
| 1384 | 1388 |
| 1385 // Collects elements starting at index 0. | 1389 // Collects elements starting at index 0. |
| 1386 // Undefined values are placed after non-undefined values. | 1390 // Undefined values are placed after non-undefined values. |
| 1387 // Returns the number of non-undefined values. | 1391 // Returns the number of non-undefined values. |
| 1388 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit); | 1392 MUST_USE_RESULT MaybeObject* PrepareElementsForSort(uint32_t limit); |
| 1389 // As PrepareElementsForSort, but only on objects where elements is | 1393 // As PrepareElementsForSort, but only on objects where elements is |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3086 #endif | 3090 #endif |
| 3087 #ifdef DEBUG | 3091 #ifdef DEBUG |
| 3088 void ExternalFloatArrayVerify(); | 3092 void ExternalFloatArrayVerify(); |
| 3089 #endif // DEBUG | 3093 #endif // DEBUG |
| 3090 | 3094 |
| 3091 private: | 3095 private: |
| 3092 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); | 3096 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloatArray); |
| 3093 }; | 3097 }; |
| 3094 | 3098 |
| 3095 | 3099 |
| 3100 class ExternalDoubleArray: public ExternalArray { |
| 3101 public: |
| 3102 // Setter and getter. |
| 3103 inline double get(int index); |
| 3104 inline void set(int index, double value); |
| 3105 |
| 3106 // This accessor applies the correct conversion from Smi, HeapNumber |
| 3107 // and undefined. |
| 3108 MaybeObject* SetValue(uint32_t index, Object* value); |
| 3109 |
| 3110 // Casting. |
| 3111 static inline ExternalDoubleArray* cast(Object* obj); |
| 3112 |
| 3113 #ifdef OBJECT_PRINT |
| 3114 inline void ExternalDoubleArrayPrint() { |
| 3115 ExternalDoubleArrayPrint(stdout); |
| 3116 } |
| 3117 void ExternalDoubleArrayPrint(FILE* out); |
| 3118 #endif // OBJECT_PRINT |
| 3119 #ifdef DEBUG |
| 3120 void ExternalDoubleArrayVerify(); |
| 3121 #endif // DEBUG |
| 3122 |
| 3123 private: |
| 3124 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalDoubleArray); |
| 3125 }; |
| 3126 |
| 3127 |
| 3096 // DeoptimizationInputData is a fixed array used to hold the deoptimization | 3128 // DeoptimizationInputData is a fixed array used to hold the deoptimization |
| 3097 // data for code generated by the Hydrogen/Lithium compiler. It also | 3129 // data for code generated by the Hydrogen/Lithium compiler. It also |
| 3098 // contains information about functions that were inlined. If N different | 3130 // contains information about functions that were inlined. If N different |
| 3099 // functions were inlined then first N elements of the literal array will | 3131 // functions were inlined then first N elements of the literal array will |
| 3100 // contain these functions. | 3132 // contain these functions. |
| 3101 // | 3133 // |
| 3102 // It can be empty. | 3134 // It can be empty. |
| 3103 class DeoptimizationInputData: public FixedArray { | 3135 class DeoptimizationInputData: public FixedArray { |
| 3104 public: | 3136 public: |
| 3105 // Layout description. Indices in the array. | 3137 // Layout description. Indices in the array. |
| (...skipping 3542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6648 } else { | 6680 } else { |
| 6649 value &= ~(1 << bit_position); | 6681 value &= ~(1 << bit_position); |
| 6650 } | 6682 } |
| 6651 return value; | 6683 return value; |
| 6652 } | 6684 } |
| 6653 }; | 6685 }; |
| 6654 | 6686 |
| 6655 } } // namespace v8::internal | 6687 } } // namespace v8::internal |
| 6656 | 6688 |
| 6657 #endif // V8_OBJECTS_H_ | 6689 #endif // V8_OBJECTS_H_ |
| OLD | NEW |