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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 break; | 190 break; |
191 case CompareIC::OBJECTS: | 191 case CompareIC::OBJECTS: |
192 GenerateObjects(masm); | 192 GenerateObjects(masm); |
193 break; | 193 break; |
194 default: | 194 default: |
195 UNREACHABLE(); | 195 UNREACHABLE(); |
196 } | 196 } |
197 } | 197 } |
198 | 198 |
199 | 199 |
| 200 const char* InstanceofStub::GetName() { |
| 201 if (name_ != NULL) return name_; |
| 202 const int kMaxNameLength = 100; |
| 203 name_ = Bootstrapper::AllocateAutoDeletedArray(kMaxNameLength); |
| 204 if (name_ == NULL) return "OOM"; |
| 205 |
| 206 const char* args = ""; |
| 207 if (HasArgsInRegisters()) { |
| 208 args = "_REGS"; |
| 209 } |
| 210 |
| 211 const char* inline_check = ""; |
| 212 if (HasCallSiteInlineCheck()) { |
| 213 inline_check = "_INLINE"; |
| 214 } |
| 215 |
| 216 const char* return_true_false_object = ""; |
| 217 if (ReturnTrueFalseObject()) { |
| 218 return_true_false_object = "_TRUEFALSE"; |
| 219 } |
| 220 |
| 221 OS::SNPrintF(Vector<char>(name_, kMaxNameLength), |
| 222 "InstanceofStub%s%s%s", |
| 223 args, |
| 224 inline_check, |
| 225 return_true_false_object); |
| 226 return name_; |
| 227 } |
| 228 |
| 229 |
200 } } // namespace v8::internal | 230 } } // namespace v8::internal |
OLD | NEW |