chromium/v8/src/objects/option-utils.cc

// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/objects/option-utils.h"

#include "src/numbers/conversions.h"
#include "src/objects/objects-inl.h"

namespace v8 {
namespace internal {

// ecma402/#sec-getoptionsobject
MaybeHandle<JSReceiver> GetOptionsObject(Isolate* isolate,
                                         Handle<Object> options,
                                         const char* method_name) {}

// ecma402/#sec-coerceoptionstoobject
MaybeHandle<JSReceiver> CoerceOptionsToObject(Isolate* isolate,
                                              Handle<Object> options,
                                              const char* method_name) {}

Maybe<bool> GetStringOption(Isolate* isolate, Handle<JSReceiver> options,
                            const char* property,
                            const std::vector<const char*>& values,
                            const char* method_name,
                            std::unique_ptr<char[]>* result) {}

V8_WARN_UNUSED_RESULT Maybe<bool> GetBoolOption(Isolate* isolate,
                                                Handle<JSReceiver> options,
                                                const char* property,
                                                const char* method_name,
                                                bool* result) {}

// ecma402/#sec-defaultnumberoption
Maybe<int> DefaultNumberOption(Isolate* isolate, Handle<Object> value, int min,
                               int max, int fallback, Handle<String> property) {}

// ecma402/#sec-getnumberoption
Maybe<int> GetNumberOption(Isolate* isolate, Handle<JSReceiver> options,
                           Handle<String> property, int min, int max,
                           int fallback) {}

// #sec-getoption while type is "number"
Maybe<double> GetNumberOptionAsDouble(Isolate* isolate,
                                      Handle<JSReceiver> options,
                                      Handle<String> property,
                                      double default_value) {}

}  // namespace internal
}  // namespace v8