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

Side by Side 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, 6 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 JumpIfNotUniqueNameHelper<Register>(this, reg, not_unique_name, distance); 2494 JumpIfNotUniqueNameHelper<Register>(this, reg, not_unique_name, distance);
2495 } 2495 }
2496 2496
2497 2497
2498 void MacroAssembler::Move(Register dst, Register src) { 2498 void MacroAssembler::Move(Register dst, Register src) {
2499 if (!dst.is(src)) { 2499 if (!dst.is(src)) {
2500 movp(dst, src); 2500 movp(dst, src);
2501 } 2501 }
2502 } 2502 }
2503 2503
2504 void MacroAssembler::MoveNumber(Register dst, double value) {
2505 int32_t smi;
2506 if (DoubleToSmiInteger(value, &smi)) {
2507 Move(dst, Smi::FromInt(smi));
2508 } else {
2509 movp_heap_number(dst, value);
2510 }
2511 }
2504 2512
2505 void MacroAssembler::Move(Register dst, Handle<Object> source) { 2513 void MacroAssembler::Move(Register dst, Handle<Object> source) {
2506 AllowDeferredHandleDereference smi_check; 2514 AllowDeferredHandleDereference smi_check;
2507 if (source->IsSmi()) { 2515 if (source->IsSmi()) {
2508 Move(dst, Smi::cast(*source)); 2516 Move(dst, Smi::cast(*source));
2509 } else { 2517 } else {
2510 MoveHeapObject(dst, source); 2518 MoveHeapObject(dst, source);
2511 } 2519 }
2512 } 2520 }
2513 2521
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
5039 movl(rax, dividend); 5047 movl(rax, dividend);
5040 shrl(rax, Immediate(31)); 5048 shrl(rax, Immediate(31));
5041 addl(rdx, rax); 5049 addl(rdx, rax);
5042 } 5050 }
5043 5051
5044 5052
5045 } // namespace internal 5053 } // namespace internal
5046 } // namespace v8 5054 } // namespace v8
5047 5055
5048 #endif // V8_TARGET_ARCH_X64 5056 #endif // V8_TARGET_ARCH_X64
OLDNEW
« 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