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

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

Issue 769263002: Add support for enabling DCHECKs in release mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 6 years 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/hydrogen-instructions.cc ('k') | src/ic/ic.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 // 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 CodeAgingHelper::CodeAgingHelper() { 989 CodeAgingHelper::CodeAgingHelper() {
990 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); 990 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength);
991 CodePatcher patcher(young_sequence_.start(), young_sequence_.length()); 991 CodePatcher patcher(young_sequence_.start(), young_sequence_.length());
992 patcher.masm()->push(ebp); 992 patcher.masm()->push(ebp);
993 patcher.masm()->mov(ebp, esp); 993 patcher.masm()->mov(ebp, esp);
994 patcher.masm()->push(esi); 994 patcher.masm()->push(esi);
995 patcher.masm()->push(edi); 995 patcher.masm()->push(edi);
996 } 996 }
997 997
998 998
999 #ifdef DEBUG 999 #if DCHECK_IS_ON
1000 bool CodeAgingHelper::IsOld(byte* candidate) const { 1000 bool CodeAgingHelper::IsOld(byte* candidate) const {
1001 return *candidate == kCallOpcode; 1001 return *candidate == kCallOpcode;
1002 } 1002 }
1003 #endif 1003 #endif
1004 1004
1005 1005
1006 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { 1006 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) {
1007 bool result = isolate->code_aging_helper()->IsYoung(sequence); 1007 bool result = isolate->code_aging_helper()->IsYoung(sequence);
1008 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); 1008 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence));
1009 return result; 1009 return result;
(...skipping 27 matching lines...) Expand all
1037 Code* stub = GetCodeAgeStub(isolate, age, parity); 1037 Code* stub = GetCodeAgeStub(isolate, age, parity);
1038 CodePatcher patcher(sequence, young_length); 1038 CodePatcher patcher(sequence, young_length);
1039 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); 1039 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32);
1040 } 1040 }
1041 } 1041 }
1042 1042
1043 1043
1044 } } // namespace v8::internal 1044 } } // namespace v8::internal
1045 1045
1046 #endif // V8_TARGET_ARCH_IA32 1046 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ic/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698