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

Side by Side Diff: src/objects-debug.cc

Issue 3461021: Add CODE_POINTER_ALIGN, use it in Page to align generated code. (Closed)
Patch Set: use CODE_POINTER_ALIGN in one more place Created 10 years, 2 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 void Code::CodePrint() { 897 void Code::CodePrint() {
898 HeapObject::PrintHeader("Code"); 898 HeapObject::PrintHeader("Code");
899 #ifdef ENABLE_DISASSEMBLER 899 #ifdef ENABLE_DISASSEMBLER
900 Disassemble(NULL); 900 Disassemble(NULL);
901 #endif 901 #endif
902 } 902 }
903 903
904 904
905 void Code::CodeVerify() { 905 void Code::CodeVerify() {
906 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()), 906 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()),
907 static_cast<intptr_t>(kCodeAlignment))); 907 kCodeAlignment));
908 Address last_gc_pc = NULL; 908 Address last_gc_pc = NULL;
909 for (RelocIterator it(this); !it.done(); it.next()) { 909 for (RelocIterator it(this); !it.done(); it.next()) {
910 it.rinfo()->Verify(); 910 it.rinfo()->Verify();
911 // Ensure that GC will not iterate twice over the same pointer. 911 // Ensure that GC will not iterate twice over the same pointer.
912 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) { 912 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) {
913 CHECK(it.rinfo()->pc() != last_gc_pc); 913 CHECK(it.rinfo()->pc() != last_gc_pc);
914 last_gc_pc = it.rinfo()->pc(); 914 last_gc_pc = it.rinfo()->pc();
915 } 915 }
916 } 916 }
917 } 917 }
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 ASSERT(e->IsUndefined()); 1386 ASSERT(e->IsUndefined());
1387 } 1387 }
1388 } 1388 }
1389 } 1389 }
1390 } 1390 }
1391 1391
1392 1392
1393 #endif // DEBUG 1393 #endif // DEBUG
1394 1394
1395 } } // namespace v8::internal 1395 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698