Review URL: https://codereview.chromium.org/
13844009
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14260
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) {
- return Bailout("inlined runtime function: MathSqrt");
+ ASSERT(call->arguments()->length() == 1);
+ CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
+ HValue* value = Pop();
+ HValue* context = environment()->LookupContext();
+ HInstruction* result =
+ HUnaryMathOperation::New(zone(), context, value, kMathSqrt);
+ return ast_context()->ReturnInstruction(result, call->id());
}