libraries/v8/runtime.cc
// Helper function to find or create the arguments object for
// Runtime_DebugEvaluate.
Helper function to find or create the arguments object for
Runtime_DebugEvaluate.
Helper function to find or create the arguments object for Runtime_DebugEvaluate .
static Handle<JSObject> MaterializeArgumentsObject(
    Isolate* isolate,
    Handle<JSObject> target,
    Handle<JSFunction> function) {
  if (!function->shared()->is_function() ||
      JSReceiver::HasLocalProperty(target,
                                   isolate->factory()->arguments_string())) {
    return target;
  }
  Handle<JSObject> arguments = Handle<JSObject>::cast(
      Accessors::FunctionGetArguments(function));
  SetProperty(isolate,
              target,
              isolate->factory()->arguments_string(),
              arguments,
              ::NONE,
              kNonStrictMode);
  return target;
}
static Handle < JSObject > MaterializeArgumentsObject ( Isolate * isolate , Handle < JSObject > target , Handle < JSFunction > function ) { if ( ! function -> shared ( ) -> is_function ( ) || JSReceiver :: HasLocalProperty ( target , isolate -> factory ( ) -> arguments_string ( ) ) ) { return target ; } Handle < JSObject > arguments = Handle < JSObject > :: cast ( Accessors :: FunctionGetArguments ( function ) ) ; SetProperty ( isolate , target , isolate -> factory ( ) -> arguments_string ( ) , arguments , :: NONE , kNonStrictMode ) ; return target ; }
Helper function to find or create the arguments object for
Runtime_DebugEvaluate.
Helper function to find or create the arguments object for Runtime_DebugEvaluate .
// Do not materialize the arguments object for eval or top-level code. // Skip if "arguments" is already taken. // FunctionGetArguments can't throw an exception.