Fix opt clang build.
Fix opt clang build.
1.1 --- a/AMBuildScript Wed Jul 25 01:30:33 2012 -0700
1.2 +++ b/AMBuildScript Wed Jul 25 01:32:49 2012 -0700
1.3 @@ -112,8 +112,6 @@
1.4
1.5 #Debugging
1.6 if AMBuild.options.debug == '1':
1.7 - self.compiler.AddToListVar('CDEFINES', 'DEBUG')
1.8 - self.compiler.AddToListVar('CDEFINES', '_DEBUG')
1.9 if self.vendor == 'gcc' or self.vendor == 'clang':
1.10 self.compiler.AddToListVar('CFLAGS', '-g3')
1.11 elif self.vendor == 'msvc':
2.1 --- a/src/Heap-inl.h Wed Jul 25 01:30:33 2012 -0700
2.2 +++ b/src/Heap-inl.h Wed Jul 25 01:32:49 2012 -0700
2.3 @@ -27,8 +27,10 @@
2.4 static inline Object *
2.5 InitAddressIntoObject(Address address, Map *map)
2.6 {
2.7 +#ifndef NDEBUG
2.8 uintptr_t untagged = reinterpret_cast<uintptr_t>(address);
2.9 assert(IsAligned(untagged, kObjectAlignment));
2.10 +#endif
2.11
2.12 Object *obj = reinterpret_cast<Object *>(address);
2.13 obj->init(map);
3.1 --- a/src/Opcodes.cpp Wed Jul 25 01:30:33 2012 -0700
3.2 +++ b/src/Opcodes.cpp Wed Jul 25 01:32:49 2012 -0700
3.3 @@ -75,10 +75,12 @@
3.4 // Only specific opcodes may have safepoints. Asking for a safepoint at
3.5 // any other position indicates a failure to mark that position as a
3.6 // safepoint, which is a bug.
3.7 +#ifndef NDEBUG
3.8 Opcode op = Opcode(*(start() + pcOffset));
3.9 assert(op == OP_CALL || op == OP_NEWARRAY || op == OP_VARREF_LIFO ||
3.10 op == OP_ARGREF_LIFO || op == OP_SLOTREF_LIFO || op == OP_ARRAYREF_LIFO ||
3.11 op == OP_ARRAYCOPY);
3.12 +#endif
3.13
3.14 if (!safepoints_)
3.15 return NULL;