[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}
This commit is contained in:
bmeurer 2015-08-10 05:07:11 -07:00 committed by Commit bot
parent 6447b78f8e
commit d7ad5e2ac3
2 changed files with 10 additions and 0 deletions

View File

@ -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) {
DCHECK(call->arguments()->length() == 1);
CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));

View File

@ -2197,6 +2197,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
F(TwoByteSeqStringSetChar) \
F(ObjectEquals) \
F(IsObject) \
F(ToObject) \
F(IsFunction) \
F(IsUndetectableObject) \
F(IsSpecObject) \