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

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: Rebase again. 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after
3616 3616
3617 bool HasExternalReferenceValue() const { 3617 bool HasExternalReferenceValue() const {
3618 return HasExternalReferenceValueField::decode(bit_field_); 3618 return HasExternalReferenceValueField::decode(bit_field_);
3619 } 3619 }
3620 ExternalReference ExternalReferenceValue() const { 3620 ExternalReference ExternalReferenceValue() const {
3621 return external_reference_value_; 3621 return external_reference_value_;
3622 } 3622 }
3623 3623
3624 bool HasBooleanValue() const { return type_.IsBoolean(); } 3624 bool HasBooleanValue() const { return type_.IsBoolean(); }
3625 bool BooleanValue() const { return BooleanValueField::decode(bit_field_); } 3625 bool BooleanValue() const { return BooleanValueField::decode(bit_field_); }
3626 bool IsCallable() const { return IsCallableField::decode(bit_field_); }
3626 bool IsUndetectable() const { 3627 bool IsUndetectable() const {
3627 return IsUndetectableField::decode(bit_field_); 3628 return IsUndetectableField::decode(bit_field_);
3628 } 3629 }
3629 InstanceType GetInstanceType() const { 3630 InstanceType GetInstanceType() const {
3630 return InstanceTypeField::decode(bit_field_); 3631 return InstanceTypeField::decode(bit_field_);
3631 } 3632 }
3632 3633
3633 bool HasMapValue() const { return GetInstanceType() == MAP_TYPE; } 3634 bool HasMapValue() const { return GetInstanceType() == MAP_TYPE; }
3634 Unique<Map> MapValue() const { 3635 Unique<Map> MapValue() const {
3635 DCHECK(HasMapValue()); 3636 DCHECK(HasMapValue());
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3748 // representations of the constant. More specific flags imply more general 3749 // representations of the constant. More specific flags imply more general
3749 // flags, but not the converse (i.e. smi => int32 => double). 3750 // flags, but not the converse (i.e. smi => int32 => double).
3750 class HasSmiValueField : public BitField<bool, 1, 1> {}; 3751 class HasSmiValueField : public BitField<bool, 1, 1> {};
3751 class HasInt32ValueField : public BitField<bool, 2, 1> {}; 3752 class HasInt32ValueField : public BitField<bool, 2, 1> {};
3752 class HasDoubleValueField : public BitField<bool, 3, 1> {}; 3753 class HasDoubleValueField : public BitField<bool, 3, 1> {};
3753 3754
3754 class HasExternalReferenceValueField : public BitField<bool, 4, 1> {}; 3755 class HasExternalReferenceValueField : public BitField<bool, 4, 1> {};
3755 class IsNotInNewSpaceField : public BitField<bool, 5, 1> {}; 3756 class IsNotInNewSpaceField : public BitField<bool, 5, 1> {};
3756 class BooleanValueField : public BitField<bool, 6, 1> {}; 3757 class BooleanValueField : public BitField<bool, 6, 1> {};
3757 class IsUndetectableField : public BitField<bool, 7, 1> {}; 3758 class IsUndetectableField : public BitField<bool, 7, 1> {};
3759 class IsCallableField : public BitField<bool, 8, 1> {};
3758 3760
3759 static const InstanceType kUnknownInstanceType = FILLER_TYPE; 3761 static const InstanceType kUnknownInstanceType = FILLER_TYPE;
3760 class InstanceTypeField : public BitField<InstanceType, 8, 8> {}; 3762 class InstanceTypeField : public BitField<InstanceType, 16, 8> {};
3761 3763
3762 // If this is a numerical constant, object_ either points to the 3764 // If this is a numerical constant, object_ either points to the
3763 // HeapObject the constant originated from or is null. If the 3765 // HeapObject the constant originated from or is null. If the
3764 // constant is non-numeric, object_ always points to a valid 3766 // constant is non-numeric, object_ always points to a valid
3765 // constant HeapObject. 3767 // constant HeapObject.
3766 Unique<Object> object_; 3768 Unique<Object> object_;
3767 3769
3768 // If object_ is a heap object, this points to the stable map of the object. 3770 // If object_ is a heap object, this points to the stable map of the object.
3769 Unique<Map> object_map_; 3771 Unique<Map> object_map_;
3770 3772
(...skipping 4260 matching lines...) Expand 10 before | Expand all | Expand 10 after
8031 }; 8033 };
8032 8034
8033 8035
8034 8036
8035 #undef DECLARE_INSTRUCTION 8037 #undef DECLARE_INSTRUCTION
8036 #undef DECLARE_CONCRETE_INSTRUCTION 8038 #undef DECLARE_CONCRETE_INSTRUCTION
8037 8039
8038 } } // namespace v8::internal 8040 } } // namespace v8::internal
8039 8041
8040 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 8042 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698