| Index: src/ic.cc
|
| diff --git a/src/ic.cc b/src/ic.cc
|
| index 9e9aa933cb766c2dd77be376c45cdbd3dd192d82..f8124c33091d89afa7e85274f8883f1badc3a118 100644
|
| --- a/src/ic.cc
|
| +++ b/src/ic.cc
|
| @@ -670,19 +670,6 @@ Handle<Map> IC::TypeToMap(HeapType* type, Isolate* isolate) {
|
| }
|
|
|
|
|
| -Handle<HeapType> IC::MapToType(Handle<Map> map) {
|
| - Isolate* isolate = map->GetIsolate();
|
| - if (map->instance_type() == HEAP_NUMBER_TYPE) {
|
| - return HeapType::Number(isolate);
|
| - } else if (map->instance_type() == ODDBALL_TYPE) {
|
| - // The only oddballs that can be recorded in ICs are booleans.
|
| - return HeapType::Boolean(isolate);
|
| - } else {
|
| - return HeapType::Class(map, isolate);
|
| - }
|
| -}
|
| -
|
| -
|
| void IC::UpdateMonomorphicIC(Handle<HeapType> type,
|
| Handle<Code> handler,
|
| Handle<String> name) {
|
| @@ -908,9 +895,11 @@ Handle<Code> LoadIC::CompileHandler(LookupResult* lookup,
|
| // Use simple field loads for some well-known callback properties.
|
| if (object->IsJSObject()) {
|
| Handle<JSObject> receiver = Handle<JSObject>::cast(object);
|
| - Handle<HeapType> type = IC::MapToType(handle(receiver->map()));
|
| + Handle<HeapType> type = IC::MapToType<HeapType>(
|
| + handle(receiver->map()), isolate());
|
| int object_offset;
|
| - if (Accessors::IsJSObjectFieldAccessor(type, name, &object_offset)) {
|
| + if (Accessors::IsJSObjectFieldAccessor<HeapType>(
|
| + type, name, &object_offset)) {
|
| return SimpleFieldLoad(object_offset / kPointerSize);
|
| }
|
| }
|
| @@ -1436,7 +1425,8 @@ Handle<Code> KeyedStoreIC::StoreElementStub(Handle<JSObject> receiver,
|
| transitioned_receiver_map =
|
| ComputeTransitionedMap(receiver, store_mode);
|
| }
|
| - if (IsTransitionOfMonomorphicTarget(MapToType(transitioned_receiver_map))) {
|
| + if (IsTransitionOfMonomorphicTarget(
|
| + MapToType<HeapType>(transitioned_receiver_map, isolate()))) {
|
| // Element family is the same, use the "worst" case map.
|
| store_mode = GetNonTransitioningStoreMode(store_mode);
|
| return isolate()->stub_cache()->ComputeKeyedStoreElement(
|
|
|