chromium/v8/src/utils/utils.cc

// Copyright 2011 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/utils/utils.h"

#include <stdarg.h>
#include <sys/stat.h>

#include <cstring>
#include <vector>

#include "src/base/functional.h"
#include "src/base/logging.h"
#include "src/base/platform/platform.h"
#include "src/base/platform/wrappers.h"
#include "src/utils/allocation.h"

#ifdef V8_CC_MSVC
#include <intrin.h>  // _AddressOfReturnAddress()
#endif

namespace v8 {
namespace internal {

std::ostream& operator<<(std::ostream& os, FeedbackSlot slot) {}

size_t hash_value(BytecodeOffset id) {}

std::ostream& operator<<(std::ostream& os, BytecodeOffset id) {}

void PrintF(const char* format, ...) {}

void PrintF(FILE* out, const char* format, ...) {}

void PrintPID(const char* format, ...) {}

void PrintIsolate(void* isolate, const char* format, ...) {}

char* ReadLine(const char* prompt) {}

namespace {

std::vector<char> ReadCharsFromFile(FILE* file, bool* exists, bool verbose,
                                    const char* filename) {}

std::vector<char> ReadCharsFromFile(const char* filename, bool* exists,
                                    bool verbose) {}

std::string VectorToString(const std::vector<char>& chars) {}

int WriteCharsToFile(const char* str, int size, FILE* f) {}

}  // namespace

std::string ReadFile(const char* filename, bool* exists, bool verbose) {}

std::string ReadFile(FILE* file, bool* exists, bool verbose) {}

int WriteChars(const char* filename, const char* str, int size, bool verbose) {}

int WriteBytes(const char* filename, const uint8_t* bytes, int size,
               bool verbose) {}

// Returns false iff d is NaN, +0, or -0.
bool DoubleToBoolean(double d) {}

uintptr_t GetCurrentStackPosition() {}

// The filter is a pattern that matches function names in this way:
//   "*"      all; the default
//   "-"      all but the top-level function
//   "-name"  all but the function "name"
//   ""       only the top-level function
//   "name"   only the function "name"
//   "name*"  only functions starting with "name"
//   "~"      none; the tilde is not an identifier
bool PassesFilter(base::Vector<const char> name,
                  base::Vector<const char> filter) {}

}  // namespace internal
}  // namespace v8