 Chromium Code Reviews
 Chromium Code Reviews Issue 13844009:
  Actually implement the sqrt intrinsic in Crankshaft  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 13844009:
  Actually implement the sqrt intrinsic in Crankshaft  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| 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
 | 
| } |