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

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

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 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 | « src/platform-freebsd.cc ('k') | src/platform-macos.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 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
11 // with the distribution. 11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its 12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived 13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission. 14 // from this software without specific prior written permission.
15 // 15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 // Platform specific code for Linux goes here. For the POSIX comaptible parts 28 // Platform-specific code for Linux goes here. For the POSIX-compatible
29 // the implementation is in platform-posix.cc. 29 // parts, the implementation is in platform-posix.cc.
30 30
31 #include <pthread.h> 31 #include <pthread.h>
32 #include <semaphore.h> 32 #include <semaphore.h>
33 #include <signal.h> 33 #include <signal.h>
34 #include <sys/prctl.h> 34 #include <sys/prctl.h>
35 #include <sys/time.h> 35 #include <sys/time.h>
36 #include <sys/resource.h> 36 #include <sys/resource.h>
37 #include <sys/syscall.h> 37 #include <sys/syscall.h>
38 #include <sys/types.h> 38 #include <sys/types.h>
39 #include <stdlib.h> 39 #include <stdlib.h>
40 40
41 // Ubuntu Dapper requires memory pages to be marked as 41 // Ubuntu Dapper requires memory pages to be marked as
42 // executable. Otherwise, OS raises an exception when executing code 42 // executable. Otherwise, OS raises an exception when executing code
43 // in that page. 43 // in that page.
44 #include <sys/types.h> // mmap & munmap 44 #include <sys/types.h> // mmap & munmap
45 #include <sys/mman.h> // mmap & munmap 45 #include <sys/mman.h> // mmap & munmap
46 #include <sys/stat.h> // open 46 #include <sys/stat.h> // open
47 #include <fcntl.h> // open 47 #include <fcntl.h> // open
48 #include <unistd.h> // sysconf 48 #include <unistd.h> // sysconf
49 #include <strings.h> // index 49 #include <strings.h> // index
50 #include <errno.h> 50 #include <errno.h>
51 #include <stdarg.h> 51 #include <stdarg.h>
52 52
53 // GLibc on ARM defines mcontext_t has a typedef for 'struct sigcontext'. 53 // GLibc on ARM defines mcontext_t has a typedef for 'struct sigcontext'.
54 // Old versions of the C library <signal.h> didn't define the type. 54 // Old versions of the C library <signal.h> didn't define the type.
55 #if defined(__ANDROID__) && !defined(__BIONIC_HAVE_UCONTEXT_T) && \ 55 #if defined(__ANDROID__) && !defined(__BIONIC_HAVE_UCONTEXT_T) && \
56 defined(__arm__) && !defined(__BIONIC_HAVE_STRUCT_SIGCONTEXT) 56 (defined(__arm__) || defined(__aarch64__)) && \
57 !defined(__BIONIC_HAVE_STRUCT_SIGCONTEXT)
57 #include <asm/sigcontext.h> 58 #include <asm/sigcontext.h>
58 #endif 59 #endif
59 60
60 #if defined(LEAK_SANITIZER) 61 #if defined(LEAK_SANITIZER)
61 #include <sanitizer/lsan_interface.h> 62 #include <sanitizer/lsan_interface.h>
62 #endif 63 #endif
63 64
64 #undef MAP_TYPE 65 #undef MAP_TYPE
65 66
66 #include "v8.h" 67 #include "v8.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 #endif 449 #endif
449 return munmap(base, size) == 0; 450 return munmap(base, size) == 0;
450 } 451 }
451 452
452 453
453 bool VirtualMemory::HasLazyCommits() { 454 bool VirtualMemory::HasLazyCommits() {
454 return true; 455 return true;
455 } 456 }
456 457
457 } } // namespace v8::internal 458 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-freebsd.cc ('k') | src/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698