| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/bigint_operations.h" | 10 #include "vm/bigint_operations.h" |
| (...skipping 8106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8117 (cid != kMintCid) && | 8117 (cid != kMintCid) && |
| 8118 (cid != kBigintCid) && | 8118 (cid != kBigintCid) && |
| 8119 (cid != kDoubleCid)) { | 8119 (cid != kDoubleCid)) { |
| 8120 return false; | 8120 return false; |
| 8121 } | 8121 } |
| 8122 } | 8122 } |
| 8123 return true; | 8123 return true; |
| 8124 } | 8124 } |
| 8125 | 8125 |
| 8126 | 8126 |
| 8127 bool ICData::HasReceiverClassId(intptr_t class_id) const { |
| 8128 ASSERT(num_args_tested() > 0); |
| 8129 const intptr_t len = NumberOfChecks(); |
| 8130 for (intptr_t i = 0; i < len; i++) { |
| 8131 const intptr_t test_class_id = GetReceiverClassIdAt(i); |
| 8132 if (test_class_id == class_id) { |
| 8133 return true; |
| 8134 } |
| 8135 } |
| 8136 return false; |
| 8137 } |
| 8138 |
| 8139 |
| 8127 // Returns true if all targets are the same. | 8140 // Returns true if all targets are the same. |
| 8128 // TODO(srdjan): if targets are native use their C_function to compare. | 8141 // TODO(srdjan): if targets are native use their C_function to compare. |
| 8129 bool ICData::HasOneTarget() const { | 8142 bool ICData::HasOneTarget() const { |
| 8130 ASSERT(NumberOfChecks() > 0); | 8143 ASSERT(NumberOfChecks() > 0); |
| 8131 const Function& first_target = Function::Handle(GetTargetAt(0)); | 8144 const Function& first_target = Function::Handle(GetTargetAt(0)); |
| 8132 const intptr_t len = NumberOfChecks(); | 8145 const intptr_t len = NumberOfChecks(); |
| 8133 for (intptr_t i = 1; i < len; i++) { | 8146 for (intptr_t i = 1; i < len; i++) { |
| 8134 if (GetTargetAt(i) != first_target.raw()) { | 8147 if (GetTargetAt(i) != first_target.raw()) { |
| 8135 return false; | 8148 return false; |
| 8136 } | 8149 } |
| (...skipping 4539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12676 } | 12689 } |
| 12677 return result.raw(); | 12690 return result.raw(); |
| 12678 } | 12691 } |
| 12679 | 12692 |
| 12680 | 12693 |
| 12681 const char* WeakProperty::ToCString() const { | 12694 const char* WeakProperty::ToCString() const { |
| 12682 return "_WeakProperty"; | 12695 return "_WeakProperty"; |
| 12683 } | 12696 } |
| 12684 | 12697 |
| 12685 } // namespace dart | 12698 } // namespace dart |
| OLD | NEW |