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

Side by Side Diff: src/objects.h

Issue 1008004: Improve Math.round(). Fix the bug in r4146. Further improve performance by ch... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « src/math.js ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 static inline HeapNumber* cast(Object* obj); 1087 static inline HeapNumber* cast(Object* obj);
1088 1088
1089 // Dispatched behavior. 1089 // Dispatched behavior.
1090 Object* HeapNumberToBoolean(); 1090 Object* HeapNumberToBoolean();
1091 void HeapNumberPrint(); 1091 void HeapNumberPrint();
1092 void HeapNumberPrint(StringStream* accumulator); 1092 void HeapNumberPrint(StringStream* accumulator);
1093 #ifdef DEBUG 1093 #ifdef DEBUG
1094 void HeapNumberVerify(); 1094 void HeapNumberVerify();
1095 #endif 1095 #endif
1096 1096
1097 inline int get_exponent();
1098 inline int get_sign();
1099
1097 // Layout description. 1100 // Layout description.
1098 static const int kValueOffset = HeapObject::kHeaderSize; 1101 static const int kValueOffset = HeapObject::kHeaderSize;
1099 // IEEE doubles are two 32 bit words. The first is just mantissa, the second 1102 // IEEE doubles are two 32 bit words. The first is just mantissa, the second
1100 // is a mixture of sign, exponent and mantissa. Our current platforms are all 1103 // is a mixture of sign, exponent and mantissa. Our current platforms are all
1101 // little endian apart from non-EABI arm which is little endian with big 1104 // little endian apart from non-EABI arm which is little endian with big
1102 // endian floating point word ordering! 1105 // endian floating point word ordering!
1103 #if !defined(V8_HOST_ARCH_ARM) || defined(USE_ARM_EABI) 1106 #if !defined(V8_HOST_ARCH_ARM) || defined(USE_ARM_EABI)
1104 static const int kMantissaOffset = kValueOffset; 1107 static const int kMantissaOffset = kValueOffset;
1105 static const int kExponentOffset = kValueOffset + 4; 1108 static const int kExponentOffset = kValueOffset + 4;
1106 #else 1109 #else
(...skipping 3982 matching lines...) Expand 10 before | Expand all | Expand 10 after
5089 } else { 5092 } else {
5090 value &= ~(1 << bit_position); 5093 value &= ~(1 << bit_position);
5091 } 5094 }
5092 return value; 5095 return value;
5093 } 5096 }
5094 }; 5097 };
5095 5098
5096 } } // namespace v8::internal 5099 } } // namespace v8::internal
5097 5100
5098 #endif // V8_OBJECTS_H_ 5101 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/math.js ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698