| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/class_finalizer.h" | 5 #include "vm/class_finalizer.h" |
| 6 | 6 |
| 7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
| 8 #include "vm/hash_table.h" | 8 #include "vm/hash_table.h" |
| 9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3461 Report::MessageV(Report::kError, script, token_pos, Report::AtLocation, | 3461 Report::MessageV(Report::kError, script, token_pos, Report::AtLocation, |
| 3462 format, args); | 3462 format, args); |
| 3463 va_end(args); | 3463 va_end(args); |
| 3464 UNREACHABLE(); | 3464 UNREACHABLE(); |
| 3465 } | 3465 } |
| 3466 | 3466 |
| 3467 void ClassFinalizer::VerifyImplicitFieldOffsets() { | 3467 void ClassFinalizer::VerifyImplicitFieldOffsets() { |
| 3468 #ifdef DEBUG | 3468 #ifdef DEBUG |
| 3469 Thread* thread = Thread::Current(); | 3469 Thread* thread = Thread::Current(); |
| 3470 Isolate* isolate = thread->isolate(); | 3470 Isolate* isolate = thread->isolate(); |
| 3471 |
| 3472 if (isolate->obfuscate()) { |
| 3473 // Field names are obfuscated. |
| 3474 return; |
| 3475 } |
| 3476 |
| 3471 Zone* zone = thread->zone(); | 3477 Zone* zone = thread->zone(); |
| 3472 const ClassTable& class_table = *(isolate->class_table()); | 3478 const ClassTable& class_table = *(isolate->class_table()); |
| 3473 Class& cls = Class::Handle(zone); | 3479 Class& cls = Class::Handle(zone); |
| 3474 Array& fields_array = Array::Handle(zone); | 3480 Array& fields_array = Array::Handle(zone); |
| 3475 Field& field = Field::Handle(zone); | 3481 Field& field = Field::Handle(zone); |
| 3476 String& name = String::Handle(zone); | 3482 String& name = String::Handle(zone); |
| 3477 String& expected_name = String::Handle(zone); | 3483 String& expected_name = String::Handle(zone); |
| 3478 Error& error = Error::Handle(zone); | 3484 Error& error = Error::Handle(zone); |
| 3479 | 3485 |
| 3480 // First verify field offsets of all the TypedDataView classes. | 3486 // First verify field offsets of all the TypedDataView classes. |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3792 ProgramVisitor::VisitFunctions(&function_visitor); | 3798 ProgramVisitor::VisitFunctions(&function_visitor); |
| 3793 | 3799 |
| 3794 class ClearCodeClassVisitor : public ClassVisitor { | 3800 class ClearCodeClassVisitor : public ClassVisitor { |
| 3795 void Visit(const Class& cls) { cls.DisableAllocationStub(); } | 3801 void Visit(const Class& cls) { cls.DisableAllocationStub(); } |
| 3796 }; | 3802 }; |
| 3797 ClearCodeClassVisitor class_visitor; | 3803 ClearCodeClassVisitor class_visitor; |
| 3798 ProgramVisitor::VisitClasses(&class_visitor); | 3804 ProgramVisitor::VisitClasses(&class_visitor); |
| 3799 } | 3805 } |
| 3800 | 3806 |
| 3801 } // namespace dart | 3807 } // namespace dart |
| OLD | NEW |