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

Side by Side Diff: src/ic/handler-configuration.h

Issue 2180273002: [KeyedLoadIC] Support Smi "handlers" for element loads (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@keyed-load-ic-fieldindex
Patch Set: rebased Created 4 years, 4 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
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_IC_HANDLER_CONFIGURATION_H_
6 #define V8_IC_HANDLER_CONFIGURATION_H_
7
8 #include "src/elements-kind.h"
9 #include "src/globals.h"
10 #include "src/utils.h"
11
12 namespace v8 {
13 namespace internal {
14
15 enum LoadHandlerType {
16 kLoadICHandlerForElements = 0,
17 kLoadICHandlerForProperties = 1
18 };
19
20 class LoadHandlerTypeBit : public BitField<bool, 0, 1> {};
21
22 // Encoding for configuration Smis for property loads:
23 class FieldOffsetIsInobject
24 : public BitField<bool, LoadHandlerTypeBit::kNext, 1> {};
25 class FieldOffsetIsDouble
26 : public BitField<bool, FieldOffsetIsInobject::kNext, 1> {};
27 class FieldOffsetOffset : public BitField<int, FieldOffsetIsDouble::kNext, 27> {
28 };
29 // Make sure we don't overflow into the sign bit.
30 STATIC_ASSERT(FieldOffsetOffset::kNext <= kSmiValueSize - 1);
31
32 // Encoding for configuration Smis for elements loads:
33 class KeyedLoadIsJsArray : public BitField<bool, LoadHandlerTypeBit::kNext, 1> {
34 };
35 class KeyedLoadConvertHole
36 : public BitField<bool, KeyedLoadIsJsArray::kNext, 1> {};
37 class KeyedLoadElementsKind
38 : public BitField<ElementsKind, KeyedLoadConvertHole::kNext, 8> {};
39 // Make sure we don't overflow into the sign bit.
40 STATIC_ASSERT(KeyedLoadElementsKind::kNext <= kSmiValueSize - 1);
41
42 } // namespace internal
43 } // namespace v8
44
45 #endif // V8_IC_HANDLER_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698