OLD | NEW |
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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 if (!code->is_compare_ic_stub()) return unknown; | 353 if (!code->is_compare_ic_stub()) return unknown; |
354 | 354 |
355 CompareIC::State state = static_cast<CompareIC::State>(code->compare_state()); | 355 CompareIC::State state = static_cast<CompareIC::State>(code->compare_state()); |
356 switch (state) { | 356 switch (state) { |
357 case CompareIC::UNINITIALIZED: | 357 case CompareIC::UNINITIALIZED: |
358 // Uninitialized means never executed. | 358 // Uninitialized means never executed. |
359 // TODO(fschneider): Introduce a separate value for never-executed ICs. | 359 // TODO(fschneider): Introduce a separate value for never-executed ICs. |
360 return unknown; | 360 return unknown; |
361 case CompareIC::SMIS: | 361 case CompareIC::SMIS: |
362 return TypeInfo::Smi(); | 362 return TypeInfo::Smi(); |
| 363 case CompareIC::STRINGS: |
| 364 return TypeInfo::String(); |
| 365 case CompareIC::SYMBOLS: |
| 366 return TypeInfo::Symbol(); |
363 case CompareIC::HEAP_NUMBERS: | 367 case CompareIC::HEAP_NUMBERS: |
364 return TypeInfo::Number(); | 368 return TypeInfo::Number(); |
365 case CompareIC::OBJECTS: | 369 case CompareIC::OBJECTS: |
366 // TODO(kasperl): We really need a type for JS objects here. | 370 // TODO(kasperl): We really need a type for JS objects here. |
367 return TypeInfo::NonPrimitive(); | 371 return TypeInfo::NonPrimitive(); |
368 case CompareIC::GENERIC: | 372 case CompareIC::GENERIC: |
369 default: | 373 default: |
370 return unknown; | 374 return unknown; |
371 } | 375 } |
372 } | 376 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 USE(maybe_result); | 568 USE(maybe_result); |
565 #ifdef DEBUG | 569 #ifdef DEBUG |
566 Object* result = NULL; | 570 Object* result = NULL; |
567 // Dictionary has been allocated with sufficient size for all elements. | 571 // Dictionary has been allocated with sufficient size for all elements. |
568 ASSERT(maybe_result->ToObject(&result)); | 572 ASSERT(maybe_result->ToObject(&result)); |
569 ASSERT(*dictionary_ == result); | 573 ASSERT(*dictionary_ == result); |
570 #endif | 574 #endif |
571 } | 575 } |
572 | 576 |
573 } } // namespace v8::internal | 577 } } // namespace v8::internal |
OLD | NEW |