Actually implement the sqrt intrinsic in Crankshaft

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14260 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
svenpanne@chromium.org 2013-04-15 10:36:12 +00:00
parent 1441a13599
commit f70bcae9a9

View File

@ -10966,7 +10966,13 @@ void HOptimizedGraphBuilder::GenerateMathLog(CallRuntime* call) {
void HOptimizedGraphBuilder::GenerateMathSqrt(CallRuntime* call) { 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());
} }