OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 2332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2343 FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate), | 2343 FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate), |
2344 new_map->NumberOfFields(), | 2344 new_map->NumberOfFields(), |
2345 attributes, | 2345 attributes, |
2346 Representation::Tagged()); | 2346 Representation::Tagged()); |
2347 descriptors->Replace(modify_index, &d); | 2347 descriptors->Replace(modify_index, &d); |
2348 int unused_property_fields = new_map->unused_property_fields() - 1; | 2348 int unused_property_fields = new_map->unused_property_fields() - 1; |
2349 if (unused_property_fields < 0) { | 2349 if (unused_property_fields < 0) { |
2350 unused_property_fields += JSObject::kFieldsAdded; | 2350 unused_property_fields += JSObject::kFieldsAdded; |
2351 } | 2351 } |
2352 new_map->set_unused_property_fields(unused_property_fields); | 2352 new_map->set_unused_property_fields(unused_property_fields); |
2353 } else if (details.attributes() != attributes) { | |
2354 FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate), | |
rossberg
2014/07/11 12:54:48
Hm, how exactly is this related to the rest of the
Toon Verwaest
2014/07/14 07:39:55
Not at all. It's not part of this CL, and an impro
| |
2355 details.field_index(), attributes, | |
2356 Representation::Tagged()); | |
2357 descriptors->Replace(modify_index, &d); | |
2353 } | 2358 } |
2354 | 2359 |
2355 if (FLAG_trace_generalization) { | 2360 if (FLAG_trace_generalization) { |
2356 HeapType* field_type = (details.type() == FIELD) | 2361 HeapType* field_type = (details.type() == FIELD) |
2357 ? map->instance_descriptors()->GetFieldType(modify_index) | 2362 ? map->instance_descriptors()->GetFieldType(modify_index) |
2358 : NULL; | 2363 : NULL; |
2359 map->PrintGeneralization(stdout, reason, modify_index, | 2364 map->PrintGeneralization(stdout, reason, modify_index, |
2360 new_map->NumberOfOwnDescriptors(), | 2365 new_map->NumberOfOwnDescriptors(), |
2361 new_map->NumberOfOwnDescriptors(), | 2366 new_map->NumberOfOwnDescriptors(), |
2362 details.type() == CONSTANT && store_mode == FORCE_FIELD, | 2367 details.type() == CONSTANT && store_mode == FORCE_FIELD, |
(...skipping 14632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
16995 #define ERROR_MESSAGES_TEXTS(C, T) T, | 17000 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16996 static const char* error_messages_[] = { | 17001 static const char* error_messages_[] = { |
16997 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 17002 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16998 }; | 17003 }; |
16999 #undef ERROR_MESSAGES_TEXTS | 17004 #undef ERROR_MESSAGES_TEXTS |
17000 return error_messages_[reason]; | 17005 return error_messages_[reason]; |
17001 } | 17006 } |
17002 | 17007 |
17003 | 17008 |
17004 } } // namespace v8::internal | 17009 } } // namespace v8::internal |
OLD | NEW |