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

Side by Side Diff: src/v8utils.h

Issue 8130002: Make accessors for oddball objects return Oddball* instead of Object*. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: split InitializeThreadLocal into two parts Created 9 years, 2 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/type-info.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } else { 135 } else {
136 int remaining = num_words; 136 int remaining = num_words;
137 do { 137 do {
138 remaining--; 138 remaining--;
139 *dst++ = *src++; 139 *dst++ = *src++;
140 } while (remaining > 0); 140 } while (remaining > 0);
141 } 141 }
142 } 142 }
143 143
144 144
145 template <typename T> 145 template <typename T, typename U>
146 static inline void MemsetPointer(T** dest, T* value, int counter) { 146 static inline void MemsetPointer(T** dest, U* value, int counter) {
147 #ifdef DEBUG
148 T* a = NULL;
149 U* b = NULL;
150 a = b; // Fake assignment to check assignability.
151 USE(a);
152 #endif // DEBUG
147 #if defined(V8_HOST_ARCH_IA32) 153 #if defined(V8_HOST_ARCH_IA32)
148 #define STOS "stosl" 154 #define STOS "stosl"
149 #elif defined(V8_HOST_ARCH_X64) 155 #elif defined(V8_HOST_ARCH_X64)
150 #define STOS "stosq" 156 #define STOS "stosq"
151 #endif 157 #endif
152 158
153 #if defined(__GNUC__) && defined(STOS) 159 #if defined(__GNUC__) && defined(STOS)
154 asm volatile( 160 asm volatile(
155 "cld;" 161 "cld;"
156 "rep ; " STOS 162 "rep ; " STOS
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 267
262 // Add formatted contents like printf based on a va_list. 268 // Add formatted contents like printf based on a va_list.
263 void AddFormattedList(const char* format, va_list list); 269 void AddFormattedList(const char* format, va_list list);
264 private: 270 private:
265 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); 271 DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder);
266 }; 272 };
267 273
268 } } // namespace v8::internal 274 } } // namespace v8::internal
269 275
270 #endif // V8_V8UTILS_H_ 276 #endif // V8_V8UTILS_H_
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698