| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 5426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5437 if ((reinterpret_cast<uword>(raw_) & kSmiTagMask) == kSmiTag) { | 5437 if ((reinterpret_cast<uword>(raw_) & kSmiTagMask) == kSmiTag) { |
| 5438 set_vtable(Smi::handle_vtable_); | 5438 set_vtable(Smi::handle_vtable_); |
| 5439 return; | 5439 return; |
| 5440 } else if (raw_ == null_) { | 5440 } else if (raw_ == null_) { |
| 5441 set_vtable(handle_vtable_); | 5441 set_vtable(handle_vtable_); |
| 5442 return; | 5442 return; |
| 5443 } | 5443 } |
| 5444 | 5444 |
| 5445 #if defined(DEBUG) | 5445 #if defined(DEBUG) |
| 5446 Isolate* isolate = Isolate::Current(); | 5446 Isolate* isolate = Isolate::Current(); |
| 5447 Heap* isolate_heap = isolate->heap(); | 5447 if (FLAG_verify_handles) { |
| 5448 Heap* vm_isolate_heap = Dart::vm_isolate()->heap(); | 5448 Heap* isolate_heap = isolate->heap(); |
| 5449 ASSERT(isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr())) || | 5449 Heap* vm_isolate_heap = Dart::vm_isolate()->heap(); |
| 5450 vm_isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr()))); | 5450 ASSERT(isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr())) || |
| 5451 vm_isolate_heap->Contains(reinterpret_cast<uword>(raw_->ptr()))); |
| 5452 } |
| 5451 #endif | 5453 #endif |
| 5452 intptr_t cid = raw_->GetClassId(); | 5454 intptr_t cid = raw_->GetClassId(); |
| 5453 if (cid < kNumPredefinedCids) { | 5455 if (cid < kNumPredefinedCids) { |
| 5454 #if defined(DEBUG) | 5456 #if defined(DEBUG) |
| 5455 ASSERT(builtin_vtables_[cid] == | 5457 ASSERT(builtin_vtables_[cid] == |
| 5456 isolate->class_table()->At(cid)->ptr()->handle_vtable_); | 5458 isolate->class_table()->At(cid)->ptr()->handle_vtable_); |
| 5457 #endif | 5459 #endif |
| 5458 set_vtable(builtin_vtables_[cid]); | 5460 set_vtable(builtin_vtables_[cid]); |
| 5459 } else { | 5461 } else { |
| 5460 #if !defined(DEBUG) | 5462 #if !defined(DEBUG) |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5518 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5520 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5519 return false; | 5521 return false; |
| 5520 } | 5522 } |
| 5521 } | 5523 } |
| 5522 return true; | 5524 return true; |
| 5523 } | 5525 } |
| 5524 | 5526 |
| 5525 } // namespace dart | 5527 } // namespace dart |
| 5526 | 5528 |
| 5527 #endif // VM_OBJECT_H_ | 5529 #endif // VM_OBJECT_H_ |
| OLD | NEW |