Unverified Commit 73b44a18 authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: CompileTimeDefineValue numbers and regex (#90934)

- Number(f64) instead of Number(RcStr)
- Add BigInt
- Add Regex
parent 60a847b0
......@@ -9968,6 +9968,7 @@ dependencies = [
"data-encoding",
"either",
"indexmap 2.13.0",
"num-bigint",
"once_cell",
"patricia_tree",
"petgraph 0.8.3",
......
......@@ -834,9 +834,9 @@ async fn parse_config_value(
};
match value {
JsValue::Constant(ConstantValue::Num(ConstantNumber(val))) if val >= 0.0 => {
JsValue::Constant(ConstantValue::Num(ConstantNumber(val))) if *val >= 0.0 => {
config.revalidate = Some(NextRevalidate::Frequency {
seconds: val as u32,
seconds: *val as u32,
});
}
JsValue::Constant(ConstantValue::False) => {
......
......@@ -24,6 +24,7 @@ const_format = { workspace = true }
data-encoding = { workspace = true }
either = { workspace = true }
indexmap = { workspace = true }
num-bigint = "0.4"
once_cell = { workspace = true }
patricia_tree = { version = "0.10.1", features = ["serde"] }
petgraph = { workspace = true, features = ["serde-1"] }
......
use std::{
fmt::Display,
hash::{Hash, Hasher},
ops::Deref,
};
use anyhow::Result;
use bincode::{Decode, Encode};
use indexmap::Equivalent;
use num_bigint::BigInt;
use rustc_hash::FxHashSet;
use smallvec::SmallVec;
use turbo_rcstr::RcStr;
......@@ -108,12 +115,49 @@ macro_rules! free_var_references {
pub enum CompileTimeDefineValue {
Null,
Bool(bool),
Number(RcStr),
Number(TotalOrderF64),
String(RcStr),
BigInt(
#[bincode(with_serde)]
#[turbo_tasks(trace_ignore)]
Box<BigInt>,
),
Array(Vec<CompileTimeDefineValue>),
Object(Vec<(RcStr, CompileTimeDefineValue)>),
Undefined,
Evaluate(RcStr),
Regex(RcStr, RcStr),
}
/// Wrapper around f64 that implements total Eq and Hash, based on total ordering.
#[derive(Debug, Copy, Clone, TraceRawVcs, NonLocalValue, Encode, Decode)]
pub struct TotalOrderF64(f64);
impl PartialEq for TotalOrderF64 {
fn eq(&self, other: &Self) -> bool {
self.0.total_cmp(&other.0) == std::cmp::Ordering::Equal
}
}
impl Eq for TotalOrderF64 {}
impl Hash for TotalOrderF64 {
fn hash<H: Hasher>(&self, state: &mut H) {
self.0.to_le_bytes().hash(state);
}
}
impl From<f64> for TotalOrderF64 {
fn from(value: f64) -> Self {
Self(value)
}
}
impl Deref for TotalOrderF64 {
type Target = f64;
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl Display for TotalOrderF64 {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}
impl From<bool> for CompileTimeDefineValue {
......@@ -145,7 +189,11 @@ impl From<serde_json::Value> for CompileTimeDefineValue {
match value {
serde_json::Value::Null => Self::Null,
serde_json::Value::Bool(b) => Self::Bool(b),
serde_json::Value::Number(n) => Self::Number(n.to_string().into()),
serde_json::Value::Number(n) => Self::Number(
n.as_f64()
.expect("unreachable: serde-json has arbitrary_precision disabled")
.into(),
),
serde_json::Value::String(s) => Self::String(s.into()),
serde_json::Value::Array(a) => Self::Array(a.into_iter().map(|i| i.into()).collect()),
serde_json::Value::Object(m) => {
......
......@@ -102,9 +102,9 @@ pub fn replace_builtin(value: &mut JsValue) -> bool {
let JsValue::Constant(ConstantValue::Num(num)) = arg else {
return false;
};
sum += num.0;
sum += *num.0;
}
*value = JsValue::Constant(ConstantValue::Num(ConstantNumber(sum)));
*value = JsValue::Constant(ConstantValue::Num(sum.into()));
true
}
......@@ -403,7 +403,7 @@ pub fn replace_builtin(value: &mut JsValue) -> bool {
vec![
item,
JsValue::Constant(ConstantValue::Num(
ConstantNumber(i as f64),
(i as f64).into(),
)),
],
)
......
......@@ -26,8 +26,7 @@ use turbo_tasks::ResolvedVc;
use turbopack_core::{resolve::ExportUsage, source::Source};
use super::{
ConstantNumber, ConstantValue, ImportMap, JsValue, ObjectPart, WellKnownFunctionKind,
is_unresolved_id,
ConstantValue, ImportMap, JsValue, ObjectPart, WellKnownFunctionKind, is_unresolved_id,
};
use crate::{
AnalyzeMode, SpecifiedModuleType,
......@@ -519,8 +518,8 @@ impl EvalContext {
// model their values mostly useful for truthy/falsy checks.
match i.sym.as_str() {
"undefined" => JsValue::Constant(ConstantValue::Undefined),
"NaN" => JsValue::Constant(ConstantValue::Num(ConstantNumber(f64::NAN))),
"Infinity" => JsValue::Constant(ConstantValue::Num(ConstantNumber(f64::INFINITY))),
"NaN" => JsValue::Constant(ConstantValue::Num(f64::NAN.into())),
"Infinity" => JsValue::Constant(ConstantValue::Num(f64::INFINITY.into())),
_ => JsValue::FreeVar(i.sym.clone()),
}
} else {
......@@ -868,7 +867,7 @@ impl EvalContext {
}
}
pub fn eval_single_expr_lit(expr_lit: RcStr) -> Result<JsValue> {
pub fn eval_single_expr_lit(expr_lit: &RcStr) -> Result<JsValue> {
let cm = Lrc::new(SourceMap::default());
let js_value = try_with_handler(cm, Default::default(), |_| {
......@@ -3181,9 +3180,7 @@ impl Analyzer<'_> {
for (idx, elem) in arr.elems.iter().enumerate() {
let pat_value = Some(JsValue::member(
Box::new(value.clone()),
Box::new(JsValue::Constant(ConstantValue::Num(ConstantNumber(
idx as f64,
)))),
Box::new(JsValue::Constant(ConstantValue::Num((idx as f64).into()))),
));
self.with_pat_value(pat_value, |this| {
let mut ast_path = ast_path
......
......@@ -27,6 +27,7 @@ use turbo_rcstr::RcStr;
use turbo_tasks::{FxIndexMap, FxIndexSet, Vc};
use turbopack_core::compile_time_info::{
CompileTimeDefineValue, DefinableNameSegmentRef, DefinableNameSegmentRefs, FreeVarReference,
TotalOrderF64,
};
use self::imports::ImportAnnotations;
......@@ -57,44 +58,21 @@ impl Default for ObjectPart {
}
}
#[derive(Debug, Clone)]
pub struct ConstantNumber(pub f64);
fn integer_decode(val: f64) -> (u64, i16, i8) {
let bits: u64 = val.to_bits();
let sign: i8 = if bits >> 63 == 0 { 1 } else { -1 };
let mut exponent: i16 = ((bits >> 52) & 0x7ff) as i16;
let mantissa = if exponent == 0 {
(bits & 0xfffffffffffff) << 1
} else {
(bits & 0xfffffffffffff) | 0x10000000000000
};
exponent -= 1023 + 52;
(mantissa, exponent, sign)
}
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub struct ConstantNumber(pub TotalOrderF64);
impl ConstantNumber {
pub fn as_u32_index(&self) -> Option<usize> {
let index: u32 = self.0 as u32;
(index as f64 == self.0).then_some(index as usize)
let index: u32 = *self.0 as u32;
(index as f64 == *self.0).then_some(index as usize)
}
}
impl Hash for ConstantNumber {
fn hash<H: Hasher>(&self, state: &mut H) {
integer_decode(self.0).hash(state);
}
}
impl PartialEq for ConstantNumber {
fn eq(&self, other: &Self) -> bool {
integer_decode(self.0) == integer_decode(other.0)
impl From<f64> for ConstantNumber {
fn from(value: f64) -> Self {
ConstantNumber(value.into())
}
}
impl Eq for ConstantNumber {}
#[derive(Debug, Clone)]
pub enum ConstantString {
Atom(Atom),
......@@ -206,7 +184,7 @@ impl ConstantValue {
Self::Undefined | Self::False | Self::Null => false,
Self::True | Self::Regex(..) => true,
Self::Str(s) => !s.is_empty(),
Self::Num(ConstantNumber(n)) => *n != 0.0,
Self::Num(ConstantNumber(n)) => **n != 0.0,
Self::BigInt(n) => !n.is_zero(),
}
}
......@@ -264,7 +242,7 @@ impl From<Lit> for ConstantValue {
}
}
Lit::Null(_) => ConstantValue::Null,
Lit::Num(v) => ConstantValue::Num(ConstantNumber(v.value)),
Lit::Num(v) => ConstantValue::Num(ConstantNumber(v.value.into())),
Lit::BigInt(v) => ConstantValue::BigInt(v.value),
Lit::Regex(v) => ConstantValue::Regex(Box::new((v.exp, v.flags))),
Lit::JSXText(v) => ConstantValue::Str(ConstantString::Atom(v.value)),
......@@ -553,7 +531,7 @@ impl From<Box<BigInt>> for JsValue {
impl From<f64> for JsValue {
fn from(v: f64) -> Self {
ConstantValue::Num(ConstantNumber(v)).into()
ConstantValue::Num(ConstantNumber(v.into())).into()
}
}
......@@ -585,13 +563,16 @@ impl TryFrom<&CompileTimeDefineValue> for JsValue {
type Error = anyhow::Error;
fn try_from(value: &CompileTimeDefineValue) -> Result<Self> {
match value {
CompileTimeDefineValue::Null => Ok(JsValue::Constant(ConstantValue::Null)),
CompileTimeDefineValue::Bool(b) => Ok(JsValue::Constant((*b).into())),
CompileTimeDefineValue::Number(n) => Ok(JsValue::Constant(ConstantValue::Num(
ConstantNumber(n.as_str().parse::<f64>()?),
))),
CompileTimeDefineValue::String(s) => Ok(JsValue::Constant(s.as_str().into())),
Ok(JsValue::Constant(match value {
CompileTimeDefineValue::Undefined => ConstantValue::Undefined,
CompileTimeDefineValue::Null => ConstantValue::Null,
CompileTimeDefineValue::Bool(b) => (*b).into(),
CompileTimeDefineValue::Number(n) => ConstantValue::Num(ConstantNumber(*n)),
CompileTimeDefineValue::BigInt(n) => ConstantValue::BigInt(n.clone()),
CompileTimeDefineValue::String(s) => s.as_str().into(),
CompileTimeDefineValue::Regex(pattern, flags) => {
ConstantValue::Regex(Box::new((pattern.as_str().into(), flags.as_str().into())))
}
CompileTimeDefineValue::Array(a) => {
let mut js_value = JsValue::Array {
total_nodes: a.len() as u32,
......@@ -599,7 +580,7 @@ impl TryFrom<&CompileTimeDefineValue> for JsValue {
mutable: false,
};
js_value.update_total_nodes();
Ok(js_value)
return Ok(js_value);
}
CompileTimeDefineValue::Object(m) => {
let mut js_value = JsValue::Object {
......@@ -616,11 +597,32 @@ impl TryFrom<&CompileTimeDefineValue> for JsValue {
mutable: false,
};
js_value.update_total_nodes();
Ok(js_value)
return Ok(js_value);
}
CompileTimeDefineValue::Undefined => Ok(JsValue::Constant(ConstantValue::Undefined)),
CompileTimeDefineValue::Evaluate(s) => EvalContext::eval_single_expr_lit(s.clone()),
}
CompileTimeDefineValue::Evaluate(s) => {
return EvalContext::eval_single_expr_lit(s);
}
}))
}
}
impl TryFrom<&ConstantValue> for CompileTimeDefineValue {
type Error = anyhow::Error;
fn try_from(value: &ConstantValue) -> Result<Self> {
Ok(match value {
ConstantValue::Undefined => CompileTimeDefineValue::Undefined,
ConstantValue::Null => CompileTimeDefineValue::Null,
ConstantValue::True => CompileTimeDefineValue::Bool(true),
ConstantValue::False => CompileTimeDefineValue::Bool(false),
ConstantValue::Num(n) => CompileTimeDefineValue::Number(n.0),
ConstantValue::Str(s) => CompileTimeDefineValue::String(s.as_rcstr()),
ConstantValue::BigInt(n) => CompileTimeDefineValue::BigInt(n.clone()),
ConstantValue::Regex(regex) => CompileTimeDefineValue::Regex(
RcStr::from(regex.0.as_str()),
RcStr::from(regex.1.as_str()),
),
})
}
}
......
......@@ -3,7 +3,9 @@ use bincode::{Decode, Encode};
use swc_core::{
common::{DUMMY_SP, FileName, SourceMap, sync::Lrc},
ecma::{
ast::{ArrayLit, EsVersion, Expr, KeyValueProp, ObjectLit, Prop, PropName, Str},
ast::{
ArrayLit, EsVersion, Expr, KeyValueProp, Lit, ObjectLit, Prop, PropName, Regex, Str,
},
parser::{Syntax, parse_file_as_expr},
},
quote,
......@@ -37,8 +39,7 @@ impl ConstantValueCodeGen {
let value = self.value.clone();
let visitor = create_visitor!(self.path, visit_mut_expr, |expr: &mut Expr| {
// TODO: avoid this clone
*expr = define_env_to_expr((value).clone());
*expr = value_to_expr(&value);
});
Ok(CodeGeneration::visitors(vec![visitor]))
......@@ -51,8 +52,11 @@ impl From<ConstantValueCodeGen> for CodeGen {
}
}
fn define_env_to_expr(value: CompileTimeDefineValue) -> Expr {
fn value_to_expr(value: &CompileTimeDefineValue) -> Expr {
match value {
CompileTimeDefineValue::Undefined => {
quote!("(\"TURBOPACK compile-time value\", void 0)" as Expr)
}
CompileTimeDefineValue::Null => {
quote!("(\"TURBOPACK compile-time value\", null)" as Expr)
}
......@@ -62,28 +66,38 @@ fn define_env_to_expr(value: CompileTimeDefineValue) -> Expr {
CompileTimeDefineValue::Bool(false) => {
quote!("(\"TURBOPACK compile-time value\", false)" as Expr)
}
CompileTimeDefineValue::Number(ref n) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = n.parse::<f64>().unwrap().into())
CompileTimeDefineValue::Number(n) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = (**n).into())
}
CompileTimeDefineValue::String(s) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = s.as_str().into())
}
CompileTimeDefineValue::String(ref s) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = s.to_string().into())
CompileTimeDefineValue::BigInt(n) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = Expr::Lit(Lit::BigInt(n.as_ref().clone().into())))
}
CompileTimeDefineValue::Regex(pattern, flags) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = Expr::Lit(Lit::Regex(Regex {
span: DUMMY_SP,
exp: pattern.as_str().into(),
flags: flags.as_str().into(),
})))
}
CompileTimeDefineValue::Array(a) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = Expr::Array(ArrayLit {
span: DUMMY_SP,
elems: a.into_iter().map(|i| Some(define_env_to_expr(i).into())).collect(),
elems: a.iter().map(|i| Some(value_to_expr(i).into())).collect(),
}))
}
CompileTimeDefineValue::Object(m) => {
quote!("(\"TURBOPACK compile-time value\", $e)" as Expr, e: Expr = Expr::Object(ObjectLit {
span: DUMMY_SP,
props: m
.into_iter()
.iter()
.map(|(k, v)| {
swc_core::ecma::ast::PropOrSpread::Prop(
Prop::KeyValue(KeyValueProp {
key: PropName::Str(Str::from(k.as_str())),
value: define_env_to_expr(v).into(),
value: value_to_expr(v).into(),
})
.into(),
)
......@@ -91,14 +105,11 @@ fn define_env_to_expr(value: CompileTimeDefineValue) -> Expr {
.collect(),
}))
}
CompileTimeDefineValue::Undefined => {
quote!("(\"TURBOPACK compile-time value\", void 0)" as Expr)
}
CompileTimeDefineValue::Evaluate(ref s) => parse_single_expr_lit(s.clone()),
CompileTimeDefineValue::Evaluate(s) => parse_single_expr_lit(s),
}
}
pub(crate) fn parse_single_expr_lit(expr_lit: RcStr) -> Expr {
pub(crate) fn parse_single_expr_lit(expr_lit: &RcStr) -> Expr {
let cm = Lrc::new(SourceMap::default());
let fm = cm.new_source_file(FileName::Anon.into(), expr_lit.clone());
parse_file_as_expr(
......
......@@ -37,7 +37,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......
......@@ -7,7 +7,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......
......@@ -6,7 +6,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -323,7 +325,9 @@
prop: Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -366,7 +370,9 @@
prop: Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......
......@@ -4,7 +4,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -29,7 +31,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -66,7 +70,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -119,7 +125,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -138,7 +146,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......
......@@ -7,7 +7,9 @@
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
......@@ -21,7 +23,9 @@
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
......@@ -35,7 +39,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -49,7 +55,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -63,7 +71,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -77,7 +87,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -91,7 +103,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -105,7 +119,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -119,7 +135,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -133,7 +151,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -192,7 +212,9 @@
Constant(
Num(
ConstantNumber(
4.0,
TotalOrderF64(
4.0,
),
),
),
),
......@@ -261,7 +283,9 @@
Constant(
Num(
ConstantNumber(
4.0,
TotalOrderF64(
4.0,
),
),
),
),
......
......@@ -41,7 +41,9 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......@@ -62,7 +64,9 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......@@ -83,14 +87,18 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -106,14 +114,18 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -129,14 +141,18 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......
......@@ -59,7 +59,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -125,7 +127,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -191,7 +195,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -257,7 +263,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -271,21 +279,27 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
......@@ -307,21 +321,27 @@
Constant(
Num(
ConstantNumber(
4.0,
TotalOrderF64(
4.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
5.0,
TotalOrderF64(
5.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
6.0,
TotalOrderF64(
6.0,
),
),
),
),
......@@ -343,21 +363,27 @@
Constant(
Num(
ConstantNumber(
7.0,
TotalOrderF64(
7.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
8.0,
TotalOrderF64(
8.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
9.0,
TotalOrderF64(
9.0,
),
),
),
),
......
......@@ -51,7 +51,9 @@
Constant(
Num(
ConstantNumber(
123.0,
TotalOrderF64(
123.0,
),
),
),
),
......
......@@ -6135,7 +6135,9 @@
Constant(
Num(
ConstantNumber(
493.0,
TotalOrderF64(
493.0,
),
),
),
),
......
......@@ -111,7 +111,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -290,7 +292,9 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......
......@@ -90,7 +90,9 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......@@ -109,7 +111,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......
......@@ -90,7 +90,9 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......@@ -109,7 +111,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......
......@@ -20,7 +20,9 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......
......@@ -104,7 +104,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -113,7 +115,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -391,7 +395,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -400,7 +406,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -539,7 +547,9 @@
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
......@@ -548,7 +558,9 @@
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
......
......@@ -71,21 +71,27 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
......@@ -108,14 +114,18 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -127,14 +137,18 @@
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
4.0,
TotalOrderF64(
4.0,
),
),
),
),
......@@ -177,14 +191,18 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -194,14 +212,18 @@
Constant(
Num(
ConstantNumber(
3.0,
TotalOrderF64(
3.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
4.0,
TotalOrderF64(
4.0,
),
),
),
),
......@@ -217,21 +239,27 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......@@ -241,7 +269,9 @@
Constant(
Num(
ConstantNumber(
4.0,
TotalOrderF64(
4.0,
),
),
),
),
......
......@@ -144,7 +144,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -203,7 +205,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -214,7 +218,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......@@ -263,7 +269,9 @@
Constant(
Num(
ConstantNumber(
0.0,
TotalOrderF64(
0.0,
),
),
),
),
......@@ -377,7 +385,9 @@
Constant(
Num(
ConstantNumber(
1.0,
TotalOrderF64(
1.0,
),
),
),
),
......@@ -608,7 +618,9 @@
Constant(
Num(
ConstantNumber(
2.0,
TotalOrderF64(
2.0,
),
),
),
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment