OLD | NEW |
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 6801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6812 // This is like GetProperty, but is used when you know the lookup won't fail | 6812 // This is like GetProperty, but is used when you know the lookup won't fail |
6813 // by throwing an exception. This is for the debug and builtins global | 6813 // by throwing an exception. This is for the debug and builtins global |
6814 // objects, where it is known which properties can be expected to be present | 6814 // objects, where it is known which properties can be expected to be present |
6815 // on the object. | 6815 // on the object. |
6816 Object* GetPropertyNoExceptionThrown(Name* key) { | 6816 Object* GetPropertyNoExceptionThrown(Name* key) { |
6817 Object* answer = GetProperty(key)->ToObjectUnchecked(); | 6817 Object* answer = GetProperty(key)->ToObjectUnchecked(); |
6818 return answer; | 6818 return answer; |
6819 } | 6819 } |
6820 | 6820 |
6821 // Ensure that the global object has a cell for the given property name. | 6821 // Ensure that the global object has a cell for the given property name. |
6822 static Handle<PropertyCell> EnsurePropertyCell( | 6822 static Handle<PropertyCell> EnsurePropertyCell(Handle<GlobalObject> global, |
6823 Handle<GlobalObject> global, | 6823 Handle<Name> name); |
6824 Handle<Name> name); | |
6825 // TODO(kmillikin): This function can be eliminated once the stub cache is | |
6826 // fully handlified (and the static helper can be written directly). | |
6827 MUST_USE_RESULT MaybeObject* EnsurePropertyCell(Name* name); | |
6828 | 6824 |
6829 // Casting. | 6825 // Casting. |
6830 static inline GlobalObject* cast(Object* obj); | 6826 static inline GlobalObject* cast(Object* obj); |
6831 | 6827 |
6832 // Layout description. | 6828 // Layout description. |
6833 static const int kBuiltinsOffset = JSObject::kHeaderSize; | 6829 static const int kBuiltinsOffset = JSObject::kHeaderSize; |
6834 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize; | 6830 static const int kNativeContextOffset = kBuiltinsOffset + kPointerSize; |
6835 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize; | 6831 static const int kGlobalContextOffset = kNativeContextOffset + kPointerSize; |
6836 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; | 6832 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; |
6837 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; | 6833 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; |
(...skipping 2908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9746 } else { | 9742 } else { |
9747 value &= ~(1 << bit_position); | 9743 value &= ~(1 << bit_position); |
9748 } | 9744 } |
9749 return value; | 9745 return value; |
9750 } | 9746 } |
9751 }; | 9747 }; |
9752 | 9748 |
9753 } } // namespace v8::internal | 9749 } } // namespace v8::internal |
9754 | 9750 |
9755 #endif // V8_OBJECTS_H_ | 9751 #endif // V8_OBJECTS_H_ |
OLD | NEW |