OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 return true; | 513 return true; |
514 case NORMAL: | 514 case NORMAL: |
515 case FIELD: | 515 case FIELD: |
516 case CALLBACKS: | 516 case CALLBACKS: |
517 case HANDLER: | 517 case HANDLER: |
518 case INTERCEPTOR: | 518 case INTERCEPTOR: |
519 // We don't know the target. | 519 // We don't know the target. |
520 return false; | 520 return false; |
521 case MAP_TRANSITION: | 521 case MAP_TRANSITION: |
522 case CONSTANT_TRANSITION: | 522 case CONSTANT_TRANSITION: |
523 case NULL_DESCRIPTOR: | |
524 // Perhaps something interesting is up in the prototype chain... | 523 // Perhaps something interesting is up in the prototype chain... |
525 break; | 524 break; |
| 525 case NONEXISTENT: |
| 526 UNREACHABLE(); |
| 527 break; |
526 } | 528 } |
527 } | 529 } |
528 // If we reach the end of the prototype chain, we don't know the target. | 530 // If we reach the end of the prototype chain, we don't know the target. |
529 if (!type->prototype()->IsJSObject()) return false; | 531 if (!type->prototype()->IsJSObject()) return false; |
530 // Go up the prototype chain, recording where we are currently. | 532 // Go up the prototype chain, recording where we are currently. |
531 holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); | 533 holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); |
532 type = Handle<Map>(holder()->map()); | 534 type = Handle<Map>(holder()->map()); |
533 } | 535 } |
534 } | 536 } |
535 | 537 |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1118 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); |
1117 str = arr; | 1119 str = arr; |
1118 } else { | 1120 } else { |
1119 str = DoubleToCString(handle_->Number(), buffer); | 1121 str = DoubleToCString(handle_->Number(), buffer); |
1120 } | 1122 } |
1121 return FACTORY->NewStringFromAscii(CStrVector(str)); | 1123 return FACTORY->NewStringFromAscii(CStrVector(str)); |
1122 } | 1124 } |
1123 | 1125 |
1124 | 1126 |
1125 } } // namespace v8::internal | 1127 } } // namespace v8::internal |
OLD | NEW |