Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 469 cell->set_value(Heap::the_hole_value()); | 469 cell->set_value(Heap::the_hole_value()); |
| 470 dictionary->DetailsAtPut(entry, details.AsDeleted()); | 470 dictionary->DetailsAtPut(entry, details.AsDeleted()); |
| 471 } else { | 471 } else { |
| 472 return dictionary->DeleteProperty(entry, mode); | 472 return dictionary->DeleteProperty(entry, mode); |
| 473 } | 473 } |
| 474 } | 474 } |
| 475 return Heap::true_value(); | 475 return Heap::true_value(); |
| 476 } | 476 } |
| 477 | 477 |
| 478 | 478 |
| 479 bool JSObject::IsDirty() { | |
| 480 Object* cons_obj = map()->constructor(); | |
|
Mads Ager (chromium)
2009/09/17 08:46:18
How about just calling it constructor instead of c
Christian Plesner Hansen
2009/09/17 08:53:15
The reason I used cons_obj is that we don't know i
| |
| 481 if (!cons_obj->IsJSFunction()) | |
| 482 return true; | |
| 483 JSFunction* fun = JSFunction::cast(cons_obj); | |
| 484 if (!fun->shared()->function_data()->IsFunctionTemplateInfo()) | |
| 485 return true; | |
| 486 // If the object is fully fast case and has the same map it was | |
| 487 // created with then no changes can have been made to it. | |
| 488 return map() != fun->initial_map() | |
| 489 || !HasFastElements() | |
| 490 || !HasFastProperties(); | |
| 491 } | |
| 492 | |
| 493 | |
| 479 Object* Object::GetProperty(Object* receiver, | 494 Object* Object::GetProperty(Object* receiver, |
| 480 LookupResult* result, | 495 LookupResult* result, |
| 481 String* name, | 496 String* name, |
| 482 PropertyAttributes* attributes) { | 497 PropertyAttributes* attributes) { |
| 483 // Make sure that the top context does not change when doing | 498 // Make sure that the top context does not change when doing |
| 484 // callbacks or interceptor calls. | 499 // callbacks or interceptor calls. |
| 485 AssertNoContextChange ncc; | 500 AssertNoContextChange ncc; |
| 486 | 501 |
| 487 // Traverse the prototype chain from the current object (this) to | 502 // Traverse the prototype chain from the current object (this) to |
| 488 // the holder and check for access rights. This avoid traversing the | 503 // the holder and check for access rights. This avoid traversing the |
| (...skipping 7526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8015 if (break_point_objects()->IsUndefined()) return 0; | 8030 if (break_point_objects()->IsUndefined()) return 0; |
| 8016 // Single beak point. | 8031 // Single beak point. |
| 8017 if (!break_point_objects()->IsFixedArray()) return 1; | 8032 if (!break_point_objects()->IsFixedArray()) return 1; |
| 8018 // Multiple break points. | 8033 // Multiple break points. |
| 8019 return FixedArray::cast(break_point_objects())->length(); | 8034 return FixedArray::cast(break_point_objects())->length(); |
| 8020 } | 8035 } |
| 8021 #endif | 8036 #endif |
| 8022 | 8037 |
| 8023 | 8038 |
| 8024 } } // namespace v8::internal | 8039 } } // namespace v8::internal |
| OLD | NEW |