| 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 #include "vm/raw_object.h" | 5 #include "vm/raw_object.h" |
| 6 | 6 |
| 7 #include "vm/freelist.h" | 7 #include "vm/freelist.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/visitor.h" | 10 #include "vm/visitor.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 | 400 |
| 401 intptr_t RawContextScope::VisitContextScopePointers( | 401 intptr_t RawContextScope::VisitContextScopePointers( |
| 402 RawContextScope* raw_obj, ObjectPointerVisitor* visitor) { | 402 RawContextScope* raw_obj, ObjectPointerVisitor* visitor) { |
| 403 intptr_t num_variables = raw_obj->ptr()->num_variables_; | 403 intptr_t num_variables = raw_obj->ptr()->num_variables_; |
| 404 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_variables)); | 404 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_variables)); |
| 405 return ContextScope::InstanceSize(num_variables); | 405 return ContextScope::InstanceSize(num_variables); |
| 406 } | 406 } |
| 407 | 407 |
| 408 | 408 |
| 409 intptr_t RawICData::VisitICDataPointers(RawICData* raw_obj, |
| 410 ObjectPointerVisitor* visitor) { |
| 411 // Make sure that we got here with the tagged pointer as this. |
| 412 ASSERT(raw_obj->IsHeapObject()); |
| 413 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 414 return ICData::InstanceSize(); |
| 415 } |
| 416 |
| 417 |
| 409 intptr_t RawError::VisitErrorPointers(RawError* raw_obj, | 418 intptr_t RawError::VisitErrorPointers(RawError* raw_obj, |
| 410 ObjectPointerVisitor* visitor) { | 419 ObjectPointerVisitor* visitor) { |
| 411 // Error is an abstract class. | 420 // Error is an abstract class. |
| 412 UNREACHABLE(); | 421 UNREACHABLE(); |
| 413 return 0; | 422 return 0; |
| 414 } | 423 } |
| 415 | 424 |
| 416 | 425 |
| 417 intptr_t RawApiError::VisitApiErrorPointers( | 426 intptr_t RawApiError::VisitApiErrorPointers( |
| 418 RawApiError* raw_obj, ObjectPointerVisitor* visitor) { | 427 RawApiError* raw_obj, ObjectPointerVisitor* visitor) { |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj, | 655 intptr_t RawJSRegExp::VisitJSRegExpPointers(RawJSRegExp* raw_obj, |
| 647 ObjectPointerVisitor* visitor) { | 656 ObjectPointerVisitor* visitor) { |
| 648 // Make sure that we got here with the tagged pointer as this. | 657 // Make sure that we got here with the tagged pointer as this. |
| 649 ASSERT(raw_obj->IsHeapObject()); | 658 ASSERT(raw_obj->IsHeapObject()); |
| 650 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_); | 659 intptr_t length = Smi::Value(raw_obj->ptr()->data_length_); |
| 651 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 660 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 652 return JSRegExp::InstanceSize(length); | 661 return JSRegExp::InstanceSize(length); |
| 653 } | 662 } |
| 654 | 663 |
| 655 | 664 |
| 656 intptr_t RawICData::VisitICDataPointers(RawICData* raw_obj, | |
| 657 ObjectPointerVisitor* visitor) { | |
| 658 // Make sure that we got here with the tagged pointer as this. | |
| 659 ASSERT(raw_obj->IsHeapObject()); | |
| 660 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | |
| 661 return ICData::InstanceSize(); | |
| 662 } | |
| 663 | |
| 664 | |
| 665 } // namespace dart | 665 } // namespace dart |
| OLD | NEW |