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

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

Issue 397253002: Remove experimental flags that are now required (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback 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/flag-definitions.h » ('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 ElementsKind GetInitialFastElementsKind() {
69 if (FLAG_packed_arrays) {
70 return FAST_SMI_ELEMENTS;
71 } else {
72 return FAST_HOLEY_SMI_ELEMENTS;
73 }
74 }
75
76
77 struct InitializeFastElementsKindSequence { 68 struct InitializeFastElementsKindSequence {
78 static void Construct( 69 static void Construct(
79 ElementsKind** fast_elements_kind_sequence_ptr) { 70 ElementsKind** fast_elements_kind_sequence_ptr) {
80 ElementsKind* fast_elements_kind_sequence = 71 ElementsKind* fast_elements_kind_sequence =
81 new ElementsKind[kFastElementsKindCount]; 72 new ElementsKind[kFastElementsKindCount];
82 *fast_elements_kind_sequence_ptr = fast_elements_kind_sequence; 73 *fast_elements_kind_sequence_ptr = fast_elements_kind_sequence;
83 STATIC_ASSERT(FAST_SMI_ELEMENTS == FIRST_FAST_ELEMENTS_KIND); 74 STATIC_ASSERT(FAST_SMI_ELEMENTS == FIRST_FAST_ELEMENTS_KIND);
84 fast_elements_kind_sequence[0] = FAST_SMI_ELEMENTS; 75 fast_elements_kind_sequence[0] = FAST_SMI_ELEMENTS;
85 fast_elements_kind_sequence[1] = FAST_HOLEY_SMI_ELEMENTS; 76 fast_elements_kind_sequence[1] = FAST_HOLEY_SMI_ELEMENTS;
86 fast_elements_kind_sequence[2] = FAST_DOUBLE_ELEMENTS; 77 fast_elements_kind_sequence[2] = FAST_DOUBLE_ELEMENTS;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 return false; 189 return false;
199 default: 190 default:
200 return false; 191 return false;
201 } 192 }
202 } 193 }
203 return false; 194 return false;
204 } 195 }
205 196
206 197
207 } } // namespace v8::internal 198 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements-kind.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698