Index: src/code-stub-assembler.h |
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h |
index 76d4cece1bea1ba2f589a30c396d6b1626b707ee..5a01b1bbe7649751b3eda6defead359c193796b4 100644 |
--- a/src/code-stub-assembler.h |
+++ b/src/code-stub-assembler.h |
@@ -17,6 +17,7 @@ class CallInterfaceDescriptor; |
class StatsCounter; |
class StubCache; |
+enum class CanonicalizationMode { kDontCanonicalize, kCanonicalize }; |
enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; |
enum class UnicodeEncoding { |
@@ -427,7 +428,11 @@ class CodeStubAssembler : public compiler::CodeAssembler { |
compiler::Node* TruncateHeapNumberValueToWord32(compiler::Node* object); |
// Conversions. |
- compiler::Node* ChangeFloat64ToTagged(compiler::Node* value); |
+ // Returns a tagged representation of the float64 {value}. Might optionally |
+ // try to canonicalize to Smi representation if the {value} is in Smi range. |
+ compiler::Node* ChangeFloat64ToTagged( |
+ compiler::Node* value, |
+ CanonicalizationMode mode = CanonicalizationMode::kDontCanonicalize); |
compiler::Node* ChangeInt32ToTagged(compiler::Node* value); |
compiler::Node* ChangeUint32ToTagged(compiler::Node* value); |