OLD | NEW |
---|---|
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
396 CHECK(!std::isnan(value) || | 396 CHECK(!std::isnan(value) || |
397 (BitCast<uint64_t>(value) == | 397 (BitCast<uint64_t>(value) == |
398 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || | 398 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || |
399 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); | 399 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); |
400 } | 400 } |
401 } | 401 } |
402 } | 402 } |
403 | 403 |
404 | 404 |
405 void ConstantPoolArray::ConstantPoolArrayVerify() { | 405 void ConstantPoolArray::ConstantPoolArrayVerify() { |
406 for (int i = 0; i < count_of_code_ptr_entries(); i++) { | |
407 Address code_entry = get_code_ptr_entry(first_code_ptr_index() + i); | |
408 VerifyPointer(Code::GetCodeFromTargetAddress(code_entry)); | |
409 } | |
406 CHECK(IsConstantPoolArray()); | 410 CHECK(IsConstantPoolArray()); |
Michael Starzinger
2014/03/10 15:00:38
nit: Let's move this check to the top of the metho
rmcilroy
2014/03/10 16:55:20
Done.
| |
411 for (int i = 0; i < count_of_heap_ptr_entries(); i++) { | |
412 VerifyObjectField(OffsetOfElementAt(first_heap_ptr_index() + i)); | |
413 } | |
407 } | 414 } |
408 | 415 |
409 | 416 |
410 void JSGeneratorObject::JSGeneratorObjectVerify() { | 417 void JSGeneratorObject::JSGeneratorObjectVerify() { |
411 // In an expression like "new g()", there can be a point where a generator | 418 // In an expression like "new g()", there can be a point where a generator |
412 // object is allocated but its fields are all undefined, as it hasn't yet been | 419 // object is allocated but its fields are all undefined, as it hasn't yet been |
413 // initialized by the generator. Hence these weak checks. | 420 // initialized by the generator. Hence these weak checks. |
414 VerifyObjectField(kFunctionOffset); | 421 VerifyObjectField(kFunctionOffset); |
415 VerifyObjectField(kContextOffset); | 422 VerifyObjectField(kContextOffset); |
416 VerifyObjectField(kReceiverOffset); | 423 VerifyObjectField(kReceiverOffset); |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1151 for (int i = 0; i < number_of_transitions(); ++i) { | 1158 for (int i = 0; i < number_of_transitions(); ++i) { |
1152 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1159 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1153 } | 1160 } |
1154 return true; | 1161 return true; |
1155 } | 1162 } |
1156 | 1163 |
1157 | 1164 |
1158 #endif // DEBUG | 1165 #endif // DEBUG |
1159 | 1166 |
1160 } } // namespace v8::internal | 1167 } } // namespace v8::internal |
OLD | NEW |