From 934d8428a62094cab6a825249c639736e65bef07 Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Tue, 18 Oct 2016 16:46:01 +0900 Subject: [PATCH] Bug 1304191 - Part 10: Remove JSVAL_TO_IMPL and IMPL_TO_JSVAL. r=jwalden --- js/public/Value.h | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/js/public/Value.h b/js/public/Value.h index 1a8d0a0dcf41..267898dfa134 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -354,9 +354,6 @@ JS_STATIC_ASSERT(sizeof(jsval_layout) == 8); # define JS_VALUE_CONSTEXPR_VAR const #endif -static inline jsval_layout JSVAL_TO_IMPL(const JS::Value& v); -static inline JS_VALUE_CONSTEXPR JS::Value IMPL_TO_JSVAL(const jsval_layout& l); - namespace JS { static inline JS_VALUE_CONSTEXPR JS::Value UndefinedValue(); @@ -945,7 +942,6 @@ class Value #if defined(JS_VALUE_IS_CONSTEXPR) explicit JS_VALUE_CONSTEXPR Value(uint64_t asBits) : data({ .asBits = asBits }) {} explicit JS_VALUE_CONSTEXPR Value(double d) : data({ .asDouble = d }) {} - MOZ_IMPLICIT JS_VALUE_CONSTEXPR Value(const jsval_layout& layout) : data(layout) {} #endif void staticAssertions() { @@ -955,8 +951,6 @@ class Value JS_STATIC_ASSERT(sizeof(Value) == 8); } - friend jsval_layout (::JSVAL_TO_IMPL)(const Value&); - friend Value JS_VALUE_CONSTEXPR (::IMPL_TO_JSVAL)(const jsval_layout& l); friend Value JS_VALUE_CONSTEXPR (JS::UndefinedValue)(); public: @@ -1521,24 +1515,6 @@ template struct BoolDefaultAdaptor { static bool defaultValue( } // namespace js -inline jsval_layout -JSVAL_TO_IMPL(const JS::Value& v) -{ - return v.data; -} - -inline JS_VALUE_CONSTEXPR JS::Value -IMPL_TO_JSVAL(const jsval_layout& l) -{ -#if defined(JS_VALUE_IS_CONSTEXPR) - return JS::Value(l); -#else - JS::Value v; - v.data = l; - return v; -#endif -} - namespace JS { #ifdef JS_DEBUG