| 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 7440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7451 | 7451 |
| 7452 void ICData::set_ic_data(const Array& value) const { | 7452 void ICData::set_ic_data(const Array& value) const { |
| 7453 StorePointer(&raw_ptr()->ic_data_, value.raw()); | 7453 StorePointer(&raw_ptr()->ic_data_, value.raw()); |
| 7454 } | 7454 } |
| 7455 | 7455 |
| 7456 | 7456 |
| 7457 void ICData::set_deopt_reason(intptr_t deopt_reason) const { | 7457 void ICData::set_deopt_reason(intptr_t deopt_reason) const { |
| 7458 raw_ptr()->deopt_reason_ = deopt_reason; | 7458 raw_ptr()->deopt_reason_ = deopt_reason; |
| 7459 } | 7459 } |
| 7460 | 7460 |
| 7461 void ICData::set_is_closure_call(bool value) const { |
| 7462 raw_ptr()->is_closure_call_ = value ? 1 : 0; |
| 7463 } |
| 7464 |
| 7461 | 7465 |
| 7462 intptr_t ICData::TestEntryLength() const { | 7466 intptr_t ICData::TestEntryLength() const { |
| 7463 return num_args_tested() + 1 /* target function*/; | 7467 return num_args_tested() + 1 /* target function*/; |
| 7464 } | 7468 } |
| 7465 | 7469 |
| 7466 | 7470 |
| 7467 intptr_t ICData::NumberOfChecks() const { | 7471 intptr_t ICData::NumberOfChecks() const { |
| 7468 // Do not count the sentinel; | 7472 // Do not count the sentinel; |
| 7469 return (Array::Handle(ic_data()).Length() / TestEntryLength()) - 1; | 7473 return (Array::Handle(ic_data()).Length() / TestEntryLength()) - 1; |
| 7470 } | 7474 } |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7727 ICData::InstanceSize(), | 7731 ICData::InstanceSize(), |
| 7728 Heap::kOld); | 7732 Heap::kOld); |
| 7729 NoGCScope no_gc; | 7733 NoGCScope no_gc; |
| 7730 result ^= raw; | 7734 result ^= raw; |
| 7731 } | 7735 } |
| 7732 result.set_function(function); | 7736 result.set_function(function); |
| 7733 result.set_target_name(target_name); | 7737 result.set_target_name(target_name); |
| 7734 result.set_deopt_id(deopt_id); | 7738 result.set_deopt_id(deopt_id); |
| 7735 result.set_num_args_tested(num_args_tested); | 7739 result.set_num_args_tested(num_args_tested); |
| 7736 result.set_deopt_reason(kDeoptUnknown); | 7740 result.set_deopt_reason(kDeoptUnknown); |
| 7741 result.set_is_closure_call(false); |
| 7737 // Number of array elements in one test entry (num_args_tested + 1) | 7742 // Number of array elements in one test entry (num_args_tested + 1) |
| 7738 intptr_t len = result.TestEntryLength(); | 7743 intptr_t len = result.TestEntryLength(); |
| 7739 // IC data array must be null terminated (sentinel entry). | 7744 // IC data array must be null terminated (sentinel entry). |
| 7740 const Array& ic_data = Array::Handle(Array::New(len, Heap::kOld)); | 7745 const Array& ic_data = Array::Handle(Array::New(len, Heap::kOld)); |
| 7741 result.set_ic_data(ic_data); | 7746 result.set_ic_data(ic_data); |
| 7742 result.WriteSentinel(); | 7747 result.WriteSentinel(); |
| 7743 return result.raw(); | 7748 return result.raw(); |
| 7744 } | 7749 } |
| 7745 | 7750 |
| 7746 | 7751 |
| (...skipping 4238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11985 } | 11990 } |
| 11986 return result.raw(); | 11991 return result.raw(); |
| 11987 } | 11992 } |
| 11988 | 11993 |
| 11989 | 11994 |
| 11990 const char* WeakProperty::ToCString() const { | 11995 const char* WeakProperty::ToCString() const { |
| 11991 return "_WeakProperty"; | 11996 return "_WeakProperty"; |
| 11992 } | 11997 } |
| 11993 | 11998 |
| 11994 } // namespace dart | 11999 } // namespace dart |
| OLD | NEW |