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

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

Issue 363323003: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and polished. Created 6 years, 5 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/flags.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 "src/elements-kind.h" 5 #include "src/elements-kind.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/elements.h" 9 #include "src/elements.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ? 0 : (FixedArray::kHeaderSize - kHeapObjectTag); 58 ? 0 : (FixedArray::kHeaderSize - kHeapObjectTag);
59 } 59 }
60 60
61 61
62 const char* ElementsKindToString(ElementsKind kind) { 62 const char* ElementsKindToString(ElementsKind kind) {
63 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind); 63 ElementsAccessor* accessor = ElementsAccessor::ForKind(kind);
64 return accessor->name(); 64 return accessor->name();
65 } 65 }
66 66
67 67
68 void PrintElementsKind(FILE* out, ElementsKind kind) {
69 PrintF(out, "%s", ElementsKindToString(kind));
70 }
71
72
73 ElementsKind GetInitialFastElementsKind() { 68 ElementsKind GetInitialFastElementsKind() {
74 if (FLAG_packed_arrays) { 69 if (FLAG_packed_arrays) {
75 return FAST_SMI_ELEMENTS; 70 return FAST_SMI_ELEMENTS;
76 } else { 71 } else {
77 return FAST_HOLEY_SMI_ELEMENTS; 72 return FAST_HOLEY_SMI_ELEMENTS;
78 } 73 }
79 } 74 }
80 75
81 76
82 struct InitializeFastElementsKindSequence { 77 struct InitializeFastElementsKindSequence {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 return false; 198 return false;
204 default: 199 default:
205 return false; 200 return false;
206 } 201 }
207 } 202 }
208 return false; 203 return false;
209 } 204 }
210 205
211 206
212 } } // namespace v8::internal 207 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements-kind.h ('k') | src/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698