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

Side by Side Diff: src/objects.h

Issue 1003663002: Add Cast() for Int32 and Uint32 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« src/api.cc ('K') | « src/api.cc ('k') | src/objects-inl.h » ('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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 INLINE(bool IsException() const); 1045 INLINE(bool IsException() const);
1046 INLINE(bool IsUninitialized() const); 1046 INLINE(bool IsUninitialized() const);
1047 INLINE(bool IsTrue() const); 1047 INLINE(bool IsTrue() const);
1048 INLINE(bool IsFalse() const); 1048 INLINE(bool IsFalse() const);
1049 INLINE(bool IsArgumentsMarker() const); 1049 INLINE(bool IsArgumentsMarker() const);
1050 1050
1051 // Filler objects (fillers and free space objects). 1051 // Filler objects (fillers and free space objects).
1052 INLINE(bool IsFiller() const); 1052 INLINE(bool IsFiller() const);
1053 1053
1054 // Extract the number. 1054 // Extract the number.
1055 inline double Number(); 1055 inline double Number() const;
1056 INLINE(bool IsNaN() const); 1056 INLINE(bool IsNaN() const);
1057 INLINE(bool IsMinusZero() const); 1057 INLINE(bool IsMinusZero() const);
1058 INLINE(bool IsInt32() const);
1059 INLINE(bool IsUint32() const);
1058 bool ToInt32(int32_t* value); 1060 bool ToInt32(int32_t* value);
1059 bool ToUint32(uint32_t* value); 1061 bool ToUint32(uint32_t* value);
1060 1062
1061 inline Representation OptimalRepresentation() { 1063 inline Representation OptimalRepresentation() {
1062 if (!FLAG_track_fields) return Representation::Tagged(); 1064 if (!FLAG_track_fields) return Representation::Tagged();
1063 if (IsSmi()) { 1065 if (IsSmi()) {
1064 return Representation::Smi(); 1066 return Representation::Smi();
1065 } else if (FLAG_track_double_fields && IsHeapNumber()) { 1067 } else if (FLAG_track_double_fields && IsHeapNumber()) {
1066 return Representation::Double(); 1068 return Representation::Double();
1067 } else if (FLAG_track_computed_fields && IsUninitialized()) { 1069 } else if (FLAG_track_computed_fields && IsUninitialized()) {
(...skipping 9863 matching lines...) Expand 10 before | Expand all | Expand 10 after
10931 } else { 10933 } else {
10932 value &= ~(1 << bit_position); 10934 value &= ~(1 << bit_position);
10933 } 10935 }
10934 return value; 10936 return value;
10935 } 10937 }
10936 }; 10938 };
10937 10939
10938 } } // namespace v8::internal 10940 } } // namespace v8::internal
10939 10941
10940 #endif // V8_OBJECTS_H_ 10942 #endif // V8_OBJECTS_H_
OLDNEW
« src/api.cc ('K') | « src/api.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698