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

Unified Diff: src/ic/handler-configuration.h

Issue 2418063003: [ic] Smi-handlers are now able to represent loads of constants from descriptor array. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/counters.h ('k') | src/ic/handler-configuration-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/handler-configuration.h
diff --git a/src/ic/handler-configuration.h b/src/ic/handler-configuration.h
index b9c35e433d14c208011323461af38efbc41d68fd..b96e958e5c35902e0d50b3453d39e524a3eadce8 100644
--- a/src/ic/handler-configuration.h
+++ b/src/ic/handler-configuration.h
@@ -15,24 +15,35 @@ namespace internal {
enum LoadHandlerType {
kLoadICHandlerForElements = 0,
- kLoadICHandlerForProperties = 1
+ kLoadICHandlerForFields = 1,
+ kLoadICHandlerForConstants = 2
};
-class LoadHandlerTypeBit : public BitField<LoadHandlerType, 0, 1> {};
+class LoadHandlerTypeBits : public BitField<LoadHandlerType, 0, 2> {};
-// Encoding for configuration Smis for property loads:
+// Encoding for configuration Smis for constants loads (when LoadHandlerTypeBits
+// contain LoadICHandlerForConstants):
+class ValueIndexInDescriptorArray
+ : public BitField<int, LoadHandlerTypeBits::kNext,
+ kDescriptorIndexBitCount + 2> {};
+// Make sure we don't overflow into the sign bit.
+STATIC_ASSERT(ValueIndexInDescriptorArray::kNext <= kSmiValueSize - 1);
+
+// Encoding for configuration Smis for field loads (when LoadHandlerTypeBits
+// contain LoadICHandlerForFields):
class FieldOffsetIsInobject
- : public BitField<bool, LoadHandlerTypeBit::kNext, 1> {};
+ : public BitField<bool, LoadHandlerTypeBits::kNext, 1> {};
class FieldOffsetIsDouble
: public BitField<bool, FieldOffsetIsInobject::kNext, 1> {};
-class FieldOffsetOffset : public BitField<int, FieldOffsetIsDouble::kNext, 27> {
+class FieldOffsetOffset : public BitField<int, FieldOffsetIsDouble::kNext, 26> {
};
// Make sure we don't overflow into the sign bit.
STATIC_ASSERT(FieldOffsetOffset::kNext <= kSmiValueSize - 1);
-// Encoding for configuration Smis for elements loads:
-class KeyedLoadIsJsArray : public BitField<bool, LoadHandlerTypeBit::kNext, 1> {
-};
+// Encoding for configuration Smis for elements loads (when LoadHandlerTypeBits
+// contain LoadICHandlerForElements)
+class KeyedLoadIsJsArray
+ : public BitField<bool, LoadHandlerTypeBits::kNext, 1> {};
class KeyedLoadConvertHole
: public BitField<bool, KeyedLoadIsJsArray::kNext, 1> {};
class KeyedLoadElementsKind
@@ -47,6 +58,9 @@ class SmiHandler {
static inline Handle<Object> MakeLoadFieldHandler(Isolate* isolate,
FieldIndex field_index);
+ static inline Handle<Object> MakeLoadConstantHandler(Isolate* isolate,
+ int descriptor);
+
static inline Handle<Object> MakeKeyedLoadHandler(
Isolate* isolate, ElementsKind elements_kind,
bool convert_hole_to_undefined, bool is_js_array);
« no previous file with comments | « src/counters.h ('k') | src/ic/handler-configuration-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698