Commit 6eeb141a authored by dcarney@chromium.org's avatar dcarney@chromium.org

force accessor pair accesses backed by simple api calls to be generic accesses when crankshafted

R=mstarzinger@chromium.org
BUG=

Review URL: https://codereview.chromium.org/34773003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c91fa18d
......@@ -4233,7 +4233,11 @@ static bool LookupSetter(Handle<Map> map,
Handle<AccessorPair> accessors;
if (LookupAccessorPair(map, name, &accessors, holder) &&
accessors->setter()->IsJSFunction()) {
*setter = Handle<JSFunction>(JSFunction::cast(accessors->setter()));
Handle<JSFunction> func(JSFunction::cast(accessors->setter()));
CallOptimization call_optimization(func);
// TODO(dcarney): temporary hack unless crankshaft can handle api calls.
if (call_optimization.is_simple_api_call()) return false;
*setter = func;
return true;
}
return false;
......@@ -4746,7 +4750,11 @@ bool HOptimizedGraphBuilder::PropertyAccessInfo::LoadResult(Handle<Map> map) {
if (!callback->IsAccessorPair()) return false;
Object* getter = Handle<AccessorPair>::cast(callback)->getter();
if (!getter->IsJSFunction()) return false;
accessor_ = handle(JSFunction::cast(getter));
Handle<JSFunction> accessor = handle(JSFunction::cast(getter));
CallOptimization call_optimization(accessor);
// TODO(dcarney): temporary hack unless crankshaft can handle api calls.
if (call_optimization.is_simple_api_call()) return false;
accessor_ = accessor;
} else if (lookup_.IsConstant()) {
constant_ = handle(lookup_.GetConstantFromMap(*map), isolate());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment