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

Unified Diff: src/ic/ic.cc

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-configuration-inl.h ('k') | src/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 21c5bc76a439dbc0810a2130585304ab443b9502..698dde5e53e43de4c9ff0241d28cf5c8be7ab3a1 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -16,6 +16,7 @@
#include "src/frames-inl.h"
#include "src/ic/call-optimization.h"
#include "src/ic/handler-compiler.h"
+#include "src/ic/handler-configuration-inl.h"
#include "src/ic/ic-compiler.h"
#include "src/ic/ic-inl.h"
#include "src/ic/stub-cache.h"
@@ -849,7 +850,7 @@ Handle<Code> KeyedStoreIC::ChooseMegamorphicStub(Isolate* isolate,
Handle<Object> LoadIC::SimpleFieldLoad(FieldIndex index) {
if (FLAG_tf_load_ic_stub) {
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldDH);
- return handle(Smi::FromInt(index.GetLoadByFieldOffset()), isolate());
+ return SmiHandler::MakeLoadFieldHandler(isolate(), index);
}
TRACE_HANDLER_STATS(isolate(), LoadIC_LoadFieldStub);
LoadFieldStub stub(isolate(), index);
@@ -888,9 +889,7 @@ Handle<Object> LoadIC::SimpleFieldLoadFromPrototype(FieldIndex index,
Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate());
DCHECK(!validity_cell.is_null());
- Handle<Object> handler(Smi::FromInt(index.GetLoadByFieldOffset()), isolate());
- DCHECK(handler->IsSmi());
-
+ Handle<Object> handler(SmiHandler::MakeLoadFieldHandler(isolate(), index));
Factory* factory = isolate()->factory();
Handle<WeakCell> holder_cell = factory->NewWeakCell(holder);
« no previous file with comments | « src/ic/handler-configuration-inl.h ('k') | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698