libraries/v8/runtime.cc
// Fast version of Math.pow if we know that y is not an integer and y is not
// -0.5 or 0.5.  Used as slow case from full codegen.
Fast version of Math.pow if we know that y is not an integer and y is not
0.5 or 0.5.  Used as slow case from full codegen.
Fast version of Math . pow if we know that y is not an integer and y is not 0 . 5 or 0 . 5 . Used as slow case from full codegen .
RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow_cfunction) {
  SealHandleScope shs(isolate);
  ASSERT(args.length() == 2);
  isolate->counters()->math_pow()->Increment();
  CONVERT_DOUBLE_ARG_CHECKED(x, 0);
  CONVERT_DOUBLE_ARG_CHECKED(y, 1);
  if (y == 0) {
    return Smi::FromInt(1);
  } else {
    double result = power_double_double(x, y);
    if (std::isnan(result)) return isolate->heap()->nan_value();
    return isolate->heap()->AllocateHeapNumber(result);
  }
}
RUNTIME_FUNCTION ( MaybeObject * , Runtime_Math_pow_cfunction ) { SealHandleScope shs ( isolate ) ; ASSERT ( args . length ( ) == 2 ) ; isolate -> counters ( ) -> math_pow ( ) -> Increment ( ) ; CONVERT_DOUBLE_ARG_CHECKED ( x , 0 ) ; CONVERT_DOUBLE_ARG_CHECKED ( y , 1 ) ; if ( y == 0 ) { return Smi :: FromInt ( 1 ) ; } else { double result = power_double_double ( x , y ) ; if ( std :: isnan ( result ) ) return isolate -> heap ( ) -> nan_value ( ) ; return isolate -> heap ( ) -> AllocateHeapNumber ( result ) ; } }
Fast version of Math.pow if we know that y is not an integer and y is not
0.5 or 0.5.
Fast version of Math . pow if we know that y is not an integer and y is not 0 . 5 or 0 . 5 .