Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: src/objects.cc

Issue 23431029: Properly load transition target descriptor info (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Readding test file Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after
3873 if (!value->FitsRepresentation(representation)) { 3873 if (!value->FitsRepresentation(representation)) {
3874 MaybeObject* maybe_map = transition_map->GeneralizeRepresentation( 3874 MaybeObject* maybe_map = transition_map->GeneralizeRepresentation(
3875 descriptor, value->OptimalRepresentation()); 3875 descriptor, value->OptimalRepresentation());
3876 if (!maybe_map->To(&transition_map)) return maybe_map; 3876 if (!maybe_map->To(&transition_map)) return maybe_map;
3877 Object* back = transition_map->GetBackPointer(); 3877 Object* back = transition_map->GetBackPointer();
3878 if (back->IsMap()) { 3878 if (back->IsMap()) {
3879 MaybeObject* maybe_failure = 3879 MaybeObject* maybe_failure =
3880 lookup->holder()->MigrateToMap(Map::cast(back)); 3880 lookup->holder()->MigrateToMap(Map::cast(back));
3881 if (maybe_failure->IsFailure()) return maybe_failure; 3881 if (maybe_failure->IsFailure()) return maybe_failure;
3882 } 3882 }
3883 DescriptorArray* desc = transition_map->instance_descriptors(); 3883 descriptors = transition_map->instance_descriptors();
3884 int descriptor = transition_map->LastAdded(); 3884 representation =
3885 representation = desc->GetDetails(descriptor).representation(); 3885 descriptors->GetDetails(descriptor).representation();
3886 } 3886 }
3887 int field_index = descriptors->GetFieldIndex(descriptor); 3887 int field_index = descriptors->GetFieldIndex(descriptor);
3888 result = lookup->holder()->AddFastPropertyUsingMap( 3888 result = lookup->holder()->AddFastPropertyUsingMap(
3889 transition_map, *name, *value, field_index, representation); 3889 transition_map, *name, *value, field_index, representation);
3890 } else { 3890 } else {
3891 result = lookup->holder()->ConvertDescriptorToField( 3891 result = lookup->holder()->ConvertDescriptorToField(
3892 *name, *value, attributes); 3892 *name, *value, attributes);
3893 } 3893 }
3894 } else if (details.type() == CALLBACKS) { 3894 } else if (details.type() == CALLBACKS) {
3895 result = lookup->holder()->ConvertDescriptorToField( 3895 result = lookup->holder()->ConvertDescriptorToField(
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
4078 value->OptimalRepresentation(value_type); 4078 value->OptimalRepresentation(value_type);
4079 if (!value_representation.fits_into(representation)) { 4079 if (!value_representation.fits_into(representation)) {
4080 MaybeObject* maybe_map = transition_map->GeneralizeRepresentation( 4080 MaybeObject* maybe_map = transition_map->GeneralizeRepresentation(
4081 descriptor, value_representation); 4081 descriptor, value_representation);
4082 if (!maybe_map->To(&transition_map)) return maybe_map; 4082 if (!maybe_map->To(&transition_map)) return maybe_map;
4083 Object* back = transition_map->GetBackPointer(); 4083 Object* back = transition_map->GetBackPointer();
4084 if (back->IsMap()) { 4084 if (back->IsMap()) {
4085 MaybeObject* maybe_failure = self->MigrateToMap(Map::cast(back)); 4085 MaybeObject* maybe_failure = self->MigrateToMap(Map::cast(back));
4086 if (maybe_failure->IsFailure()) return maybe_failure; 4086 if (maybe_failure->IsFailure()) return maybe_failure;
4087 } 4087 }
4088 DescriptorArray* desc = transition_map->instance_descriptors(); 4088 descriptors = transition_map->instance_descriptors();
4089 int descriptor = transition_map->LastAdded(); 4089 representation =
4090 representation = desc->GetDetails(descriptor).representation(); 4090 descriptors->GetDetails(descriptor).representation();
4091 } 4091 }
4092 int field_index = descriptors->GetFieldIndex(descriptor); 4092 int field_index = descriptors->GetFieldIndex(descriptor);
4093 result = self->AddFastPropertyUsingMap( 4093 result = self->AddFastPropertyUsingMap(
4094 transition_map, *name, *value, field_index, representation); 4094 transition_map, *name, *value, field_index, representation);
4095 } else { 4095 } else {
4096 result = self->ConvertDescriptorToField(*name, *value, attributes); 4096 result = self->ConvertDescriptorToField(*name, *value, attributes);
4097 } 4097 }
4098 } else if (details.type() == CALLBACKS) { 4098 } else if (details.type() == CALLBACKS) {
4099 result = self->ConvertDescriptorToField(*name, *value, attributes); 4099 result = self->ConvertDescriptorToField(*name, *value, attributes);
4100 } else { 4100 } else {
(...skipping 11723 matching lines...) Expand 10 before | Expand all | Expand 10 after
15824 return static_cast<Type*>(type_raw()); 15824 return static_cast<Type*>(type_raw());
15825 } 15825 }
15826 15826
15827 15827
15828 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { 15828 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) {
15829 set_type_raw(type, ignored); 15829 set_type_raw(type, ignored);
15830 } 15830 }
15831 15831
15832 15832
15833 } } // namespace v8::internal 15833 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698