| 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 4284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4295 uint32_t StringDictionaryShape::HashForObject(String* key, Object* other) { | 4295 uint32_t StringDictionaryShape::HashForObject(String* key, Object* other) { |
| 4296 return String::cast(other)->Hash(); | 4296 return String::cast(other)->Hash(); |
| 4297 } | 4297 } |
| 4298 | 4298 |
| 4299 | 4299 |
| 4300 MaybeObject* StringDictionaryShape::AsObject(String* key) { | 4300 MaybeObject* StringDictionaryShape::AsObject(String* key) { |
| 4301 return key; | 4301 return key; |
| 4302 } | 4302 } |
| 4303 | 4303 |
| 4304 | 4304 |
| 4305 bool ObjectDictionaryShape::IsMatch(JSObject* key, Object* other) { | |
| 4306 ASSERT(other->IsJSObject()); | |
| 4307 return key == JSObject::cast(other); | |
| 4308 } | |
| 4309 | |
| 4310 | |
| 4311 uint32_t ObjectDictionaryShape::Hash(JSObject* key) { | |
| 4312 MaybeObject* maybe_hash = key->GetIdentityHash(); | |
| 4313 ASSERT(!maybe_hash->IsFailure()); | |
| 4314 return Smi::cast(maybe_hash->ToObjectUnchecked())->value(); | |
| 4315 } | |
| 4316 | |
| 4317 | |
| 4318 uint32_t ObjectDictionaryShape::HashForObject(JSObject* key, Object* other) { | |
| 4319 ASSERT(other->IsJSObject()); | |
| 4320 MaybeObject* maybe_hash = JSObject::cast(other)->GetIdentityHash(); | |
| 4321 ASSERT(!maybe_hash->IsFailure()); | |
| 4322 return Smi::cast(maybe_hash->ToObjectUnchecked())->value(); | |
| 4323 } | |
| 4324 | |
| 4325 | |
| 4326 MaybeObject* ObjectDictionaryShape::AsObject(JSObject* key) { | |
| 4327 return key; | |
| 4328 } | |
| 4329 | |
| 4330 | |
| 4331 void Map::ClearCodeCache(Heap* heap) { | 4305 void Map::ClearCodeCache(Heap* heap) { |
| 4332 // No write barrier is needed since empty_fixed_array is not in new space. | 4306 // No write barrier is needed since empty_fixed_array is not in new space. |
| 4333 // Please note this function is used during marking: | 4307 // Please note this function is used during marking: |
| 4334 // - MarkCompactCollector::MarkUnmarkedObject | 4308 // - MarkCompactCollector::MarkUnmarkedObject |
| 4335 ASSERT(!heap->InNewSpace(heap->raw_unchecked_empty_fixed_array())); | 4309 ASSERT(!heap->InNewSpace(heap->raw_unchecked_empty_fixed_array())); |
| 4336 WRITE_FIELD(this, kCodeCacheOffset, heap->raw_unchecked_empty_fixed_array()); | 4310 WRITE_FIELD(this, kCodeCacheOffset, heap->raw_unchecked_empty_fixed_array()); |
| 4337 } | 4311 } |
| 4338 | 4312 |
| 4339 | 4313 |
| 4340 void JSArray::EnsureSize(int required_size) { | 4314 void JSArray::EnsureSize(int required_size) { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4472 #undef WRITE_INT_FIELD | 4446 #undef WRITE_INT_FIELD |
| 4473 #undef READ_SHORT_FIELD | 4447 #undef READ_SHORT_FIELD |
| 4474 #undef WRITE_SHORT_FIELD | 4448 #undef WRITE_SHORT_FIELD |
| 4475 #undef READ_BYTE_FIELD | 4449 #undef READ_BYTE_FIELD |
| 4476 #undef WRITE_BYTE_FIELD | 4450 #undef WRITE_BYTE_FIELD |
| 4477 | 4451 |
| 4478 | 4452 |
| 4479 } } // namespace v8::internal | 4453 } } // namespace v8::internal |
| 4480 | 4454 |
| 4481 #endif // V8_OBJECTS_INL_H_ | 4455 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |