Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 9d990bf93cc857ba325f11163fac940f84cc5c46..da499922a17423059e9473806cd322cf8074c9cd 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -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()); |
} |