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

Side by Side Diff: src/objects.h

Issue 9141016: Improve GVN handling of ElementTransitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix comment nit Created 8 years, 10 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/hydrogen-instructions.cc ('k') | src/objects.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 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 4678 matching lines...) Expand 10 before | Expand all | Expand 10 after
4689 4689
4690 // Computes a hash value for this map, to be used in HashTables and such. 4690 // Computes a hash value for this map, to be used in HashTables and such.
4691 int Hash(); 4691 int Hash();
4692 4692
4693 // Compares this map to another to see if they describe equivalent objects. 4693 // Compares this map to another to see if they describe equivalent objects.
4694 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if 4694 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if
4695 // it had exactly zero inobject properties. 4695 // it had exactly zero inobject properties.
4696 // The "shared" flags of both this map and |other| are ignored. 4696 // The "shared" flags of both this map and |other| are ignored.
4697 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode); 4697 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode);
4698 4698
4699 // Returns true if this map and |other| describe equivalent objects.
4700 // The "shared" flags of both this map and |other| are ignored.
4701 bool EquivalentTo(Map* other) {
4702 return EquivalentToForNormalization(other, KEEP_INOBJECT_PROPERTIES);
4703 }
4704
4705 // Returns the contents of this map's descriptor array for the given string. 4699 // Returns the contents of this map's descriptor array for the given string.
4706 // May return NULL. |safe_to_add_transition| is set to false and NULL 4700 // May return NULL. |safe_to_add_transition| is set to false and NULL
4707 // is returned if adding transitions is not allowed. 4701 // is returned if adding transitions is not allowed.
4708 Object* GetDescriptorContents(String* sentinel_name, 4702 Object* GetDescriptorContents(String* sentinel_name,
4709 bool* safe_to_add_transitions); 4703 bool* safe_to_add_transitions);
4710 4704
4711 // Returns the map that this map transitions to if its elements_kind 4705 // Returns the map that this map transitions to if its elements_kind
4712 // is changed to |elements_kind|, or NULL if no such map is cached yet. 4706 // is changed to |elements_kind|, or NULL if no such map is cached yet.
4713 // |safe_to_add_transitions| is set to false if adding transitions is not 4707 // |safe_to_add_transitions| is set to false if adding transitions is not
4714 // allowed. 4708 // allowed.
(...skipping 3545 matching lines...) Expand 10 before | Expand all | Expand 10 after
8260 } else { 8254 } else {
8261 value &= ~(1 << bit_position); 8255 value &= ~(1 << bit_position);
8262 } 8256 }
8263 return value; 8257 return value;
8264 } 8258 }
8265 }; 8259 };
8266 8260
8267 } } // namespace v8::internal 8261 } } // namespace v8::internal
8268 8262
8269 #endif // V8_OBJECTS_H_ 8263 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698