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

Side by Side Diff: src/objects.h

Issue 6410112: Implement crankshaft support for pixel array loads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ia32 working Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after
3585 set_bit_field2(bit_field2() | (1 << kHasFastElements)); 3585 set_bit_field2(bit_field2() | (1 << kHasFastElements));
3586 } else { 3586 } else {
3587 set_bit_field2(bit_field2() & ~(1 << kHasFastElements)); 3587 set_bit_field2(bit_field2() & ~(1 << kHasFastElements));
3588 } 3588 }
3589 } 3589 }
3590 3590
3591 inline bool has_fast_elements() { 3591 inline bool has_fast_elements() {
3592 return ((1 << kHasFastElements) & bit_field2()) != 0; 3592 return ((1 << kHasFastElements) & bit_field2()) != 0;
3593 } 3593 }
3594 3594
3595 // Tells whether an instance has pixel array elements.
3596 inline void set_has_pixel_array_elements(bool value) {
3597 if (value) {
3598 set_bit_field2(bit_field2() | (1 << kHasPixelArrayElements));
3599 } else {
3600 set_bit_field2(bit_field2() & ~(1 << kHasPixelArrayElements));
3601 }
3602 }
3603
3604 inline bool has_pixel_array_elements() {
3605 return ((1 << kHasPixelArrayElements) & bit_field2()) != 0;
3606 }
3607
3595 // Tells whether the map is attached to SharedFunctionInfo 3608 // Tells whether the map is attached to SharedFunctionInfo
3596 // (for inobject slack tracking). 3609 // (for inobject slack tracking).
3597 inline void set_attached_to_shared_function_info(bool value); 3610 inline void set_attached_to_shared_function_info(bool value);
3598 3611
3599 inline bool attached_to_shared_function_info(); 3612 inline bool attached_to_shared_function_info();
3600 3613
3601 // Tells whether the map is shared between objects that may have different 3614 // Tells whether the map is shared between objects that may have different
3602 // behavior. If true, the map should never be modified, instead a clone 3615 // behavior. If true, the map should never be modified, instead a clone
3603 // should be created and modified. 3616 // should be created and modified.
3604 inline void set_is_shared(bool value); 3617 inline void set_is_shared(bool value);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
3643 // Returns this map if it has the fast elements bit set, otherwise 3656 // Returns this map if it has the fast elements bit set, otherwise
3644 // returns a copy of the map, with all transitions dropped from the 3657 // returns a copy of the map, with all transitions dropped from the
3645 // descriptors and the fast elements bit set. 3658 // descriptors and the fast elements bit set.
3646 MUST_USE_RESULT inline MaybeObject* GetFastElementsMap(); 3659 MUST_USE_RESULT inline MaybeObject* GetFastElementsMap();
3647 3660
3648 // Returns this map if it has the fast elements bit cleared, 3661 // Returns this map if it has the fast elements bit cleared,
3649 // otherwise returns a copy of the map, with all transitions dropped 3662 // otherwise returns a copy of the map, with all transitions dropped
3650 // from the descriptors and the fast elements bit cleared. 3663 // from the descriptors and the fast elements bit cleared.
3651 MUST_USE_RESULT inline MaybeObject* GetSlowElementsMap(); 3664 MUST_USE_RESULT inline MaybeObject* GetSlowElementsMap();
3652 3665
3666 // Returns this map if it has the pixel array elements bit is set, otherwise
3667 // returns a copy of the map, with all transitions dropped from the
3668 // descriptors and the pixel array elements bit set.
3669 MUST_USE_RESULT inline MaybeObject* GetPixelArrayElementsMap();
3670
3653 // Returns the property index for name (only valid for FAST MODE). 3671 // Returns the property index for name (only valid for FAST MODE).
3654 int PropertyIndexFor(String* name); 3672 int PropertyIndexFor(String* name);
3655 3673
3656 // Returns the next free property index (only valid for FAST MODE). 3674 // Returns the next free property index (only valid for FAST MODE).
3657 int NextFreePropertyIndex(); 3675 int NextFreePropertyIndex();
3658 3676
3659 // Returns the number of properties described in instance_descriptors. 3677 // Returns the number of properties described in instance_descriptors.
3660 int NumberOfDescribedProperties(); 3678 int NumberOfDescribedProperties();
3661 3679
3662 // Casting. 3680 // Casting.
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
3761 static const int kHasInstanceCallHandler = 6; 3779 static const int kHasInstanceCallHandler = 6;
3762 static const int kIsAccessCheckNeeded = 7; 3780 static const int kIsAccessCheckNeeded = 7;
3763 3781
3764 // Bit positions for bit field 2 3782 // Bit positions for bit field 2
3765 static const int kIsExtensible = 0; 3783 static const int kIsExtensible = 0;
3766 static const int kFunctionWithPrototype = 1; 3784 static const int kFunctionWithPrototype = 1;
3767 static const int kHasFastElements = 2; 3785 static const int kHasFastElements = 2;
3768 static const int kStringWrapperSafeForDefaultValueOf = 3; 3786 static const int kStringWrapperSafeForDefaultValueOf = 3;
3769 static const int kAttachedToSharedFunctionInfo = 4; 3787 static const int kAttachedToSharedFunctionInfo = 4;
3770 static const int kIsShared = 5; 3788 static const int kIsShared = 5;
3789 static const int kHasPixelArrayElements = 6;
3771 3790
3772 // Layout of the default cache. It holds alternating name and code objects. 3791 // Layout of the default cache. It holds alternating name and code objects.
3773 static const int kCodeCacheEntrySize = 2; 3792 static const int kCodeCacheEntrySize = 2;
3774 static const int kCodeCacheEntryNameOffset = 0; 3793 static const int kCodeCacheEntryNameOffset = 0;
3775 static const int kCodeCacheEntryCodeOffset = 1; 3794 static const int kCodeCacheEntryCodeOffset = 1;
3776 3795
3777 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset, 3796 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset,
3778 kPointerFieldsEndOffset, 3797 kPointerFieldsEndOffset,
3779 kSize> BodyDescriptor; 3798 kSize> BodyDescriptor;
3780 3799
(...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after
6499 } else { 6518 } else {
6500 value &= ~(1 << bit_position); 6519 value &= ~(1 << bit_position);
6501 } 6520 }
6502 return value; 6521 return value;
6503 } 6522 }
6504 }; 6523 };
6505 6524
6506 } } // namespace v8::internal 6525 } } // namespace v8::internal
6507 6526
6508 #endif // V8_OBJECTS_H_ 6527 #endif // V8_OBJECTS_H_
OLDNEW
« src/ia32/lithium-ia32.cc ('K') | « src/ia32/lithium-ia32.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698