Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 619b7e5caa84954e61717ebf2dc79b31d6a289a0..d5adca6c97b269bbc572b9b06588c03a254f965c 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5797,11 +5797,9 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedField( |
HConstant::cast(checked_object->ActualValue())->handle(isolate())); |
if (object->IsJSObject()) { |
- LookupResult lookup(isolate()); |
- Handle<JSObject>::cast(object)->Lookup(info->name(), &lookup); |
- Handle<Object> value(lookup.GetLazyValue(), isolate()); |
- |
- DCHECK(!value->IsTheHole()); |
+ LookupIterator it(object, info->name(), LookupIterator::CHECK_PROPERTY); |
+ Handle<Object> value = JSObject::GetDataProperty(&it); |
+ CHECK(it.IsFound()); |
return New<HConstant>(value); |
} |
} |
@@ -10695,10 +10693,10 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) { |
!current_info()->global_object()->IsAccessCheckNeeded()) { |
Handle<String> name = proxy->name(); |
Handle<GlobalObject> global(current_info()->global_object()); |
- LookupResult lookup(isolate()); |
- global->Lookup(name, &lookup); |
- if (lookup.IsNormal() && lookup.GetValue()->IsJSFunction()) { |
- Handle<JSFunction> candidate(JSFunction::cast(lookup.GetValue())); |
+ LookupIterator it(global, name, LookupIterator::CHECK_PROPERTY); |
+ Handle<Object> value = JSObject::GetDataProperty(&it); |
+ if (it.IsFound() && value->IsJSFunction()) { |
+ Handle<JSFunction> candidate = Handle<JSFunction>::cast(value); |
// If the function is in new space we assume it's more likely to |
// change and thus prefer the general IC code. |
if (!isolate()->heap()->InNewSpace(*candidate)) { |