Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: src/code-stub-assembler.h

Issue 2380543002: [stubs] Don't unconditionally canonicalize in ChangeFloat64ToTagged. (Closed)
Patch Set: REBASE Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698