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

Side by Side Diff: runtime/vm/os_win.cc

Issue 415513002: - Fix a lot of warnings generated by -Wshorten-64-to-32 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 | « runtime/vm/os_test.cc ('k') | runtime/vm/port_test.cc » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "vm/os.h" 8 #include "vm/os.h"
9 #include "vm/vtune.h" 9 #include "vm/vtune.h"
10 10
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 return p; 131 return p;
132 } 132 }
133 133
134 134
135 void OS::AlignedFree(void* ptr) { 135 void OS::AlignedFree(void* ptr) {
136 _aligned_free(ptr); 136 _aligned_free(ptr);
137 } 137 }
138 138
139 139
140 word OS::ActivationFrameAlignment() { 140 intptr_t OS::ActivationFrameAlignment() {
141 #ifdef _WIN64 141 #ifdef _WIN64
142 // Windows 64-bit ABI requires the stack to be 16-byte aligned. 142 // Windows 64-bit ABI requires the stack to be 16-byte aligned.
143 return 16; 143 return 16;
144 #else 144 #else
145 // No requirements on Win32. 145 // No requirements on Win32.
146 return 1; 146 return 1;
147 #endif 147 #endif
148 } 148 }
149 149
150 150
151 word OS::PreferredCodeAlignment() { 151 intptr_t OS::PreferredCodeAlignment() {
152 ASSERT(32 <= OS::kMaxPreferredCodeAlignment); 152 ASSERT(32 <= OS::kMaxPreferredCodeAlignment);
153 return 32; 153 return 32;
154 } 154 }
155 155
156 156
157 uword OS::GetStackSizeLimit() {
158 // TODO(ager): Can you programatically determine the actual stack
159 // size limit on Windows? The 2MB limit is set at link time. Maybe
160 // that value should be propagated here?
161 return 2 * MB;
162 }
163
164
165 bool OS::AllowStackFrameIteratorFromAnotherThread() { 157 bool OS::AllowStackFrameIteratorFromAnotherThread() {
166 return true; 158 return true;
167 } 159 }
168 160
169 161
170 int OS::NumberOfAvailableProcessors() { 162 int OS::NumberOfAvailableProcessors() {
171 SYSTEM_INFO info; 163 SYSTEM_INFO info;
172 GetSystemInfo(&info); 164 GetSystemInfo(&info);
173 return info.dwNumberOfProcessors; 165 return info.dwNumberOfProcessors;
174 } 166 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 } 327 }
336 328
337 329
338 void OS::Exit(int code) { 330 void OS::Exit(int code) {
339 exit(code); 331 exit(code);
340 } 332 }
341 333
342 } // namespace dart 334 } // namespace dart
343 335
344 #endif // defined(TARGET_OS_WINDOWS) 336 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« no previous file with comments | « runtime/vm/os_test.cc ('k') | runtime/vm/port_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698