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

Unified Diff: src/x64/macro-assembler-x64.cc

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 7 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 | « src/x64/macro-assembler-x64.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 7087c0397368dbd309a647ee65cc9b1fd81e3b7c..471fa55cb0a02ec189669a845cb96b79de6ab9c2 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -2501,6 +2501,14 @@ void MacroAssembler::Move(Register dst, Register src) {
}
}
+void MacroAssembler::MoveNumber(Register dst, double value) {
+ int32_t smi;
+ if (DoubleToSmiInteger(value, &smi)) {
+ Move(dst, Smi::FromInt(smi));
+ } else {
+ movp_heap_number(dst, value);
+ }
+}
void MacroAssembler::Move(Register dst, Handle<Object> source) {
AllowDeferredHandleDereference smi_check;
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698