Scrub double-conversion and add quick wrapper

This commit is contained in:
Justine Tunney 2022-06-26 04:58:44 -07:00
parent b1de862e16
commit 5cd0e876bd
46 changed files with 322 additions and 804 deletions

View file

@ -24,11 +24,11 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "third_party/double-conversion/test/cctest.h"
#include "libc/isystem/stdio.h"
#include "libc/isystem/stdlib.h"
#include "libc/isystem/string.h"
#include "third_party/double-conversion/test/cctest.h"
// clang-format off
CcTest* CcTest::last_ = NULL;

View file

@ -1,4 +1,4 @@
// Copyright 2008 the V8 project authors. All rights reserved.
// Copyright 2006-2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@ -24,14 +24,12 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef CCTEST_H_
#define CCTEST_H_
#include "libc/isystem/stdio.h"
#include "libc/isystem/string.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
#ifndef TEST
#define TEST(Name) \

View file

@ -24,13 +24,11 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef V8_CHECKS_H_
#define V8_CHECKS_H_
#include "libc/isystem/string.h"
#include "third_party/double-conversion/test/flags.h"
// clang-format off
extern "C" void V8_Fatal(const char* file, int line, const char* format, ...);
void API_Fatal(const char* location, const char* format, ...);

View file

@ -1,3 +1,4 @@
// clang-format off
// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View file

@ -1,3 +1,4 @@
// clang-format off
// Copyright 2010 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View file

@ -1,3 +1,4 @@
// clang-format off
// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View file

@ -1,3 +1,4 @@
// clang-format off
// Copyright 2006-2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are

View file

@ -24,18 +24,16 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "third_party/double-conversion/bignum-dtoa.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/test/gay-fixed.h"
#include "third_party/double-conversion/test/gay-precision.h"
#include "third_party/double-conversion/test/gay-shortest.h"
#include "third_party/double-conversion/test/gay-shortest-single.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/gay-shortest.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
using namespace double_conversion;

View file

@ -24,14 +24,12 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "libc/isystem/string.h"
#include "third_party/double-conversion/bignum.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
using namespace double_conversion;

View file

@ -24,13 +24,12 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/string.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/double-conversion.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
// DoubleToString is already tested in test-dtoa.cc.

View file

@ -24,12 +24,11 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/diy-fp.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
using namespace double_conversion;

View file

@ -24,17 +24,15 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "third_party/double-conversion/double-conversion.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/test/gay-fixed.h"
#include "third_party/double-conversion/test/gay-precision.h"
#include "third_party/double-conversion/test/gay-shortest.h"
#include "third_party/double-conversion/test/gay-shortest-single.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/gay-shortest.h"
// clang-format off
using namespace double_conversion;

View file

@ -24,17 +24,16 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/diy-fp.h"
#include "third_party/double-conversion/fast-dtoa.h"
#include "third_party/double-conversion/test/gay-precision.h"
#include "third_party/double-conversion/test/gay-shortest.h"
#include "third_party/double-conversion/test/gay-shortest-single.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/test/gay-precision.h"
#include "third_party/double-conversion/test/gay-shortest-single.h"
#include "third_party/double-conversion/test/gay-shortest.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
using namespace double_conversion;

View file

@ -24,15 +24,13 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/fixed-dtoa.h"
#include "third_party/double-conversion/test/gay-fixed.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/test/gay-fixed.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
using namespace double_conversion;

View file

@ -24,14 +24,13 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "third_party/libcxx/limits"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/diy-fp.h"
#include "third_party/double-conversion/utils.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/utils.h"
#include "third_party/libcxx/limits"
// clang-format off
using namespace double_conversion;

View file

@ -24,15 +24,14 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "libc/isystem/stdlib.h"
#include "third_party/double-conversion/bignum.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/diy-fp.h"
#include "third_party/double-conversion/ieee.h"
#include "third_party/double-conversion/strtod.h"
#include "third_party/double-conversion/test/cctest.h"
#include "third_party/double-conversion/utils.h"
// clang-format off
using namespace double_conversion;