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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 6647012: Fix memory leaks on x64... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 9 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
« src/x64/lithium-codegen-x64.h ('K') | « src/x64/lithium-codegen-x64.h ('k') | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 return instructions_->at(current_instruction_ + 1); 252 return instructions_->at(current_instruction_ + 1);
253 } else { 253 } else {
254 return NULL; 254 return NULL;
255 } 255 }
256 } 256 }
257 257
258 258
259 bool LCodeGen::GenerateJumpTable() { 259 bool LCodeGen::GenerateJumpTable() {
260 for (int i = 0; i < jump_table_.length(); i++) { 260 for (int i = 0; i < jump_table_.length(); i++) {
261 JumpTableEntry* info = jump_table_[i]; 261 JumpTableEntry* info = jump_table_[i];
262 __ bind(&(info->label_)); 262 __ bind(info->label());
263 __ Jump(info->address_, RelocInfo::RUNTIME_ENTRY); 263 __ Jump(info->address(), RelocInfo::RUNTIME_ENTRY);
264 } 264 }
265 return !is_aborted(); 265 return !is_aborted();
266 } 266 }
267 267
268 268
269 bool LCodeGen::GenerateDeferredCode() { 269 bool LCodeGen::GenerateDeferredCode() {
270 ASSERT(is_generating()); 270 ASSERT(is_generating());
271 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 271 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
272 LDeferredCode* code = deferred_[i]; 272 LDeferredCode* code = deferred_[i];
273 __ bind(code->entry()); 273 __ bind(code->entry());
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 return; 535 return;
536 } 536 }
537 537
538 if (cc == no_condition) { 538 if (cc == no_condition) {
539 __ Jump(entry, RelocInfo::RUNTIME_ENTRY); 539 __ Jump(entry, RelocInfo::RUNTIME_ENTRY);
540 } else { 540 } else {
541 JumpTableEntry* jump_info = NULL; 541 JumpTableEntry* jump_info = NULL;
542 // We often have several deopts to the same entry, reuse the last 542 // We often have several deopts to the same entry, reuse the last
543 // jump entry if this is the case. 543 // jump entry if this is the case.
544 if (jump_table_.length() > 0 && 544 if (jump_table_.length() > 0 &&
545 jump_table_[jump_table_.length() - 1]->address_ == entry) { 545 jump_table_[jump_table_.length() - 1]->address() == entry) {
546 jump_info = jump_table_[jump_table_.length() - 1]; 546 jump_info = jump_table_[jump_table_.length() - 1];
547 } else { 547 } else {
548 jump_info = new JumpTableEntry(entry); 548 jump_info = new JumpTableEntry();
549 jump_info->SetAddress(entry);
Lasse Reichstein 2011/03/09 09:16:54 Why? Is there any advantage in this, relative to s
549 jump_table_.Add(jump_info); 550 jump_table_.Add(jump_info);
550 } 551 }
551 __ j(cc, &jump_info->label_); 552 __ j(cc, jump_info->label());
552 } 553 }
553 } 554 }
554 555
555 556
556 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { 557 void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) {
557 int length = deoptimizations_.length(); 558 int length = deoptimizations_.length();
558 if (length == 0) return; 559 if (length == 0) return;
559 ASSERT(FLAG_deopt); 560 ASSERT(FLAG_deopt);
560 Handle<DeoptimizationInputData> data = 561 Handle<DeoptimizationInputData> data =
561 Factory::NewDeoptimizationInputData(length, TENURED); 562 Factory::NewDeoptimizationInputData(length, TENURED);
(...skipping 3096 matching lines...) Expand 10 before | Expand all | Expand 10 after
3658 RegisterEnvironmentForDeoptimization(environment); 3659 RegisterEnvironmentForDeoptimization(environment);
3659 ASSERT(osr_pc_offset_ == -1); 3660 ASSERT(osr_pc_offset_ == -1);
3660 osr_pc_offset_ = masm()->pc_offset(); 3661 osr_pc_offset_ = masm()->pc_offset();
3661 } 3662 }
3662 3663
3663 #undef __ 3664 #undef __
3664 3665
3665 } } // namespace v8::internal 3666 } } // namespace v8::internal
3666 3667
3667 #endif // V8_TARGET_ARCH_X64 3668 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/x64/lithium-codegen-x64.h ('K') | « src/x64/lithium-codegen-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698