OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 | 1244 |
1245 // Helper for SetProperty and SetSuperProperty. | 1245 // Helper for SetProperty and SetSuperProperty. |
1246 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyInternal( | 1246 MUST_USE_RESULT static MaybeHandle<Object> SetPropertyInternal( |
1247 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, | 1247 LookupIterator* it, Handle<Object> value, LanguageMode language_mode, |
1248 StoreFromKeyed store_mode, bool* found); | 1248 StoreFromKeyed store_mode, bool* found); |
1249 | 1249 |
1250 DISALLOW_IMPLICIT_CONSTRUCTORS(Object); | 1250 DISALLOW_IMPLICIT_CONSTRUCTORS(Object); |
1251 }; | 1251 }; |
1252 | 1252 |
1253 | 1253 |
| 1254 // In objects.h to be usable without objects-inl.h inclusion. |
| 1255 bool Object::IsSmi() const { return HAS_SMI_TAG(this); } |
| 1256 bool Object::IsHeapObject() const { return Internals::HasHeapObjectTag(this); } |
| 1257 |
| 1258 |
1254 struct Brief { | 1259 struct Brief { |
1255 explicit Brief(const Object* const v) : value(v) {} | 1260 explicit Brief(const Object* const v) : value(v) {} |
1256 const Object* value; | 1261 const Object* value; |
1257 }; | 1262 }; |
1258 | 1263 |
1259 | 1264 |
1260 std::ostream& operator<<(std::ostream& os, const Brief& v); | 1265 std::ostream& operator<<(std::ostream& os, const Brief& v); |
1261 | 1266 |
1262 | 1267 |
1263 // Smi represents integer Numbers that can be stored in 31 bits. | 1268 // Smi represents integer Numbers that can be stored in 31 bits. |
(...skipping 8976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10240 } else { | 10245 } else { |
10241 value &= ~(1 << bit_position); | 10246 value &= ~(1 << bit_position); |
10242 } | 10247 } |
10243 return value; | 10248 return value; |
10244 } | 10249 } |
10245 }; | 10250 }; |
10246 | 10251 |
10247 } } // namespace v8::internal | 10252 } } // namespace v8::internal |
10248 | 10253 |
10249 #endif // V8_OBJECTS_H_ | 10254 #endif // V8_OBJECTS_H_ |
OLD | NEW |