OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 inline double Number(); | 1048 inline double Number(); |
1049 inline bool IsNaN(); | 1049 inline bool IsNaN(); |
1050 | 1050 |
1051 // Returns true if the object is of the correct type to be used as a | 1051 // Returns true if the object is of the correct type to be used as a |
1052 // implementation of a JSObject's elements. | 1052 // implementation of a JSObject's elements. |
1053 inline bool HasValidElements(); | 1053 inline bool HasValidElements(); |
1054 | 1054 |
1055 inline bool HasSpecificClassOf(String* name); | 1055 inline bool HasSpecificClassOf(String* name); |
1056 | 1056 |
1057 MUST_USE_RESULT MaybeObject* ToObject(); // ECMA-262 9.9. | 1057 MUST_USE_RESULT MaybeObject* ToObject(); // ECMA-262 9.9. |
1058 Object* ToBoolean(); // ECMA-262 9.2. | 1058 bool BooleanValue(); // ECMA-262 9.2. |
1059 | 1059 |
1060 // Convert to a JSObject if needed. | 1060 // Convert to a JSObject if needed. |
1061 // native_context is used when creating wrapper object. | 1061 // native_context is used when creating wrapper object. |
1062 MUST_USE_RESULT MaybeObject* ToObject(Context* native_context); | 1062 MUST_USE_RESULT MaybeObject* ToObject(Context* native_context); |
1063 | 1063 |
1064 // Converts this to a Smi if possible. | 1064 // Converts this to a Smi if possible. |
1065 // Failure is returned otherwise. | 1065 // Failure is returned otherwise. |
1066 MUST_USE_RESULT inline MaybeObject* ToSmi(); | 1066 MUST_USE_RESULT inline MaybeObject* ToSmi(); |
1067 | 1067 |
1068 void Lookup(Name* name, LookupResult* result); | 1068 void Lookup(Name* name, LookupResult* result); |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 class HeapNumber: public HeapObject { | 1458 class HeapNumber: public HeapObject { |
1459 public: | 1459 public: |
1460 // [value]: number value. | 1460 // [value]: number value. |
1461 inline double value(); | 1461 inline double value(); |
1462 inline void set_value(double value); | 1462 inline void set_value(double value); |
1463 | 1463 |
1464 // Casting. | 1464 // Casting. |
1465 static inline HeapNumber* cast(Object* obj); | 1465 static inline HeapNumber* cast(Object* obj); |
1466 | 1466 |
1467 // Dispatched behavior. | 1467 // Dispatched behavior. |
1468 Object* HeapNumberToBoolean(); | 1468 bool HeapNumberBooleanValue(); |
| 1469 |
1469 inline void HeapNumberPrint() { | 1470 inline void HeapNumberPrint() { |
1470 HeapNumberPrint(stdout); | 1471 HeapNumberPrint(stdout); |
1471 } | 1472 } |
1472 void HeapNumberPrint(FILE* out); | 1473 void HeapNumberPrint(FILE* out); |
1473 void HeapNumberPrint(StringStream* accumulator); | 1474 void HeapNumberPrint(StringStream* accumulator); |
1474 DECLARE_VERIFIER(HeapNumber) | 1475 DECLARE_VERIFIER(HeapNumber) |
1475 | 1476 |
1476 inline int get_exponent(); | 1477 inline int get_exponent(); |
1477 inline int get_sign(); | 1478 inline int get_sign(); |
1478 | 1479 |
(...skipping 7767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9246 } else { | 9247 } else { |
9247 value &= ~(1 << bit_position); | 9248 value &= ~(1 << bit_position); |
9248 } | 9249 } |
9249 return value; | 9250 return value; |
9250 } | 9251 } |
9251 }; | 9252 }; |
9252 | 9253 |
9253 } } // namespace v8::internal | 9254 } } // namespace v8::internal |
9254 | 9255 |
9255 #endif // V8_OBJECTS_H_ | 9256 #endif // V8_OBJECTS_H_ |
OLD | NEW |