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

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

Issue 10534063: Reland r11425 "Re-enable optimization for hot functions that have optimization disabled due to many… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return; 559 return;
560 } 560 }
561 561
562 if (FLAG_deopt_every_n_times != 0) { 562 if (FLAG_deopt_every_n_times != 0) {
563 Handle<SharedFunctionInfo> shared(info_->shared_info()); 563 Handle<SharedFunctionInfo> shared(info_->shared_info());
564 Label no_deopt; 564 Label no_deopt;
565 __ pushfd(); 565 __ pushfd();
566 __ push(eax); 566 __ push(eax);
567 __ push(ebx); 567 __ push(ebx);
568 __ mov(ebx, shared); 568 __ mov(ebx, shared);
569 __ mov(eax, FieldOperand(ebx, SharedFunctionInfo::kDeoptCounterOffset)); 569 __ mov(eax,
570 FieldOperand(ebx, SharedFunctionInfo::kStressDeoptCounterOffset));
570 __ sub(Operand(eax), Immediate(Smi::FromInt(1))); 571 __ sub(Operand(eax), Immediate(Smi::FromInt(1)));
571 __ j(not_zero, &no_deopt, Label::kNear); 572 __ j(not_zero, &no_deopt, Label::kNear);
572 if (FLAG_trap_on_deopt) __ int3(); 573 if (FLAG_trap_on_deopt) __ int3();
573 __ mov(eax, Immediate(Smi::FromInt(FLAG_deopt_every_n_times))); 574 __ mov(eax, Immediate(Smi::FromInt(FLAG_deopt_every_n_times)));
574 __ mov(FieldOperand(ebx, SharedFunctionInfo::kDeoptCounterOffset), eax); 575 __ mov(FieldOperand(ebx, SharedFunctionInfo::kStressDeoptCounterOffset),
576 eax);
575 __ pop(ebx); 577 __ pop(ebx);
576 __ pop(eax); 578 __ pop(eax);
577 __ popfd(); 579 __ popfd();
578 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); 580 __ jmp(entry, RelocInfo::RUNTIME_ENTRY);
579 581
580 __ bind(&no_deopt); 582 __ bind(&no_deopt);
581 __ mov(FieldOperand(ebx, SharedFunctionInfo::kDeoptCounterOffset), eax); 583 __ mov(FieldOperand(ebx, SharedFunctionInfo::kStressDeoptCounterOffset),
584 eax);
582 __ pop(ebx); 585 __ pop(ebx);
583 __ pop(eax); 586 __ pop(eax);
584 __ popfd(); 587 __ popfd();
585 } 588 }
586 589
587 if (cc == no_condition) { 590 if (cc == no_condition) {
588 if (FLAG_trap_on_deopt) __ int3(); 591 if (FLAG_trap_on_deopt) __ int3();
589 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); 592 __ jmp(entry, RelocInfo::RUNTIME_ENTRY);
590 } else { 593 } else {
591 if (FLAG_trap_on_deopt) { 594 if (FLAG_trap_on_deopt) {
(...skipping 4512 matching lines...) Expand 10 before | Expand all | Expand 10 after
5104 FixedArray::kHeaderSize - kPointerSize)); 5107 FixedArray::kHeaderSize - kPointerSize));
5105 __ bind(&done); 5108 __ bind(&done);
5106 } 5109 }
5107 5110
5108 5111
5109 #undef __ 5112 #undef __
5110 5113
5111 } } // namespace v8::internal 5114 } } // namespace v8::internal
5112 5115
5113 #endif // V8_TARGET_ARCH_IA32 5116 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698