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

Side by Side Diff: src/objects.h

Issue 12296026: ES6 symbols: Implement Symbol intrinsic and basic functionality (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments Created 7 years, 9 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/macros.py ('k') | src/objects.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 JS_WEAK_MAP_TYPE, 659 JS_WEAK_MAP_TYPE,
660 660
661 JS_REGEXP_TYPE, 661 JS_REGEXP_TYPE,
662 662
663 JS_FUNCTION_TYPE, // LAST_JS_OBJECT_TYPE, LAST_JS_RECEIVER_TYPE 663 JS_FUNCTION_TYPE, // LAST_JS_OBJECT_TYPE, LAST_JS_RECEIVER_TYPE
664 664
665 // Pseudo-types 665 // Pseudo-types
666 FIRST_TYPE = 0x0, 666 FIRST_TYPE = 0x0,
667 LAST_TYPE = JS_FUNCTION_TYPE, 667 LAST_TYPE = JS_FUNCTION_TYPE,
668 INVALID_TYPE = FIRST_TYPE - 1, 668 INVALID_TYPE = FIRST_TYPE - 1,
669 FIRST_NAME_TYPE = FIRST_TYPE,
669 LAST_NAME_TYPE = SYMBOL_TYPE, 670 LAST_NAME_TYPE = SYMBOL_TYPE,
671 FIRST_UNIQUE_NAME_TYPE = INTERNALIZED_STRING_TYPE,
672 LAST_UNIQUE_NAME_TYPE = SYMBOL_TYPE,
670 FIRST_NONSTRING_TYPE = SYMBOL_TYPE, 673 FIRST_NONSTRING_TYPE = SYMBOL_TYPE,
671 // Boundaries for testing for an external array. 674 // Boundaries for testing for an external array.
672 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE, 675 FIRST_EXTERNAL_ARRAY_TYPE = EXTERNAL_BYTE_ARRAY_TYPE,
673 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE, 676 LAST_EXTERNAL_ARRAY_TYPE = EXTERNAL_PIXEL_ARRAY_TYPE,
674 // Boundary for promotion to old data space/old pointer space. 677 // Boundary for promotion to old data space/old pointer space.
675 LAST_DATA_TYPE = FILLER_TYPE, 678 LAST_DATA_TYPE = FILLER_TYPE,
676 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy). 679 // Boundary for objects represented as JSReceiver (i.e. JSObject or JSProxy).
677 // Note that there is no range for JSObject or JSProxy, since their subtypes 680 // Note that there is no range for JSObject or JSProxy, since their subtypes
678 // are not continuous in this enum! The enum ranges instead reflect the 681 // are not continuous in this enum! The enum ranges instead reflect the
679 // external class names, where proxies are treated as either ordinary objects, 682 // external class names, where proxies are treated as either ordinary objects,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 840
838 841
839 #define OBJECT_TYPE_LIST(V) \ 842 #define OBJECT_TYPE_LIST(V) \
840 V(Smi) \ 843 V(Smi) \
841 V(HeapObject) \ 844 V(HeapObject) \
842 V(Number) \ 845 V(Number) \
843 846
844 #define HEAP_OBJECT_TYPE_LIST(V) \ 847 #define HEAP_OBJECT_TYPE_LIST(V) \
845 V(HeapNumber) \ 848 V(HeapNumber) \
846 V(Name) \ 849 V(Name) \
850 V(UniqueName) \
847 V(String) \ 851 V(String) \
848 V(SeqString) \ 852 V(SeqString) \
849 V(ExternalString) \ 853 V(ExternalString) \
850 V(ConsString) \ 854 V(ConsString) \
851 V(SlicedString) \ 855 V(SlicedString) \
852 V(ExternalTwoByteString) \ 856 V(ExternalTwoByteString) \
853 V(ExternalAsciiString) \ 857 V(ExternalAsciiString) \
854 V(SeqTwoByteString) \ 858 V(SeqTwoByteString) \
855 V(SeqOneByteString) \ 859 V(SeqOneByteString) \
856 V(InternalizedString) \ 860 V(InternalizedString) \
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 static Handle<Object> GetElement(Handle<Object> object, uint32_t index); 1021 static Handle<Object> GetElement(Handle<Object> object, uint32_t index);
1018 MUST_USE_RESULT inline MaybeObject* GetElement(uint32_t index); 1022 MUST_USE_RESULT inline MaybeObject* GetElement(uint32_t index);
1019 // For use when we know that no exception can be thrown. 1023 // For use when we know that no exception can be thrown.
1020 inline Object* GetElementNoExceptionThrown(uint32_t index); 1024 inline Object* GetElementNoExceptionThrown(uint32_t index);
1021 MUST_USE_RESULT MaybeObject* GetElementWithReceiver(Object* receiver, 1025 MUST_USE_RESULT MaybeObject* GetElementWithReceiver(Object* receiver,
1022 uint32_t index); 1026 uint32_t index);
1023 1027
1024 // Return the object's prototype (might be Heap::null_value()). 1028 // Return the object's prototype (might be Heap::null_value()).
1025 Object* GetPrototype(); 1029 Object* GetPrototype();
1026 1030
1031 // Return the prototype, or the method holder for a value-like object.
1032 Object* GetDelegate();
1033
1027 // Returns the permanent hash code associated with this object depending on 1034 // Returns the permanent hash code associated with this object depending on
1028 // the actual object type. Might return a failure in case no hash was 1035 // the actual object type. Might return a failure in case no hash was
1029 // created yet or GC was caused by creation. 1036 // created yet or GC was caused by creation.
1030 MUST_USE_RESULT MaybeObject* GetHash(CreationFlag flag); 1037 MUST_USE_RESULT MaybeObject* GetHash(CreationFlag flag);
1031 1038
1032 // Checks whether this object has the same value as the given one. This 1039 // Checks whether this object has the same value as the given one. This
1033 // function is implemented according to ES5, section 9.12 and can be used 1040 // function is implemented according to ES5, section 9.12 and can be used
1034 // to implement the Harmony "egal" function. 1041 // to implement the Harmony "egal" function.
1035 bool SameValue(Object* other); 1042 bool SameValue(Object* other);
1036 1043
(...skipping 7901 matching lines...) Expand 10 before | Expand all | Expand 10 after
8938 } else { 8945 } else {
8939 value &= ~(1 << bit_position); 8946 value &= ~(1 << bit_position);
8940 } 8947 }
8941 return value; 8948 return value;
8942 } 8949 }
8943 }; 8950 };
8944 8951
8945 } } // namespace v8::internal 8952 } } // namespace v8::internal
8946 8953
8947 #endif // V8_OBJECTS_H_ 8954 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/macros.py ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698