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

Side by Side Diff: src/objects.cc

Issue 35133003: Fix materialization of captured objects with field tracking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « src/objects.h ('k') | test/mjsunit/compiler/escape-analysis.js » ('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 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2727 for (; descriptor < descriptors; descriptor++) { 2727 for (; descriptor < descriptors; descriptor++) {
2728 new_map = Map::CopyInstallDescriptors(new_map, descriptor, new_descriptors); 2728 new_map = Map::CopyInstallDescriptors(new_map, descriptor, new_descriptors);
2729 new_map->set_migration_target(true); 2729 new_map->set_migration_target(true);
2730 } 2730 }
2731 2731
2732 new_map->set_owns_descriptors(true); 2732 new_map->set_owns_descriptors(true);
2733 return new_map; 2733 return new_map;
2734 } 2734 }
2735 2735
2736 2736
2737 // Generalize the representation of all FIELD descriptors.
2738 Handle<Map> Map::GeneralizeAllFieldRepresentations(
2739 Handle<Map> map,
2740 Representation new_representation) {
2741 Handle<DescriptorArray> descriptors(map->instance_descriptors());
2742 for (int i = 0; i < map->NumberOfOwnDescriptors(); i++) {
2743 PropertyDetails details = descriptors->GetDetails(i);
2744 if (details.type() == FIELD) {
2745 map = GeneralizeRepresentation(map, i, new_representation, FORCE_FIELD);
2746 }
2747 }
2748 return map;
2749 }
2750
2751
2737 Map* Map::CurrentMapForDeprecated() { 2752 Map* Map::CurrentMapForDeprecated() {
2738 DisallowHeapAllocation no_allocation; 2753 DisallowHeapAllocation no_allocation;
2739 if (!is_deprecated()) return this; 2754 if (!is_deprecated()) return this;
2740 2755
2741 DescriptorArray* old_descriptors = instance_descriptors(); 2756 DescriptorArray* old_descriptors = instance_descriptors();
2742 2757
2743 int descriptors = NumberOfOwnDescriptors(); 2758 int descriptors = NumberOfOwnDescriptors();
2744 Map* root_map = FindRootMap(); 2759 Map* root_map = FindRootMap();
2745 2760
2746 // Check the state of the root map. 2761 // Check the state of the root map.
(...skipping 13622 matching lines...) Expand 10 before | Expand all | Expand 10 after
16369 #define ERROR_MESSAGES_TEXTS(C, T) T, 16384 #define ERROR_MESSAGES_TEXTS(C, T) T,
16370 static const char* error_messages_[] = { 16385 static const char* error_messages_[] = {
16371 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16386 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16372 }; 16387 };
16373 #undef ERROR_MESSAGES_TEXTS 16388 #undef ERROR_MESSAGES_TEXTS
16374 return error_messages_[reason]; 16389 return error_messages_[reason];
16375 } 16390 }
16376 16391
16377 16392
16378 } } // namespace v8::internal 16393 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | test/mjsunit/compiler/escape-analysis.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698