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

Unified Diff: src/hydrogen.cc

Issue 480823004: Get rid of GetLazyValue and clients. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/heap-snapshot-generator.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698