Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1374)

Side by Side Diff: runtime/vm/object.h

Issue 551043002: VM: Remove unused IsClosureCall bit from IC data. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3483 matching lines...) Expand 10 before | Expand all | Expand 10 after
3494 bool HasDeoptReason(ICData::DeoptReasonId reason) const; 3494 bool HasDeoptReason(ICData::DeoptReasonId reason) const;
3495 void AddDeoptReason(ICData::DeoptReasonId reason) const; 3495 void AddDeoptReason(ICData::DeoptReasonId reason) const;
3496 3496
3497 bool IssuedJSWarning() const; 3497 bool IssuedJSWarning() const;
3498 void SetIssuedJSWarning() const; 3498 void SetIssuedJSWarning() const;
3499 3499
3500 // Return true if the target function of this IC data may check for (and 3500 // Return true if the target function of this IC data may check for (and
3501 // possibly issue) a Javascript compatibility warning. 3501 // possibly issue) a Javascript compatibility warning.
3502 bool MayCheckForJSWarning() const; 3502 bool MayCheckForJSWarning() const;
3503 3503
3504 bool IsClosureCall() const;
3505 void SetIsClosureCall() const;
3506
3507 intptr_t NumberOfChecks() const; 3504 intptr_t NumberOfChecks() const;
3508 3505
3509 // Discounts any checks with usage of zero. 3506 // Discounts any checks with usage of zero.
3510 intptr_t NumberOfUsedChecks() const; 3507 intptr_t NumberOfUsedChecks() const;
3511 3508
3512 static intptr_t InstanceSize() { 3509 static intptr_t InstanceSize() {
3513 return RoundedAllocationSize(sizeof(RawICData)); 3510 return RoundedAllocationSize(sizeof(RawICData));
3514 } 3511 }
3515 3512
3516 static intptr_t target_name_offset() { 3513 static intptr_t target_name_offset() {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3627 void SetNumArgsTested(intptr_t value) const; 3624 void SetNumArgsTested(intptr_t value) const;
3628 void set_ic_data(const Array& value) const; 3625 void set_ic_data(const Array& value) const;
3629 void set_state_bits(uint32_t bits) const; 3626 void set_state_bits(uint32_t bits) const;
3630 3627
3631 enum { 3628 enum {
3632 kNumArgsTestedPos = 0, 3629 kNumArgsTestedPos = 0,
3633 kNumArgsTestedSize = 2, 3630 kNumArgsTestedSize = 2,
3634 kDeoptReasonPos = kNumArgsTestedPos + kNumArgsTestedSize, 3631 kDeoptReasonPos = kNumArgsTestedPos + kNumArgsTestedSize,
3635 kDeoptReasonSize = kDeoptNumReasons, 3632 kDeoptReasonSize = kDeoptNumReasons,
3636 kIssuedJSWarningBit = kDeoptReasonPos + kDeoptReasonSize, 3633 kIssuedJSWarningBit = kDeoptReasonPos + kDeoptReasonSize,
3637 kIsClosureCallBit = kIssuedJSWarningBit + 1,
3638 }; 3634 };
3639 3635
3640 class NumArgsTestedBits : public BitField<uint32_t, 3636 class NumArgsTestedBits : public BitField<uint32_t,
3641 kNumArgsTestedPos, kNumArgsTestedSize> {}; // NOLINT 3637 kNumArgsTestedPos, kNumArgsTestedSize> {}; // NOLINT
3642 class DeoptReasonBits : public BitField<uint32_t, 3638 class DeoptReasonBits : public BitField<uint32_t,
3643 ICData::kDeoptReasonPos, ICData::kDeoptReasonSize> {}; // NOLINT 3639 ICData::kDeoptReasonPos, ICData::kDeoptReasonSize> {}; // NOLINT
3644 class IssuedJSWarningBit : public BitField<bool, kIssuedJSWarningBit, 1> {}; 3640 class IssuedJSWarningBit : public BitField<bool, kIssuedJSWarningBit, 1> {};
3645 class IsClosureCallBit : public BitField<bool, kIsClosureCallBit, 1> {};
3646 3641
3647 #if defined(DEBUG) 3642 #if defined(DEBUG)
3648 // Used in asserts to verify that a check is not added twice. 3643 // Used in asserts to verify that a check is not added twice.
3649 bool HasCheck(const GrowableArray<intptr_t>& cids) const; 3644 bool HasCheck(const GrowableArray<intptr_t>& cids) const;
3650 #endif // DEBUG 3645 #endif // DEBUG
3651 3646
3652 intptr_t TestEntryLength() const; 3647 intptr_t TestEntryLength() const;
3653 void WriteSentinel(const Array& data) const; 3648 void WriteSentinel(const Array& data) const;
3654 3649
3655 FINAL_HEAP_OBJECT_IMPLEMENTATION(ICData, Object); 3650 FINAL_HEAP_OBJECT_IMPLEMENTATION(ICData, Object);
(...skipping 3764 matching lines...) Expand 10 before | Expand all | Expand 10 after
7420 7415
7421 7416
7422 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7417 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7423 intptr_t index) { 7418 intptr_t index) {
7424 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7419 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7425 } 7420 }
7426 7421
7427 } // namespace dart 7422 } // namespace dart
7428 7423
7429 #endif // VM_OBJECT_H_ 7424 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698