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

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

Issue 295913009: Allow specifying base offset when constructing Keyed hydrogen instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove more unnecessary code Created 6 years, 7 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/elements-kind.h ('k') | src/hydrogen-dehoist.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "elements-kind.h" 5 #include "elements-kind.h"
6 6
7 #include "api.h" 7 #include "api.h"
8 #include "elements.h" 8 #include "elements.h"
9 #include "objects.h" 9 #include "objects.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 case FAST_HOLEY_ELEMENTS: 44 case FAST_HOLEY_ELEMENTS:
45 case DICTIONARY_ELEMENTS: 45 case DICTIONARY_ELEMENTS:
46 case SLOPPY_ARGUMENTS_ELEMENTS: 46 case SLOPPY_ARGUMENTS_ELEMENTS:
47 return kPointerSizeLog2; 47 return kPointerSizeLog2;
48 } 48 }
49 UNREACHABLE(); 49 UNREACHABLE();
50 return 0; 50 return 0;
51 } 51 }
52 52
53 53
54 int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind) {
55 return IsExternalArrayElementsKind(elements_kind)
56 ? 0 : (FixedArray::kHeaderSize - kSmiTagSize);
57 }
58
59
54 const char* ElementsKindToString(ElementsKind kind) { 60 const char* ElementsKindToString(ElementsKind kind) {
55 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind); 61 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind);
56 return accessor->name(); 62 return accessor->name();
57 } 63 }
58 64
59 65
60 void PrintElementsKind(FILE* out, ElementsKind kind) { 66 void PrintElementsKind(FILE* out, ElementsKind kind) {
61 PrintF(out, "%s", ElementsKindToString(kind)); 67 PrintF(out, "%s", ElementsKindToString(kind));
62 } 68 }
63 69
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return false; 201 return false;
196 default: 202 default:
197 return false; 203 return false;
198 } 204 }
199 } 205 }
200 return false; 206 return false;
201 } 207 }
202 208
203 209
204 } } // namespace v8::internal 210 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements-kind.h ('k') | src/hydrogen-dehoist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698