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

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

Issue 2412983008: [ic] Move Smi-handler creation code to SmiHandler class. (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/ic/handler-compiler.cc ('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 bf7c4770b91d04ef2849aeb1029079023635b36e..b9c35e433d14c208011323461af38efbc41d68fd 100644
--- a/src/ic/handler-configuration.h
+++ b/src/ic/handler-configuration.h
@@ -6,6 +6,7 @@
#define V8_IC_HANDLER_CONFIGURATION_H_
#include "src/elements-kind.h"
+#include "src/field-index.h"
#include "src/globals.h"
#include "src/utils.h"
@@ -17,7 +18,7 @@ enum LoadHandlerType {
kLoadICHandlerForProperties = 1
};
-class LoadHandlerTypeBit : public BitField<bool, 0, 1> {};
+class LoadHandlerTypeBit : public BitField<LoadHandlerType, 0, 1> {};
// Encoding for configuration Smis for property loads:
class FieldOffsetIsInobject
@@ -39,6 +40,18 @@ class KeyedLoadElementsKind
// Make sure we don't overflow into the sign bit.
STATIC_ASSERT(KeyedLoadElementsKind::kNext <= kSmiValueSize - 1);
+// This class is a collection of factory methods for various Smi-encoded
+// IC handlers consumed by respective IC dispatchers.
+class SmiHandler {
+ public:
+ static inline Handle<Object> MakeLoadFieldHandler(Isolate* isolate,
+ FieldIndex field_index);
+
+ static inline Handle<Object> MakeKeyedLoadHandler(
+ Isolate* isolate, ElementsKind elements_kind,
+ bool convert_hole_to_undefined, bool is_js_array);
+};
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/ic/handler-compiler.cc ('k') | src/ic/handler-configuration-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698