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

Side by Side Diff: src/hydrogen-instructions.h

Issue 1316933002: [es6] Initial steps towards a correct implementation of IsCallable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ia32, arm and arm64 ports. Misc cleanups. Created 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 3621
3622 bool HasExternalReferenceValue() const { 3622 bool HasExternalReferenceValue() const {
3623 return HasExternalReferenceValueField::decode(bit_field_); 3623 return HasExternalReferenceValueField::decode(bit_field_);
3624 } 3624 }
3625 ExternalReference ExternalReferenceValue() const { 3625 ExternalReference ExternalReferenceValue() const {
3626 return external_reference_value_; 3626 return external_reference_value_;
3627 } 3627 }
3628 3628
3629 bool HasBooleanValue() const { return type_.IsBoolean(); } 3629 bool HasBooleanValue() const { return type_.IsBoolean(); }
3630 bool BooleanValue() const { return BooleanValueField::decode(bit_field_); } 3630 bool BooleanValue() const { return BooleanValueField::decode(bit_field_); }
3631 bool IsCallable() const { return IsCallableField::decode(bit_field_); }
3631 bool IsUndetectable() const { 3632 bool IsUndetectable() const {
3632 return IsUndetectableField::decode(bit_field_); 3633 return IsUndetectableField::decode(bit_field_);
3633 } 3634 }
3634 InstanceType GetInstanceType() const { 3635 InstanceType GetInstanceType() const {
3635 return InstanceTypeField::decode(bit_field_); 3636 return InstanceTypeField::decode(bit_field_);
3636 } 3637 }
3637 3638
3638 bool HasMapValue() const { return GetInstanceType() == MAP_TYPE; } 3639 bool HasMapValue() const { return GetInstanceType() == MAP_TYPE; }
3639 Unique<Map> MapValue() const { 3640 Unique<Map> MapValue() const {
3640 DCHECK(HasMapValue()); 3641 DCHECK(HasMapValue());
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3753 // representations of the constant. More specific flags imply more general 3754 // representations of the constant. More specific flags imply more general
3754 // flags, but not the converse (i.e. smi => int32 => double). 3755 // flags, but not the converse (i.e. smi => int32 => double).
3755 class HasSmiValueField : public BitField<bool, 1, 1> {}; 3756 class HasSmiValueField : public BitField<bool, 1, 1> {};
3756 class HasInt32ValueField : public BitField<bool, 2, 1> {}; 3757 class HasInt32ValueField : public BitField<bool, 2, 1> {};
3757 class HasDoubleValueField : public BitField<bool, 3, 1> {}; 3758 class HasDoubleValueField : public BitField<bool, 3, 1> {};
3758 3759
3759 class HasExternalReferenceValueField : public BitField<bool, 4, 1> {}; 3760 class HasExternalReferenceValueField : public BitField<bool, 4, 1> {};
3760 class IsNotInNewSpaceField : public BitField<bool, 5, 1> {}; 3761 class IsNotInNewSpaceField : public BitField<bool, 5, 1> {};
3761 class BooleanValueField : public BitField<bool, 6, 1> {}; 3762 class BooleanValueField : public BitField<bool, 6, 1> {};
3762 class IsUndetectableField : public BitField<bool, 7, 1> {}; 3763 class IsUndetectableField : public BitField<bool, 7, 1> {};
3764 class IsCallableField : public BitField<bool, 8, 1> {};
3763 3765
3764 static const InstanceType kUnknownInstanceType = FILLER_TYPE; 3766 static const InstanceType kUnknownInstanceType = FILLER_TYPE;
3765 class InstanceTypeField : public BitField<InstanceType, 8, 8> {}; 3767 class InstanceTypeField : public BitField<InstanceType, 16, 8> {};
3766 3768
3767 // If this is a numerical constant, object_ either points to the 3769 // If this is a numerical constant, object_ either points to the
3768 // HeapObject the constant originated from or is null. If the 3770 // HeapObject the constant originated from or is null. If the
3769 // constant is non-numeric, object_ always points to a valid 3771 // constant is non-numeric, object_ always points to a valid
3770 // constant HeapObject. 3772 // constant HeapObject.
3771 Unique<Object> object_; 3773 Unique<Object> object_;
3772 3774
3773 // If object_ is a heap object, this points to the stable map of the object. 3775 // If object_ is a heap object, this points to the stable map of the object.
3774 Unique<Map> object_map_; 3776 Unique<Map> object_map_;
3775 3777
(...skipping 4260 matching lines...) Expand 10 before | Expand all | Expand 10 after
8036 }; 8038 };
8037 8039
8038 8040
8039 8041
8040 #undef DECLARE_INSTRUCTION 8042 #undef DECLARE_INSTRUCTION
8041 #undef DECLARE_CONCRETE_INSTRUCTION 8043 #undef DECLARE_CONCRETE_INSTRUCTION
8042 8044
8043 } } // namespace v8::internal 8045 } } // namespace v8::internal
8044 8046
8045 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8047 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698