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

Side by Side Diff: src/elements-kind.cc

Issue 57123002: Reland 21774: Generate KeyedLoadGeneric with Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Turn off by default Created 7 years 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 case FAST_HOLEY_ELEMENTS: 58 case FAST_HOLEY_ELEMENTS:
59 case DICTIONARY_ELEMENTS: 59 case DICTIONARY_ELEMENTS:
60 case NON_STRICT_ARGUMENTS_ELEMENTS: 60 case NON_STRICT_ARGUMENTS_ELEMENTS:
61 return kPointerSizeLog2; 61 return kPointerSizeLog2;
62 } 62 }
63 UNREACHABLE(); 63 UNREACHABLE();
64 return 0; 64 return 0;
65 } 65 }
66 66
67 67
68 int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind) {
69 return IsExternalArrayElementsKind(elements_kind)
70 ? 0 : (FixedArray::kHeaderSize - kSmiTagSize);
Toon Verwaest 2013/12/04 17:29:26 Shouldn't that be kHeapObjectTag rather than kSmiT
danno 2014/06/06 15:43:50 Done.
71 }
72
73
68 const char* ElementsKindToString(ElementsKind kind) { 74 const char* ElementsKindToString(ElementsKind kind) {
69 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind); 75 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind);
70 return accessor->name(); 76 return accessor->name();
71 } 77 }
72 78
73 79
74 void PrintElementsKind(FILE* out, ElementsKind kind) { 80 void PrintElementsKind(FILE* out, ElementsKind kind) {
75 PrintF(out, "%s", ElementsKindToString(kind)); 81 PrintF(out, "%s", ElementsKindToString(kind));
76 } 82 }
77 83
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 return to_kind == FAST_HOLEY_ELEMENTS; 175 return to_kind == FAST_HOLEY_ELEMENTS;
170 case FAST_HOLEY_ELEMENTS: 176 case FAST_HOLEY_ELEMENTS:
171 return false; 177 return false;
172 default: 178 default:
173 return false; 179 return false;
174 } 180 }
175 } 181 }
176 182
177 183
178 } } // namespace v8::internal 184 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698