Chromium Code Reviews| Index: src/hydrogen.cc |
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
| index 9d990bf93cc857ba325f11163fac940f84cc5c46..45bc272c43fbb05c3902435937b8acad9cd0bd47 100644 |
| --- a/src/hydrogen.cc |
| +++ b/src/hydrogen.cc |
| @@ -4233,7 +4233,10 @@ 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); |
|
Michael Starzinger
2013/10/23 08:40:21
As discussed offline: Can we leave a TODO here tha
|
| + if (call_optimization.is_simple_api_call()) return false; |
| + *setter = func; |
| return true; |
| } |
| return false; |
| @@ -4746,7 +4749,10 @@ 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); |
|
Michael Starzinger
2013/10/23 08:40:21
Likewise.
|
| + if (call_optimization.is_simple_api_call()) return false; |
| + accessor_ = accessor; |
| } else if (lookup_.IsConstant()) { |
| constant_ = handle(lookup_.GetConstantFromMap(*map), isolate()); |
| } |