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