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

Side by Side Diff: src/x64/assembler-x64-inl.h

Issue 2109143002: [x64] Compare handles instead of code targets in emit_code_target. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use address instead of location. Created 4 years, 5 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 | « no previous file | no next file » | 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 #ifndef V8_X64_ASSEMBLER_X64_INL_H_ 5 #ifndef V8_X64_ASSEMBLER_X64_INL_H_
6 #define V8_X64_ASSEMBLER_X64_INL_H_ 6 #define V8_X64_ASSEMBLER_X64_INL_H_
7 7
8 #include "src/x64/assembler-x64.h" 8 #include "src/x64/assembler-x64.h"
9 9
10 #include "src/base/cpu.h" 10 #include "src/base/cpu.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 RelocInfo::Mode rmode, 58 RelocInfo::Mode rmode,
59 TypeFeedbackId ast_id) { 59 TypeFeedbackId ast_id) {
60 DCHECK(RelocInfo::IsCodeTarget(rmode) || 60 DCHECK(RelocInfo::IsCodeTarget(rmode) ||
61 rmode == RelocInfo::CODE_AGE_SEQUENCE); 61 rmode == RelocInfo::CODE_AGE_SEQUENCE);
62 if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) { 62 if (rmode == RelocInfo::CODE_TARGET && !ast_id.IsNone()) {
63 RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID, ast_id.ToInt()); 63 RecordRelocInfo(RelocInfo::CODE_TARGET_WITH_ID, ast_id.ToInt());
64 } else { 64 } else {
65 RecordRelocInfo(rmode); 65 RecordRelocInfo(rmode);
66 } 66 }
67 int current = code_targets_.length(); 67 int current = code_targets_.length();
68 if (current > 0 && code_targets_.last().is_identical_to(target)) { 68 if (current > 0 && code_targets_.last().address() == target.address()) {
69 // Optimization if we keep jumping to the same code target. 69 // Optimization if we keep jumping to the same code target.
70 emitl(current - 1); 70 emitl(current - 1);
71 } else { 71 } else {
72 code_targets_.Add(target); 72 code_targets_.Add(target);
73 emitl(current); 73 emitl(current);
74 } 74 }
75 } 75 }
76 76
77 77
78 void Assembler::emit_runtime_entry(Address entry, RelocInfo::Mode rmode) { 78 void Assembler::emit_runtime_entry(Address entry, RelocInfo::Mode rmode) {
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 void Operand::set_disp64(int64_t disp) { 609 void Operand::set_disp64(int64_t disp) {
610 DCHECK_EQ(1, len_); 610 DCHECK_EQ(1, len_);
611 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]); 611 int64_t* p = reinterpret_cast<int64_t*>(&buf_[len_]);
612 *p = disp; 612 *p = disp;
613 len_ += sizeof(disp); 613 len_ += sizeof(disp);
614 } 614 }
615 } // namespace internal 615 } // namespace internal
616 } // namespace v8 616 } // namespace v8
617 617
618 #endif // V8_X64_ASSEMBLER_X64_INL_H_ 618 #endif // V8_X64_ASSEMBLER_X64_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698