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

Side by Side Diff: src/mips/frames-mips.h

Issue 8680013: Remove the static qualifier from functions in header files. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Restored static const references on ARM and MIPS. Created 9 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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
29 29
30 #ifndef V8_MIPS_FRAMES_MIPS_H_ 30 #ifndef V8_MIPS_FRAMES_MIPS_H_
31 #define V8_MIPS_FRAMES_MIPS_H_ 31 #define V8_MIPS_FRAMES_MIPS_H_
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36 // Register lists. 36 // Register lists.
37 // Note that the bit values must match those used in actual instruction 37 // Note that the bit values must match those used in actual instruction
38 // encoding. 38 // encoding.
39 static const int kNumRegs = 32; 39 const int kNumRegs = 32;
40 40
41 static const RegList kJSCallerSaved = 41 const RegList kJSCallerSaved =
42 1 << 2 | // v0 42 1 << 2 | // v0
43 1 << 3 | // v1 43 1 << 3 | // v1
44 1 << 4 | // a0 44 1 << 4 | // a0
45 1 << 5 | // a1 45 1 << 5 | // a1
46 1 << 6 | // a2 46 1 << 6 | // a2
47 1 << 7 | // a3 47 1 << 7 | // a3
48 1 << 8 | // t0 48 1 << 8 | // t0
49 1 << 9 | // t1 49 1 << 9 | // t1
50 1 << 10 | // t2 50 1 << 10 | // t2
51 1 << 11 | // t3 51 1 << 11 | // t3
52 1 << 12 | // t4 52 1 << 12 | // t4
53 1 << 13 | // t5 53 1 << 13 | // t5
54 1 << 14 | // t6 54 1 << 14 | // t6
55 1 << 15; // t7 55 1 << 15; // t7
56 56
57 static const int kNumJSCallerSaved = 14; 57 const int kNumJSCallerSaved = 14;
58 58
59 59
60 // Return the code of the n-th caller-saved register available to JavaScript 60 // Return the code of the n-th caller-saved register available to JavaScript
61 // e.g. JSCallerSavedReg(0) returns a0.code() == 4. 61 // e.g. JSCallerSavedReg(0) returns a0.code() == 4.
62 int JSCallerSavedCode(int n); 62 int JSCallerSavedCode(int n);
63 63
64 64
65 // Callee-saved registers preserved when switching from C to JavaScript. 65 // Callee-saved registers preserved when switching from C to JavaScript.
66 static const RegList kCalleeSaved = 66 const RegList kCalleeSaved =
67 1 << 16 | // s0 67 1 << 16 | // s0
68 1 << 17 | // s1 68 1 << 17 | // s1
69 1 << 18 | // s2 69 1 << 18 | // s2
70 1 << 19 | // s3 70 1 << 19 | // s3
71 1 << 20 | // s4 71 1 << 20 | // s4
72 1 << 21 | // s5 72 1 << 21 | // s5
73 1 << 22 | // s6 (roots in Javascript code) 73 1 << 22 | // s6 (roots in Javascript code)
74 1 << 23 | // s7 (cp in Javascript code) 74 1 << 23 | // s7 (cp in Javascript code)
75 1 << 30; // fp/s8 75 1 << 30; // fp/s8
76 76
77 static const int kNumCalleeSaved = 9; 77 const int kNumCalleeSaved = 9;
78 78
79 static const RegList kCalleeSavedFPU = 79 const RegList kCalleeSavedFPU =
80 1 << 20 | // f20 80 1 << 20 | // f20
81 1 << 22 | // f22 81 1 << 22 | // f22
82 1 << 24 | // f24 82 1 << 24 | // f24
83 1 << 26 | // f26 83 1 << 26 | // f26
84 1 << 28 | // f28 84 1 << 28 | // f28
85 1 << 30; // f30 85 1 << 30; // f30
86 86
87 static const int kNumCalleeSavedFPU = 6; 87 const int kNumCalleeSavedFPU = 6;
88 88
89 static const RegList kCallerSavedFPU = 89 const RegList kCallerSavedFPU =
90 1 << 0 | // f0 90 1 << 0 | // f0
91 1 << 2 | // f2 91 1 << 2 | // f2
92 1 << 4 | // f4 92 1 << 4 | // f4
93 1 << 6 | // f6 93 1 << 6 | // f6
94 1 << 8 | // f8 94 1 << 8 | // f8
95 1 << 10 | // f10 95 1 << 10 | // f10
96 1 << 12 | // f12 96 1 << 12 | // f12
97 1 << 14 | // f14 97 1 << 14 | // f14
98 1 << 16 | // f16 98 1 << 16 | // f16
99 1 << 18; // f18 99 1 << 18; // f18
100 100
101 101
102 // Number of registers for which space is reserved in safepoints. Must be a 102 // Number of registers for which space is reserved in safepoints. Must be a
103 // multiple of 8. 103 // multiple of 8.
104 static const int kNumSafepointRegisters = 24; 104 const int kNumSafepointRegisters = 24;
105 105
106 // Define the list of registers actually saved at safepoints. 106 // Define the list of registers actually saved at safepoints.
107 // Note that the number of saved registers may be smaller than the reserved 107 // Note that the number of saved registers may be smaller than the reserved
108 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters. 108 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters.
109 static const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved; 109 const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved;
110 static const int kNumSafepointSavedRegisters = 110 const int kNumSafepointSavedRegisters =
111 kNumJSCallerSaved + kNumCalleeSaved; 111 kNumJSCallerSaved + kNumCalleeSaved;
112 112
113 typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved]; 113 typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
114 114
115 static const int kUndefIndex = -1; 115 const int kUndefIndex = -1;
116 // Map with indexes on stack that corresponds to codes of saved registers. 116 // Map with indexes on stack that corresponds to codes of saved registers.
117 static const int kSafepointRegisterStackIndexMap[kNumRegs] = { 117 const int kSafepointRegisterStackIndexMap[kNumRegs] = {
118 kUndefIndex, // zero_reg 118 kUndefIndex, // zero_reg
119 kUndefIndex, // at 119 kUndefIndex, // at
120 0, // v0 120 0, // v0
121 1, // v1 121 1, // v1
122 2, // a0 122 2, // a0
123 3, // a1 123 3, // a1
124 4, // a2 124 4, // a2
125 5, // a3 125 5, // a3
126 6, // t0 126 6, // t0
127 7, // t1 127 7, // t1
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 inline Object* JavaScriptFrame::function_slot_object() const { 242 inline Object* JavaScriptFrame::function_slot_object() const {
243 const int offset = JavaScriptFrameConstants::kFunctionOffset; 243 const int offset = JavaScriptFrameConstants::kFunctionOffset;
244 return Memory::Object_at(fp() + offset); 244 return Memory::Object_at(fp() + offset);
245 } 245 }
246 246
247 247
248 } } // namespace v8::internal 248 } } // namespace v8::internal
249 249
250 #endif 250 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698