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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 index = Heap::code_stubs()->FindEntry(key); | 89 index = Heap::code_stubs()->FindEntry(key); |
90 } | 90 } |
91 ASSERT(index != NumberDictionary::kNotFound); | 91 ASSERT(index != NumberDictionary::kNotFound); |
92 | 92 |
93 return Handle<Code>(Code::cast(Heap::code_stubs()->ValueAt(index))); | 93 return Handle<Code>(Code::cast(Heap::code_stubs()->ValueAt(index))); |
94 } | 94 } |
95 | 95 |
96 | 96 |
97 const char* CodeStub::MajorName(CodeStub::Major major_key) { | 97 const char* CodeStub::MajorName(CodeStub::Major major_key) { |
98 switch (major_key) { | 98 switch (major_key) { |
99 case CallFunction: | 99 #define DEF_CASE(name) case name: return #name; |
100 return "CallFunction"; | 100 CODE_STUB_LIST_ALL(DEF_CASE) |
101 case GenericBinaryOp: | 101 #undef DEF_CASE |
102 return "GenericBinaryOp"; | |
103 case SmiOp: | |
104 return "SmiOp"; | |
105 case Compare: | |
106 return "Compare"; | |
107 case RecordWrite: | |
108 return "RecordWrite"; | |
109 case StackCheck: | |
110 return "StackCheck"; | |
111 case UnarySub: | |
112 return "UnarySub"; | |
113 case RevertToNumber: | |
114 return "RevertToNumber"; | |
115 case ToBoolean: | |
116 return "ToBoolean"; | |
117 case Instanceof: | |
118 return "Instanceof"; | |
119 case CounterOp: | |
120 return "CounterOp"; | |
121 case ArgumentsAccess: | |
122 return "ArgumentsAccess"; | |
123 case Runtime: | |
124 return "Runtime"; | |
125 case CEntry: | |
126 return "CEntry"; | |
127 case JSEntry: | |
128 return "JSEntry"; | |
129 case GetProperty: | |
130 return "GetProperty"; | |
131 case SetProperty: | |
132 return "SetProperty"; | |
133 case InvokeBuiltin: | |
134 return "InvokeBuiltin"; | |
135 case ConvertToDouble: | |
136 return "ConvertToDouble"; | |
137 case WriteInt32ToHeapNumber: | |
138 return "WriteInt32ToHeapNumber"; | |
139 default: | 102 default: |
140 UNREACHABLE(); | 103 UNREACHABLE(); |
141 return NULL; | 104 return NULL; |
142 } | 105 } |
143 } | 106 } |
144 | 107 |
145 | 108 |
146 } } // namespace v8::internal | 109 } } // namespace v8::internal |
OLD | NEW |