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

Side by Side Diff: include/v8.h

Issue 69413002: Fix compilation with GCC 4.8 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: only use __attribute__ when supported Created 7 years, 1 month 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 | include/v8config.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 5801 matching lines...) Expand 10 before | Expand all | Expand 10 after
5812 if (V8_LIKELY(I::IsValidSmi(i))) { 5812 if (V8_LIKELY(I::IsValidSmi(i))) {
5813 *value_ = I::IntToSmi(i); 5813 *value_ = I::IntToSmi(i);
5814 return; 5814 return;
5815 } 5815 }
5816 Set(Integer::New(i, GetIsolate())); 5816 Set(Integer::New(i, GetIsolate()));
5817 } 5817 }
5818 5818
5819 template<typename T> 5819 template<typename T>
5820 void ReturnValue<T>::Set(uint32_t i) { 5820 void ReturnValue<T>::Set(uint32_t i) {
5821 TYPE_CHECK(T, Integer); 5821 TYPE_CHECK(T, Integer);
5822 typedef internal::Internals I;
5823 // Can't simply use INT32_MAX here for whatever reason. 5822 // Can't simply use INT32_MAX here for whatever reason.
5824 bool fits_into_int32_t = (i & (1U << 31)) == 0; 5823 bool fits_into_int32_t = (i & (1U << 31)) == 0;
5825 if (V8_LIKELY(fits_into_int32_t)) { 5824 if (V8_LIKELY(fits_into_int32_t)) {
5826 Set(static_cast<int32_t>(i)); 5825 Set(static_cast<int32_t>(i));
5827 return; 5826 return;
5828 } 5827 }
5829 Set(Integer::NewFromUnsigned(i, GetIsolate())); 5828 Set(Integer::NewFromUnsigned(i, GetIsolate()));
5830 } 5829 }
5831 5830
5832 template<typename T> 5831 template<typename T>
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
6505 */ 6504 */
6506 6505
6507 6506
6508 } // namespace v8 6507 } // namespace v8
6509 6508
6510 6509
6511 #undef TYPE_CHECK 6510 #undef TYPE_CHECK
6512 6511
6513 6512
6514 #endif // V8_H_ 6513 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698