OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 18 matching lines...) Expand all Loading... |
29 // the code less dependent on differences between different processor | 29 // the code less dependent on differences between different processor |
30 // architecture. | 30 // architecture. |
31 // The classes have the same definition for all architectures. The | 31 // The classes have the same definition for all architectures. The |
32 // implementation for a particular architecture is put in cpu_<arch>.cc. | 32 // implementation for a particular architecture is put in cpu_<arch>.cc. |
33 // The build system then uses the implementation for the target architecture. | 33 // The build system then uses the implementation for the target architecture. |
34 // | 34 // |
35 | 35 |
36 #ifndef V8_CPU_H_ | 36 #ifndef V8_CPU_H_ |
37 #define V8_CPU_H_ | 37 #define V8_CPU_H_ |
38 | 38 |
| 39 #include "allocation.h" |
| 40 |
39 namespace v8 { | 41 namespace v8 { |
40 namespace internal { | 42 namespace internal { |
41 | 43 |
42 // ---------------------------------------------------------------------------- | 44 // ---------------------------------------------------------------------------- |
43 // CPU | 45 // CPU |
44 // | 46 // |
45 // This class has static methods for the architecture specific functions. Add | 47 // This class has static methods for the architecture specific functions. Add |
46 // methods here to cope with differences between the supported architectures. | 48 // methods here to cope with differences between the supported architectures. |
47 // | 49 // |
48 // For each architecture the file cpu_<arch>.cc contains the implementation of | 50 // For each architecture the file cpu_<arch>.cc contains the implementation of |
49 // these functions. | 51 // these functions. |
50 | 52 |
51 class CPU : public AllStatic { | 53 class CPU : public AllStatic { |
52 public: | 54 public: |
53 // Initializes the cpu architecture support. Called once at VM startup. | 55 // Initializes the cpu architecture support. Called once at VM startup. |
54 static void Setup(); | 56 static void Setup(); |
55 | 57 |
56 static bool SupportsCrankshaft(); | 58 static bool SupportsCrankshaft(); |
57 | 59 |
58 // Flush instruction cache. | 60 // Flush instruction cache. |
59 static void FlushICache(void* start, size_t size); | 61 static void FlushICache(void* start, size_t size); |
60 | 62 |
61 // Try to activate a system level debugger. | 63 // Try to activate a system level debugger. |
62 static void DebugBreak(); | 64 static void DebugBreak(); |
63 }; | 65 }; |
64 | 66 |
65 } } // namespace v8::internal | 67 } } // namespace v8::internal |
66 | 68 |
67 #endif // V8_CPU_H_ | 69 #endif // V8_CPU_H_ |
OLD | NEW |