Commit d7ad5e2a authored by bmeurer's avatar bmeurer Committed by Commit bot

[crankshaft] Properly optimize %_ToObject.

R=yangguo@chromium.org
BUG=chromium:516423
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30088}
parent 6447b78f
...@@ -12100,6 +12100,15 @@ void HOptimizedGraphBuilder::GenerateIsObject(CallRuntime* call) { ...@@ -12100,6 +12100,15 @@ void HOptimizedGraphBuilder::GenerateIsObject(CallRuntime* call) {
} }
void HOptimizedGraphBuilder::GenerateToObject(CallRuntime* call) {
DCHECK_EQ(1, call->arguments()->length());
CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
HValue* value = Pop();
HValue* result = BuildToObject(value);
return ast_context()->ReturnValue(result);
}
void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) { void HOptimizedGraphBuilder::GenerateIsJSProxy(CallRuntime* call) {
DCHECK(call->arguments()->length() == 1); DCHECK(call->arguments()->length() == 1);
CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
......
...@@ -2197,6 +2197,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor { ...@@ -2197,6 +2197,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
F(TwoByteSeqStringSetChar) \ F(TwoByteSeqStringSetChar) \
F(ObjectEquals) \ F(ObjectEquals) \
F(IsObject) \ F(IsObject) \
F(ToObject) \
F(IsFunction) \ F(IsFunction) \
F(IsUndetectableObject) \ F(IsUndetectableObject) \
F(IsSpecObject) \ F(IsSpecObject) \
......
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