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

Side by Side Diff: src/objects.h

Issue 545116: Added Extensible property to objects and made methods for extracting and sett... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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 | « no previous file | src/runtime.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 2871 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 2882
2883 // Tells whether the instance has a call-as-function handler. 2883 // Tells whether the instance has a call-as-function handler.
2884 inline void set_has_instance_call_handler() { 2884 inline void set_has_instance_call_handler() {
2885 set_bit_field(bit_field() | (1 << kHasInstanceCallHandler)); 2885 set_bit_field(bit_field() | (1 << kHasInstanceCallHandler));
2886 } 2886 }
2887 2887
2888 inline bool has_instance_call_handler() { 2888 inline bool has_instance_call_handler() {
2889 return ((1 << kHasInstanceCallHandler) & bit_field()) != 0; 2889 return ((1 << kHasInstanceCallHandler) & bit_field()) != 0;
2890 } 2890 }
2891 2891
2892 inline void set_is_extensible() {
2893 set_bit_field2(bit_field2() | (1 << kIsExtensible));
2894 }
2895
2896 inline bool is_extensible() {
2897 return ((1 << kIsExtensible) & bit_field2()) != 0;
2898 }
2899
2892 // Tells whether the instance needs security checks when accessing its 2900 // Tells whether the instance needs security checks when accessing its
2893 // properties. 2901 // properties.
2894 inline void set_is_access_check_needed(bool access_check_needed); 2902 inline void set_is_access_check_needed(bool access_check_needed);
2895 inline bool is_access_check_needed(); 2903 inline bool is_access_check_needed();
2896 2904
2897 // [prototype]: implicit prototype object. 2905 // [prototype]: implicit prototype object.
2898 DECL_ACCESSORS(prototype, Object) 2906 DECL_ACCESSORS(prototype, Object)
2899 2907
2900 // [constructor]: points back to the function responsible for this map. 2908 // [constructor]: points back to the function responsible for this map.
2901 DECL_ACCESSORS(constructor, Object) 2909 DECL_ACCESSORS(constructor, Object)
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 static const int kHasNonInstancePrototype = 1; 3007 static const int kHasNonInstancePrototype = 1;
3000 static const int kIsHiddenPrototype = 2; 3008 static const int kIsHiddenPrototype = 2;
3001 static const int kHasNamedInterceptor = 3; 3009 static const int kHasNamedInterceptor = 3;
3002 static const int kHasIndexedInterceptor = 4; 3010 static const int kHasIndexedInterceptor = 4;
3003 static const int kIsUndetectable = 5; 3011 static const int kIsUndetectable = 5;
3004 static const int kHasInstanceCallHandler = 6; 3012 static const int kHasInstanceCallHandler = 6;
3005 static const int kIsAccessCheckNeeded = 7; 3013 static const int kIsAccessCheckNeeded = 7;
3006 3014
3007 // Bit positions for bit field 2 3015 // Bit positions for bit field 2
3008 static const int kNeedsLoading = 0; 3016 static const int kNeedsLoading = 0;
3017 static const int kIsExtensible = 1;
3009 3018
3010 private: 3019 private:
3011 DISALLOW_IMPLICIT_CONSTRUCTORS(Map); 3020 DISALLOW_IMPLICIT_CONSTRUCTORS(Map);
3012 }; 3021 };
3013 3022
3014 3023
3015 // An abstract superclass, a marker class really, for simple structure classes. 3024 // An abstract superclass, a marker class really, for simple structure classes.
3016 // It doesn't carry much functionality but allows struct classes to me 3025 // It doesn't carry much functionality but allows struct classes to me
3017 // identified in the type system. 3026 // identified in the type system.
3018 class Struct: public HeapObject { 3027 class Struct: public HeapObject {
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
4951 } else { 4960 } else {
4952 value &= ~(1 << bit_position); 4961 value &= ~(1 << bit_position);
4953 } 4962 }
4954 return value; 4963 return value;
4955 } 4964 }
4956 }; 4965 };
4957 4966
4958 } } // namespace v8::internal 4967 } } // namespace v8::internal
4959 4968
4960 #endif // V8_OBJECTS_H_ 4969 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698