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

Side by Side Diff: include/v8.h

Issue 22350005: Introduce SmiValuesAre31Bits and SmiValuesAre32Bits global predicate functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « no previous file | src/hydrogen-instructions.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 // 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 5434 matching lines...) Expand 10 before | Expand all | Expand 10 after
5445 } 5445 }
5446 V8_INLINE(static bool IsValidSmi(intptr_t value)) { 5446 V8_INLINE(static bool IsValidSmi(intptr_t value)) {
5447 // To be representable as a long smi, the value must be a 32-bit integer. 5447 // To be representable as a long smi, the value must be a 32-bit integer.
5448 return (value == static_cast<int32_t>(value)); 5448 return (value == static_cast<int32_t>(value));
5449 } 5449 }
5450 }; 5450 };
5451 5451
5452 typedef SmiTagging<kApiPointerSize> PlatformSmiTagging; 5452 typedef SmiTagging<kApiPointerSize> PlatformSmiTagging;
5453 const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize; 5453 const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize;
5454 const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize; 5454 const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize;
5455 V8_INLINE(static bool SmiValuesAre31Bits()) { return kSmiValueSize == 31; }
5456 V8_INLINE(static bool SmiValuesAre32Bits()) { return kSmiValueSize == 32; }
5455 5457
5456 /** 5458 /**
5457 * This class exports constants and functionality from within v8 that 5459 * This class exports constants and functionality from within v8 that
5458 * is necessary to implement inline functions in the v8 api. Don't 5460 * is necessary to implement inline functions in the v8 api. Don't
5459 * depend on functions and constants defined here. 5461 * depend on functions and constants defined here.
5460 */ 5462 */
5461 class Internals { 5463 class Internals {
5462 public: 5464 public:
5463 // These values match non-compiler-dependent values defined within 5465 // These values match non-compiler-dependent values defined within
5464 // the implementation of v8. 5466 // the implementation of v8.
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
6586 */ 6588 */
6587 6589
6588 6590
6589 } // namespace v8 6591 } // namespace v8
6590 6592
6591 6593
6592 #undef TYPE_CHECK 6594 #undef TYPE_CHECK
6593 6595
6594 6596
6595 #endif // V8_H_ 6597 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698