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

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

Issue 303034: X64/Win64: Alternative implementation of fmod in general. (Closed)
Patch Set: Created 11 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include <utils/Log.h> // LOG_PRI_VA 47 #include <utils/Log.h> // LOG_PRI_VA
48 #endif 48 #endif
49 49
50 #include "v8.h" 50 #include "v8.h"
51 51
52 #include "platform.h" 52 #include "platform.h"
53 53
54 namespace v8 { 54 namespace v8 {
55 namespace internal { 55 namespace internal {
56 56
57 // ----------------------------------------------------------------------------
58 // Math functions
59
60 double modulo(double x, double y) {
61 return fmod(x, y);
62 }
57 63
58 // ---------------------------------------------------------------------------- 64 // ----------------------------------------------------------------------------
59 // POSIX date/time support. 65 // POSIX date/time support.
60 // 66 //
61 67
62 int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) { 68 int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) {
63 struct rusage usage; 69 struct rusage usage;
64 70
65 if (getrusage(RUSAGE_SELF, &usage) < 0) return -1; 71 if (getrusage(RUSAGE_SELF, &usage) < 0) return -1;
66 *secs = usage.ru_utime.tv_sec; 72 *secs = usage.ru_utime.tv_sec;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 return ntohl(value); 364 return ntohl(value);
359 } 365 }
360 366
361 367
362 Socket* OS::CreateSocket() { 368 Socket* OS::CreateSocket() {
363 return new POSIXSocket(); 369 return new POSIXSocket();
364 } 370 }
365 371
366 372
367 } } // namespace v8::internal 373 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-nullos.cc ('k') | src/platform-win32.cc » ('j') | src/x64/codegen-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698