Reviewers: Yang,
Description:
Actually implement the sqrt intrinsic in Crankshaft
Please review this at https://codereview.chromium.org/13844009/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen.cc
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());
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.