Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: src/hydrogen.cc

Issue 13844009: Actually implement the sqrt intrinsic in Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index a2ddc04b9174f2ec7b95f68acd3acd199ee0a848..ab1428e303bfb25f1ee51e2650898689ca6db258 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -10965,7 +10965,13 @@ void HOptimizedGraphBuilder::GenerateMathLog(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());
tfarina 2013/04/16 01:23:19 why you return here, if the return type of Generat
Sven Panne 2013/04/16 06:11:16 There is no deep reason, just for consistency with
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698