OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 5377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5388 // This is like GetProperty, but is used when you know the lookup won't fail | 5388 // This is like GetProperty, but is used when you know the lookup won't fail |
5389 // by throwing an exception. This is for the debug and builtins global | 5389 // by throwing an exception. This is for the debug and builtins global |
5390 // objects, where it is known which properties can be expected to be present | 5390 // objects, where it is known which properties can be expected to be present |
5391 // on the object. | 5391 // on the object. |
5392 Object* GetPropertyNoExceptionThrown(String* key) { | 5392 Object* GetPropertyNoExceptionThrown(String* key) { |
5393 Object* answer = GetProperty(key)->ToObjectUnchecked(); | 5393 Object* answer = GetProperty(key)->ToObjectUnchecked(); |
5394 return answer; | 5394 return answer; |
5395 } | 5395 } |
5396 | 5396 |
5397 // Ensure that the global object has a cell for the given property name. | 5397 // Ensure that the global object has a cell for the given property name. |
| 5398 static Handle<JSGlobalPropertyCell> EnsurePropertyCell( |
| 5399 Handle<GlobalObject> global, |
| 5400 Handle<String> name); |
| 5401 // TODO(kmillikin): This function can be eliminated once the stub cache is |
| 5402 // full handlified (and the static helper can be written directly). |
5398 MUST_USE_RESULT MaybeObject* EnsurePropertyCell(String* name); | 5403 MUST_USE_RESULT MaybeObject* EnsurePropertyCell(String* name); |
5399 | 5404 |
5400 // Casting. | 5405 // Casting. |
5401 static inline GlobalObject* cast(Object* obj); | 5406 static inline GlobalObject* cast(Object* obj); |
5402 | 5407 |
5403 // Layout description. | 5408 // Layout description. |
5404 static const int kBuiltinsOffset = JSObject::kHeaderSize; | 5409 static const int kBuiltinsOffset = JSObject::kHeaderSize; |
5405 static const int kGlobalContextOffset = kBuiltinsOffset + kPointerSize; | 5410 static const int kGlobalContextOffset = kBuiltinsOffset + kPointerSize; |
5406 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; | 5411 static const int kGlobalReceiverOffset = kGlobalContextOffset + kPointerSize; |
5407 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; | 5412 static const int kHeaderSize = kGlobalReceiverOffset + kPointerSize; |
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7710 } else { | 7715 } else { |
7711 value &= ~(1 << bit_position); | 7716 value &= ~(1 << bit_position); |
7712 } | 7717 } |
7713 return value; | 7718 return value; |
7714 } | 7719 } |
7715 }; | 7720 }; |
7716 | 7721 |
7717 } } // namespace v8::internal | 7722 } } // namespace v8::internal |
7718 | 7723 |
7719 #endif // V8_OBJECTS_H_ | 7724 #endif // V8_OBJECTS_H_ |
OLD | NEW |