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

Side by Side Diff: src/objects.h

Issue 10532063: Optimistically assume that elements IC only transition once. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years, 6 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/ic.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 4293 matching lines...) Expand 10 before | Expand all | Expand 10 after
4304 4304
4305 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. 4305 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in.
4306 inline byte to_boolean_state(); 4306 inline byte to_boolean_state();
4307 inline void set_to_boolean_state(byte value); 4307 inline void set_to_boolean_state(byte value);
4308 4308
4309 // [has_function_cache]: For kind STUB tells whether there is a function 4309 // [has_function_cache]: For kind STUB tells whether there is a function
4310 // cache is passed to the stub. 4310 // cache is passed to the stub.
4311 inline bool has_function_cache(); 4311 inline bool has_function_cache();
4312 inline void set_has_function_cache(bool flag); 4312 inline void set_has_function_cache(bool flag);
4313 4313
4314 bool allowed_in_shared_map_code_cache();
4315
4314 // Get the safepoint entry for the given pc. 4316 // Get the safepoint entry for the given pc.
4315 SafepointEntry GetSafepointEntry(Address pc); 4317 SafepointEntry GetSafepointEntry(Address pc);
4316 4318
4317 // Mark this code object as not having a stack check table. Assumes kind 4319 // Mark this code object as not having a stack check table. Assumes kind
4318 // is FUNCTION. 4320 // is FUNCTION.
4319 void SetNoStackCheckTable(); 4321 void SetNoStackCheckTable();
4320 4322
4321 // Find the first map in an IC stub. 4323 // Find the first map in an IC stub.
4322 Map* FindFirstMap(); 4324 Map* FindFirstMap();
4323 4325
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
4656 4658
4657 inline bool has_fast_double_elements() { 4659 inline bool has_fast_double_elements() {
4658 return IsFastDoubleElementsKind(elements_kind()); 4660 return IsFastDoubleElementsKind(elements_kind());
4659 } 4661 }
4660 4662
4661 inline bool has_non_strict_arguments_elements() { 4663 inline bool has_non_strict_arguments_elements() {
4662 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; 4664 return elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS;
4663 } 4665 }
4664 4666
4665 inline bool has_external_array_elements() { 4667 inline bool has_external_array_elements() {
4666 ElementsKind kind(elements_kind()); 4668 return IsExternalArrayElementsKind(elements_kind());
4667 return kind >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND &&
4668 kind <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND;
4669 } 4669 }
4670 4670
4671 inline bool has_dictionary_elements() { 4671 inline bool has_dictionary_elements() {
4672 return elements_kind() == DICTIONARY_ELEMENTS; 4672 return IsDictionaryElementsKind(elements_kind());
4673 } 4673 }
4674 4674
4675 inline bool has_slow_elements_kind() { 4675 inline bool has_slow_elements_kind() {
4676 return elements_kind() == DICTIONARY_ELEMENTS 4676 return elements_kind() == DICTIONARY_ELEMENTS
4677 || elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS; 4677 || elements_kind() == NON_STRICT_ARGUMENTS_ELEMENTS;
4678 } 4678 }
4679 4679
4680 static bool IsValidElementsTransition(ElementsKind from_kind, 4680 static bool IsValidElementsTransition(ElementsKind from_kind,
4681 ElementsKind to_kind); 4681 ElementsKind to_kind);
4682 4682
(...skipping 4015 matching lines...) Expand 10 before | Expand all | Expand 10 after
8698 } else { 8698 } else {
8699 value &= ~(1 << bit_position); 8699 value &= ~(1 << bit_position);
8700 } 8700 }
8701 return value; 8701 return value;
8702 } 8702 }
8703 }; 8703 };
8704 8704
8705 } } // namespace v8::internal 8705 } } // namespace v8::internal
8706 8706
8707 #endif // V8_OBJECTS_H_ 8707 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698