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

Side by Side Diff: src/objects.h

Issue 9252008: Eliminate a superfluous map check when building a generic array element access. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 11 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.cc ('k') | no next file » | 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 4474 matching lines...) Expand 10 before | Expand all | Expand 10 after
4485 inline bool has_external_array_elements() { 4485 inline bool has_external_array_elements() {
4486 ElementsKind kind(elements_kind()); 4486 ElementsKind kind(elements_kind());
4487 return kind >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND && 4487 return kind >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND &&
4488 kind <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND; 4488 kind <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND;
4489 } 4489 }
4490 4490
4491 inline bool has_dictionary_elements() { 4491 inline bool has_dictionary_elements() {
4492 return elements_kind() == DICTIONARY_ELEMENTS; 4492 return elements_kind() == DICTIONARY_ELEMENTS;
4493 } 4493 }
4494 4494
4495 inline bool has_slow_elements_kind() {
4496 return elements_kind() == DICTIONARY_ELEMENTS
4497 || elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS;
4498 }
4499
4495 static bool IsValidElementsTransition(ElementsKind from_kind, 4500 static bool IsValidElementsTransition(ElementsKind from_kind,
4496 ElementsKind to_kind); 4501 ElementsKind to_kind);
4497 4502
4498 // Tells whether the map is attached to SharedFunctionInfo 4503 // Tells whether the map is attached to SharedFunctionInfo
4499 // (for inobject slack tracking). 4504 // (for inobject slack tracking).
4500 inline void set_attached_to_shared_function_info(bool value); 4505 inline void set_attached_to_shared_function_info(bool value);
4501 4506
4502 inline bool attached_to_shared_function_info(); 4507 inline bool attached_to_shared_function_info();
4503 4508
4504 // Tells whether the map is shared between objects that may have different 4509 // Tells whether the map is shared between objects that may have different
(...skipping 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after
8188 } else { 8193 } else {
8189 value &= ~(1 << bit_position); 8194 value &= ~(1 << bit_position);
8190 } 8195 }
8191 return value; 8196 return value;
8192 } 8197 }
8193 }; 8198 };
8194 8199
8195 } } // namespace v8::internal 8200 } } // namespace v8::internal
8196 8201
8197 #endif // V8_OBJECTS_H_ 8202 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698