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 7400019: Encapsulated the AST ID recording a bit, this time for MIPS. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.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 (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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // We leave space (16 * kTrampolineSlotsSize) 278 // We leave space (16 * kTrampolineSlotsSize)
279 // for BlockTrampolinePoolScope buffer. 279 // for BlockTrampolinePoolScope buffer.
280 next_buffer_check_ = kMaxBranchOffset - kTrampolineSlotsSize * 16; 280 next_buffer_check_ = kMaxBranchOffset - kTrampolineSlotsSize * 16;
281 internal_trampoline_exception_ = false; 281 internal_trampoline_exception_ = false;
282 last_bound_pos_ = 0; 282 last_bound_pos_ = 0;
283 283
284 trampoline_emitted_ = false; 284 trampoline_emitted_ = false;
285 unbound_labels_count_ = 0; 285 unbound_labels_count_ = 0;
286 block_buffer_growth_ = false; 286 block_buffer_growth_ = false;
287 287
288 ast_id_for_reloc_info_ = kNoASTId; 288 ClearRecordedAstId();
289 } 289 }
290 290
291 291
292 Assembler::~Assembler() { 292 Assembler::~Assembler() {
293 if (own_buffer_) { 293 if (own_buffer_) {
294 if (isolate()->assembler_spare_buffer() == NULL && 294 if (isolate()->assembler_spare_buffer() == NULL &&
295 buffer_size_ == kMinimalBufferSize) { 295 buffer_size_ == kMinimalBufferSize) {
296 isolate()->set_assembler_spare_buffer(buffer_); 296 isolate()->set_assembler_spare_buffer(buffer_);
297 } else { 297 } else {
298 DeleteArray(buffer_); 298 DeleteArray(buffer_);
(...skipping 1641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1940 } 1940 }
1941 if (rinfo.rmode() != RelocInfo::NONE) { 1941 if (rinfo.rmode() != RelocInfo::NONE) {
1942 // Don't record external references unless the heap will be serialized. 1942 // Don't record external references unless the heap will be serialized.
1943 if (rmode == RelocInfo::EXTERNAL_REFERENCE && 1943 if (rmode == RelocInfo::EXTERNAL_REFERENCE &&
1944 !Serializer::enabled() && 1944 !Serializer::enabled() &&
1945 !FLAG_debug_code) { 1945 !FLAG_debug_code) {
1946 return; 1946 return;
1947 } 1947 }
1948 ASSERT(buffer_space() >= kMaxRelocSize); // Too late to grow buffer here. 1948 ASSERT(buffer_space() >= kMaxRelocSize); // Too late to grow buffer here.
1949 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { 1949 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) {
1950 ASSERT(ast_id_for_reloc_info_ != kNoASTId); 1950 RelocInfo reloc_info_with_ast_id(pc_, rmode, RecordedAstId());
1951 RelocInfo reloc_info_with_ast_id(pc_, rmode, ast_id_for_reloc_info_); 1951 ClearRecordedAstId();
1952 ast_id_for_reloc_info_ = kNoASTId;
1953 reloc_info_writer.Write(&reloc_info_with_ast_id); 1952 reloc_info_writer.Write(&reloc_info_with_ast_id);
1954 } else { 1953 } else {
1955 reloc_info_writer.Write(&rinfo); 1954 reloc_info_writer.Write(&rinfo);
1956 } 1955 }
1957 } 1956 }
1958 } 1957 }
1959 1958
1960 1959
1961 void Assembler::BlockTrampolinePoolFor(int instructions) { 1960 void Assembler::BlockTrampolinePoolFor(int instructions) {
1962 BlockTrampolinePoolBefore(pc_offset() + instructions * kInstrSize); 1961 BlockTrampolinePoolBefore(pc_offset() + instructions * kInstrSize);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2060 *p = LUI | rt_code | ((itarget & kHiMask) >> kLuiShift); 2059 *p = LUI | rt_code | ((itarget & kHiMask) >> kLuiShift);
2061 *(p+1) = ORI | rt_code | (rt_code << 5) | (itarget & kImm16Mask); 2060 *(p+1) = ORI | rt_code | (rt_code << 5) | (itarget & kImm16Mask);
2062 2061
2063 CPU::FlushICache(pc, 2 * sizeof(int32_t)); 2062 CPU::FlushICache(pc, 2 * sizeof(int32_t));
2064 } 2063 }
2065 2064
2066 2065
2067 } } // namespace v8::internal 2066 } } // namespace v8::internal
2068 2067
2069 #endif // V8_TARGET_ARCH_MIPS 2068 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698