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 4827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4838 ASSERT(prototype->IsNull()); | 4838 ASSERT(prototype->IsNull()); |
4839 return true; | 4839 return true; |
4840 } | 4840 } |
4841 | 4841 |
4842 // Traverse the proposed prototype chain looking for setters for properties of | 4842 // Traverse the proposed prototype chain looking for setters for properties of |
4843 // the same names as are set by the inline constructor. | 4843 // the same names as are set by the inline constructor. |
4844 for (Object* obj = prototype; | 4844 for (Object* obj = prototype; |
4845 obj != Heap::null_value(); | 4845 obj != Heap::null_value(); |
4846 obj = obj->GetPrototype()) { | 4846 obj = obj->GetPrototype()) { |
4847 JSObject* js_object = JSObject::cast(obj); | 4847 JSObject* js_object = JSObject::cast(obj); |
4848 if (!js_object->HasFastProperties()) { | |
4849 // Only allow fast case objects, as the map check in the inline | |
4850 // constructor which check for changes to the prototype chain cannot | |
4851 // handle dictionary case objects. | |
4852 return false; | |
4853 } | |
4854 for (int i = 0; i < this_property_assignments_count(); i++) { | 4848 for (int i = 0; i < this_property_assignments_count(); i++) { |
4855 LookupResult result; | 4849 LookupResult result; |
4856 String* name = GetThisPropertyAssignmentName(i); | 4850 String* name = GetThisPropertyAssignmentName(i); |
4857 js_object->LocalLookupRealNamedProperty(name, &result); | 4851 js_object->LocalLookupRealNamedProperty(name, &result); |
4858 if (result.IsValid() && result.type() == CALLBACKS) { | 4852 if (result.IsValid() && result.type() == CALLBACKS) { |
4859 return false; | 4853 return false; |
4860 } | 4854 } |
4861 } | 4855 } |
4862 } | 4856 } |
4863 | 4857 |
(...skipping 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8386 if (break_point_objects()->IsUndefined()) return 0; | 8380 if (break_point_objects()->IsUndefined()) return 0; |
8387 // Single beak point. | 8381 // Single beak point. |
8388 if (!break_point_objects()->IsFixedArray()) return 1; | 8382 if (!break_point_objects()->IsFixedArray()) return 1; |
8389 // Multiple break points. | 8383 // Multiple break points. |
8390 return FixedArray::cast(break_point_objects())->length(); | 8384 return FixedArray::cast(break_point_objects())->length(); |
8391 } | 8385 } |
8392 #endif | 8386 #endif |
8393 | 8387 |
8394 | 8388 |
8395 } } // namespace v8::internal | 8389 } } // namespace v8::internal |
OLD | NEW |