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

Side by Side Diff: src/elements.h

Issue 750093003: Fix clang++ warnings on -Wtautological-constant-out-of-range-compare (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use static_cast instead of removing the DCHECK Created 6 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
« no previous file with comments | « no previous file | src/objects.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 #ifndef V8_ELEMENTS_H_ 5 #ifndef V8_ELEMENTS_H_
6 #define V8_ELEMENTS_H_ 6 #define V8_ELEMENTS_H_
7 7
8 #include "src/elements-kind.h" 8 #include "src/elements-kind.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 MUST_USE_RESULT inline MaybeHandle<FixedArray> AddElementsToFixedArray( 173 MUST_USE_RESULT inline MaybeHandle<FixedArray> AddElementsToFixedArray(
174 Handle<Object> receiver, Handle<JSObject> holder, Handle<FixedArray> to, 174 Handle<Object> receiver, Handle<JSObject> holder, Handle<FixedArray> to,
175 FixedArray::KeyFilter filter) { 175 FixedArray::KeyFilter filter) {
176 return AddElementsToFixedArray(receiver, holder, to, 176 return AddElementsToFixedArray(receiver, holder, to,
177 handle(holder->elements()), filter); 177 handle(holder->elements()), filter);
178 } 178 }
179 179
180 // Returns a shared ElementsAccessor for the specified ElementsKind. 180 // Returns a shared ElementsAccessor for the specified ElementsKind.
181 static ElementsAccessor* ForKind(ElementsKind elements_kind) { 181 static ElementsAccessor* ForKind(ElementsKind elements_kind) {
182 DCHECK(elements_kind < kElementsKindCount); 182 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount);
183 return elements_accessors_[elements_kind]; 183 return elements_accessors_[elements_kind];
184 } 184 }
185 185
186 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array); 186 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array);
187 187
188 static void InitializeOncePerProcess(); 188 static void InitializeOncePerProcess();
189 static void TearDown(); 189 static void TearDown();
190 190
191 protected: 191 protected:
192 friend class SloppyArgumentsElementsAccessor; 192 friend class SloppyArgumentsElementsAccessor;
(...skipping 21 matching lines...) Expand all
214 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, 214 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key,
215 bool allow_appending = false); 215 bool allow_appending = false);
216 216
217 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 217 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
218 Handle<JSArray> array, 218 Handle<JSArray> array,
219 Arguments* args); 219 Arguments* args);
220 220
221 } } // namespace v8::internal 221 } } // namespace v8::internal
222 222
223 #endif // V8_ELEMENTS_H_ 223 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698