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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 for (int i = 0; i < descs->number_of_descriptors(); i++) { | 795 for (int i = 0; i < descs->number_of_descriptors(); i++) { |
796 PropertyDetails details = descs->GetDetails(i); | 796 PropertyDetails details = descs->GetDetails(i); |
797 Object* key = descs->GetKey(i); | 797 Object* key = descs->GetKey(i); |
798 if (!(details.IsDontEnum() || key->IsSymbol())) { | 798 if (!(details.IsDontEnum() || key->IsSymbol())) { |
799 if (i < real_size) ++enum_size; | 799 if (i < real_size) ++enum_size; |
800 storage->set(index, key); | 800 storage->set(index, key); |
801 if (!indices.is_null()) { | 801 if (!indices.is_null()) { |
802 if (details.type() != FIELD) { | 802 if (details.type() != FIELD) { |
803 indices = Handle<FixedArray>(); | 803 indices = Handle<FixedArray>(); |
804 } else { | 804 } else { |
805 int field_index = Descriptor::IndexFromValue(descs->GetValue(i)); | 805 int field_index = descs->GetFieldIndex(i); |
806 if (field_index >= map->inobject_properties()) { | 806 if (field_index >= map->inobject_properties()) { |
807 field_index = -(field_index - map->inobject_properties() + 1); | 807 field_index = -(field_index - map->inobject_properties() + 1); |
808 } | 808 } |
809 indices->set(index, Smi::FromInt(field_index)); | 809 indices->set(index, Smi::FromInt(field_index)); |
810 } | 810 } |
811 } | 811 } |
812 index++; | 812 index++; |
813 } | 813 } |
814 } | 814 } |
815 ASSERT(index == storage->length()); | 815 ASSERT(index == storage->length()); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
923 data->next = prev_next_; | 923 data->next = prev_next_; |
924 data->limit = prev_limit_; | 924 data->limit = prev_limit_; |
925 #ifdef DEBUG | 925 #ifdef DEBUG |
926 handles_detached_ = true; | 926 handles_detached_ = true; |
927 #endif | 927 #endif |
928 return deferred; | 928 return deferred; |
929 } | 929 } |
930 | 930 |
931 | 931 |
932 } } // namespace v8::internal | 932 } } // namespace v8::internal |
OLD | NEW |