Commit 437616e3 authored by verwaest's avatar verwaest Committed by Commit bot

[crankshaft] Check checked_function->ActualValue() in BuildWrapReceiver

Given that an additional map-check is inserted for function, we need to
check the underlying value.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34359}
parent c268aea4
......@@ -1302,9 +1302,9 @@ HValue* HGraphBuilder::BuildCheckString(HValue* string) {
return string;
}
HValue* HGraphBuilder::BuildWrapReceiver(HValue* object, HValue* function) {
HValue* HGraphBuilder::BuildWrapReceiver(HValue* object, HValue* checked) {
if (object->type().IsJSObject()) return object;
HValue* function = checked->ActualValue();
if (function->IsConstant() &&
HConstant::cast(function)->handle(isolate())->IsJSFunction()) {
Handle<JSFunction> f = Handle<JSFunction>::cast(
......@@ -1312,7 +1312,7 @@ HValue* HGraphBuilder::BuildWrapReceiver(HValue* object, HValue* function) {
SharedFunctionInfo* shared = f->shared();
if (is_strict(shared->language_mode()) || shared->native()) return object;
}
return Add<HWrapReceiver>(object, function);
return Add<HWrapReceiver>(object, checked);
}
......
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