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

Side by Side Diff: src/platform-win32.cc

Issue 9581045: Fix MinGW-w64 compilation (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 | « no previous file | 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 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 --dest_size; 105 --dest_size;
106 --count; 106 --count;
107 } 107 }
108 } 108 }
109 CHECK_GT(dest_size, 0); 109 CHECK_GT(dest_size, 0);
110 *dest = 0; 110 *dest = 0;
111 return 0; 111 return 0;
112 } 112 }
113 113
114 114
115 #ifndef __MINGW64_VERSION_MAJOR
116
115 inline void MemoryBarrier() { 117 inline void MemoryBarrier() {
116 int barrier = 0; 118 int barrier = 0;
117 __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier)); 119 __asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
118 } 120 }
119 121
122 #endif // __MINGW64_VERSION_MAJOR
123
124
120 #endif // __MINGW32__ 125 #endif // __MINGW32__
121 126
122 // Generate a pseudo-random number in the range 0-2^31-1. Usually 127 // Generate a pseudo-random number in the range 0-2^31-1. Usually
123 // defined in stdlib.h. Missing in both Microsoft Visual Studio C++ and MinGW. 128 // defined in stdlib.h. Missing in both Microsoft Visual Studio C++ and MinGW.
124 int random() { 129 int random() {
125 return rand(); 130 return rand();
126 } 131 }
127 132
128 133
129 namespace v8 { 134 namespace v8 {
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 2073
2069 2074
2070 void Sampler::Stop() { 2075 void Sampler::Stop() {
2071 ASSERT(IsActive()); 2076 ASSERT(IsActive());
2072 SamplerThread::RemoveActiveSampler(this); 2077 SamplerThread::RemoveActiveSampler(this);
2073 SetActive(false); 2078 SetActive(false);
2074 } 2079 }
2075 2080
2076 2081
2077 } } // namespace v8::internal 2082 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698