Chromium Code Reviews| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 456 | 456 |
| 457 Object* GetCallbackObject() { | 457 Object* GetCallbackObject() { |
| 458 ASSERT(type() == CALLBACKS && !IsTransition()); | 458 ASSERT(type() == CALLBACKS && !IsTransition()); |
| 459 return GetValue(); | 459 return GetValue(); |
| 460 } | 460 } |
| 461 | 461 |
| 462 #ifdef OBJECT_PRINT | 462 #ifdef OBJECT_PRINT |
| 463 void Print(FILE* out); | 463 void Print(FILE* out); |
| 464 #endif | 464 #endif |
| 465 | 465 |
| 466 Object* GetValue() { | 466 Object* GetValue() { |
|
Michael Starzinger
2013/10/23 11:01:53
This method has several call-sites in unhandlified
| |
| 467 if (lookup_type_ == DESCRIPTOR_TYPE) { | 467 if (lookup_type_ == DESCRIPTOR_TYPE) { |
| 468 return GetValueFromMap(holder()->map()); | 468 return GetValueFromMap(holder()->map()); |
| 469 } | 469 } |
| 470 // In the dictionary case, the data is held in the value field. | 470 // In the dictionary case, the data is held in the value field. |
| 471 ASSERT(lookup_type_ == DICTIONARY_TYPE); | 471 ASSERT(lookup_type_ == DICTIONARY_TYPE); |
| 472 return holder()->GetNormalizedProperty(this); | 472 HandleScope scope(holder()->GetIsolate()); |
| 473 return *JSObject::GetNormalizedProperty(handle(holder()), this); | |
| 473 } | 474 } |
| 474 | 475 |
| 475 Object* GetValueFromMap(Map* map) const { | 476 Object* GetValueFromMap(Map* map) const { |
| 476 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); | 477 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
| 477 ASSERT(number_ < map->NumberOfOwnDescriptors()); | 478 ASSERT(number_ < map->NumberOfOwnDescriptors()); |
| 478 return map->instance_descriptors()->GetValue(number_); | 479 return map->instance_descriptors()->GetValue(number_); |
| 479 } | 480 } |
| 480 | 481 |
| 481 int GetFieldIndexFromMap(Map* map) const { | 482 int GetFieldIndexFromMap(Map* map) const { |
| 482 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); | 483 ASSERT(lookup_type_ == DESCRIPTOR_TYPE); |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 503 JSReceiver* holder_; | 504 JSReceiver* holder_; |
| 504 int number_; | 505 int number_; |
| 505 bool cacheable_; | 506 bool cacheable_; |
| 506 PropertyDetails details_; | 507 PropertyDetails details_; |
| 507 }; | 508 }; |
| 508 | 509 |
| 509 | 510 |
| 510 } } // namespace v8::internal | 511 } } // namespace v8::internal |
| 511 | 512 |
| 512 #endif // V8_PROPERTY_H_ | 513 #endif // V8_PROPERTY_H_ |
| OLD | NEW |