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

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

Issue 11238016: Consolidated all the key store/load classes in the Hydrogen and Lithium (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Last batch of comment response, formatting issues. Created 8 years, 1 month 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.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 17 matching lines...) Expand all
28 #include "elements-kind.h" 28 #include "elements-kind.h"
29 29
30 #include "api.h" 30 #include "api.h"
31 #include "elements.h" 31 #include "elements.h"
32 #include "objects.h" 32 #include "objects.h"
33 33
34 namespace v8 { 34 namespace v8 {
35 namespace internal { 35 namespace internal {
36 36
37 37
38 void PrintElementsKind(FILE* out, ElementsKind kind) { 38 const char* ElementsKindToString(ElementsKind kind) {
39 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind); 39 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind);
40 PrintF(out, "%s", accessor->name()); 40 return accessor->name();
41 } 41 }
42 42
43 43
44 void PrintElementsKind(FILE* out, ElementsKind kind) {
45 PrintF(out, "%s", ElementsKindToString(kind));
46 }
47
48
44 ElementsKind GetInitialFastElementsKind() { 49 ElementsKind GetInitialFastElementsKind() {
45 if (FLAG_packed_arrays) { 50 if (FLAG_packed_arrays) {
46 return FAST_SMI_ELEMENTS; 51 return FAST_SMI_ELEMENTS;
47 } else { 52 } else {
48 return FAST_HOLEY_SMI_ELEMENTS; 53 return FAST_HOLEY_SMI_ELEMENTS;
49 } 54 }
50 } 55 }
51 56
52 57
53 struct InitializeFastElementsKindSequence { 58 struct InitializeFastElementsKindSequence {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return to_kind == FAST_HOLEY_ELEMENTS; 130 return to_kind == FAST_HOLEY_ELEMENTS;
126 case FAST_HOLEY_ELEMENTS: 131 case FAST_HOLEY_ELEMENTS:
127 return false; 132 return false;
128 default: 133 default:
129 return false; 134 return false;
130 } 135 }
131 } 136 }
132 137
133 138
134 } } // namespace v8::internal 139 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements-kind.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698