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

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

Issue 2433333002: [ic] Refactoring definition of a smi-encoded load handlers. (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-configuration.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/handler-configuration-inl.h
diff --git a/src/ic/handler-configuration-inl.h b/src/ic/handler-configuration-inl.h
index a17bbe3d291a9507b59d6d19eaddf317ff5bfc76..7e7eec4f156ca12444d1677559615be3fde854ed 100644
--- a/src/ic/handler-configuration-inl.h
+++ b/src/ic/handler-configuration-inl.h
@@ -13,31 +13,30 @@
namespace v8 {
namespace internal {
-Handle<Object> SmiHandler::MakeLoadFieldHandler(Isolate* isolate,
- FieldIndex field_index) {
- int config = LoadHandlerTypeBits::encode(kLoadICHandlerForFields) |
- FieldOffsetIsInobject::encode(field_index.is_inobject()) |
- FieldOffsetIsDouble::encode(field_index.is_double()) |
- FieldOffsetOffset::encode(field_index.offset());
+Handle<Object> LoadHandler::LoadField(Isolate* isolate,
+ FieldIndex field_index) {
+ int config = KindBits::encode(kForFields) |
+ IsInobjectBits::encode(field_index.is_inobject()) |
+ IsDoubleBits::encode(field_index.is_double()) |
+ FieldOffsetBits::encode(field_index.offset());
return handle(Smi::FromInt(config), isolate);
}
-Handle<Object> SmiHandler::MakeLoadConstantHandler(Isolate* isolate,
- int descriptor) {
- int config = LoadHandlerTypeBits::encode(kLoadICHandlerForConstants) |
- ValueIndexInDescriptorArray::encode(
+Handle<Object> LoadHandler::LoadConstant(Isolate* isolate, int descriptor) {
+ int config = KindBits::encode(kForConstants) |
+ DescriptorValueIndexBits::encode(
DescriptorArray::ToValueIndex(descriptor));
return handle(Smi::FromInt(config), isolate);
}
-Handle<Object> SmiHandler::MakeKeyedLoadHandler(Isolate* isolate,
- ElementsKind elements_kind,
- bool convert_hole_to_undefined,
- bool is_js_array) {
- int config = LoadHandlerTypeBits::encode(kLoadICHandlerForElements) |
- KeyedLoadElementsKind::encode(elements_kind) |
- KeyedLoadConvertHole::encode(convert_hole_to_undefined) |
- KeyedLoadIsJsArray::encode(is_js_array);
+Handle<Object> LoadHandler::LoadElement(Isolate* isolate,
+ ElementsKind elements_kind,
+ bool convert_hole_to_undefined,
+ bool is_js_array) {
+ int config = KindBits::encode(kForElements) |
+ ElementsKindBits::encode(elements_kind) |
+ ConvertHoleBits::encode(convert_hole_to_undefined) |
+ IsJsArrayBits::encode(is_js_array);
return handle(Smi::FromInt(config), isolate);
}
« no previous file with comments | « src/ic/handler-configuration.h ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698