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/mips/assembler-mips.cc

Issue 2944013002: Remove TypeFeedbackId parameters from assembler and full-code. (Closed)
Patch Set: REBASE+fixes. 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/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.h » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 const Instr kSwRegFpNegOffsetPattern = SW | (Register::kCode_fp << kRsShift) | 284 const Instr kSwRegFpNegOffsetPattern = SW | (Register::kCode_fp << kRsShift) |
285 (kNegOffset & kImm16Mask); // NOLINT 285 (kNegOffset & kImm16Mask); // NOLINT
286 // A mask for the Rt register for push, pop, lw, sw instructions. 286 // A mask for the Rt register for push, pop, lw, sw instructions.
287 const Instr kRtMask = kRtFieldMask; 287 const Instr kRtMask = kRtFieldMask;
288 const Instr kLwSwInstrTypeMask = 0xffe00000; 288 const Instr kLwSwInstrTypeMask = 0xffe00000;
289 const Instr kLwSwInstrArgumentMask = ~kLwSwInstrTypeMask; 289 const Instr kLwSwInstrArgumentMask = ~kLwSwInstrTypeMask;
290 const Instr kLwSwOffsetMask = kImm16Mask; 290 const Instr kLwSwOffsetMask = kImm16Mask;
291 291
292 Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size) 292 Assembler::Assembler(IsolateData isolate_data, void* buffer, int buffer_size)
293 : AssemblerBase(isolate_data, buffer, buffer_size), 293 : AssemblerBase(isolate_data, buffer, buffer_size) {
294 recorded_ast_id_(TypeFeedbackId::None()) {
295 reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_); 294 reloc_info_writer.Reposition(buffer_ + buffer_size_, pc_);
296 295
297 last_trampoline_pool_end_ = 0; 296 last_trampoline_pool_end_ = 0;
298 no_trampoline_pool_before_ = 0; 297 no_trampoline_pool_before_ = 0;
299 trampoline_pool_blocked_nesting_ = 0; 298 trampoline_pool_blocked_nesting_ = 0;
300 // We leave space (16 * kTrampolineSlotsSize) 299 // We leave space (16 * kTrampolineSlotsSize)
301 // for BlockTrampolinePoolScope buffer. 300 // for BlockTrampolinePoolScope buffer.
302 next_buffer_check_ = FLAG_force_long_branches 301 next_buffer_check_ = FLAG_force_long_branches
303 ? kMaxInt : kMaxBranchOffset - kTrampolineSlotsSize * 16; 302 ? kMaxInt : kMaxBranchOffset - kTrampolineSlotsSize * 16;
304 internal_trampoline_exception_ = false; 303 internal_trampoline_exception_ = false;
305 last_bound_pos_ = 0; 304 last_bound_pos_ = 0;
306 305
307 trampoline_emitted_ = FLAG_force_long_branches; 306 trampoline_emitted_ = FLAG_force_long_branches;
308 unbound_labels_count_ = 0; 307 unbound_labels_count_ = 0;
309 block_buffer_growth_ = false; 308 block_buffer_growth_ = false;
310
311 ClearRecordedAstId();
312 } 309 }
313 310
314 void Assembler::GetCode(Isolate* isolate, CodeDesc* desc) { 311 void Assembler::GetCode(Isolate* isolate, CodeDesc* desc) {
315 EmitForbiddenSlotInstruction(); 312 EmitForbiddenSlotInstruction();
316 DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. 313 DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap.
317 // Set up code descriptor. 314 // Set up code descriptor.
318 desc->buffer = buffer_; 315 desc->buffer = buffer_;
319 desc->buffer_size = buffer_size_; 316 desc->buffer_size = buffer_size_;
320 desc->instr_size = pc_offset(); 317 desc->instr_size = pc_offset();
321 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); 318 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
(...skipping 3340 matching lines...) Expand 10 before | Expand all | Expand 10 after
3662 DCHECK(RelocInfo::IsDebugBreakSlot(rmode) || RelocInfo::IsComment(rmode)); 3659 DCHECK(RelocInfo::IsDebugBreakSlot(rmode) || RelocInfo::IsComment(rmode));
3663 // These modes do not need an entry in the constant pool. 3660 // These modes do not need an entry in the constant pool.
3664 } 3661 }
3665 if (!RelocInfo::IsNone(rinfo.rmode())) { 3662 if (!RelocInfo::IsNone(rinfo.rmode())) {
3666 // Don't record external references unless the heap will be serialized. 3663 // Don't record external references unless the heap will be serialized.
3667 if (rmode == RelocInfo::EXTERNAL_REFERENCE && 3664 if (rmode == RelocInfo::EXTERNAL_REFERENCE &&
3668 !serializer_enabled() && !emit_debug_code()) { 3665 !serializer_enabled() && !emit_debug_code()) {
3669 return; 3666 return;
3670 } 3667 }
3671 DCHECK(buffer_space() >= kMaxRelocSize); // Too late to grow buffer here. 3668 DCHECK(buffer_space() >= kMaxRelocSize); // Too late to grow buffer here.
3672 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { 3669 DCHECK(rmode != RelocInfo::CODE_TARGET_WITH_ID);
3673 RelocInfo reloc_info_with_ast_id(pc_, rmode, RecordedAstId().ToInt(), 3670 reloc_info_writer.Write(&rinfo);
3674 NULL);
3675 ClearRecordedAstId();
3676 reloc_info_writer.Write(&reloc_info_with_ast_id);
3677 } else {
3678 reloc_info_writer.Write(&rinfo);
3679 }
3680 } 3671 }
3681 } 3672 }
3682 3673
3683 3674
3684 void Assembler::BlockTrampolinePoolFor(int instructions) { 3675 void Assembler::BlockTrampolinePoolFor(int instructions) {
3685 CheckTrampolinePoolQuick(instructions); 3676 CheckTrampolinePoolQuick(instructions);
3686 BlockTrampolinePoolBefore(pc_offset() + instructions * kInstrSize); 3677 BlockTrampolinePoolBefore(pc_offset() + instructions * kInstrSize);
3687 } 3678 }
3688 3679
3689 3680
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 3839
3849 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3840 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3850 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); 3841 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t));
3851 } 3842 }
3852 } 3843 }
3853 3844
3854 } // namespace internal 3845 } // namespace internal
3855 } // namespace v8 3846 } // namespace v8
3856 3847
3857 #endif // V8_TARGET_ARCH_MIPS 3848 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698