[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:
parent
6447b78f8e
commit
d7ad5e2ac3
@ -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)));
|
||||
|
@ -2197,6 +2197,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
|
||||
F(TwoByteSeqStringSetChar) \
|
||||
F(ObjectEquals) \
|
||||
F(IsObject) \
|
||||
F(ToObject) \
|
||||
F(IsFunction) \
|
||||
F(IsUndetectableObject) \
|
||||
F(IsSpecObject) \
|
||||
|
Loading…
Reference in New Issue
Block a user