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

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