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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type)); | 500 Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type)); |
501 return true; | 501 return true; |
502 case NORMAL: | 502 case NORMAL: |
503 case FIELD: | 503 case FIELD: |
504 case CALLBACKS: | 504 case CALLBACKS: |
505 case HANDLER: | 505 case HANDLER: |
506 case INTERCEPTOR: | 506 case INTERCEPTOR: |
507 // We don't know the target. | 507 // We don't know the target. |
508 return false; | 508 return false; |
509 case MAP_TRANSITION: | 509 case MAP_TRANSITION: |
510 case ELEMENTS_TRANSITION: | |
511 case CONSTANT_TRANSITION: | 510 case CONSTANT_TRANSITION: |
512 case NULL_DESCRIPTOR: | 511 case NULL_DESCRIPTOR: |
513 // Perhaps something interesting is up in the prototype chain... | 512 // Perhaps something interesting is up in the prototype chain... |
514 break; | 513 break; |
515 } | 514 } |
516 } | 515 } |
517 // If we reach the end of the prototype chain, we don't know the target. | 516 // If we reach the end of the prototype chain, we don't know the target. |
518 if (!type->prototype()->IsJSObject()) return false; | 517 if (!type->prototype()->IsJSObject()) return false; |
519 // Go up the prototype chain, recording where we are currently. | 518 // Go up the prototype chain, recording where we are currently. |
520 holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); | 519 holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1103 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); |
1105 str = arr; | 1104 str = arr; |
1106 } else { | 1105 } else { |
1107 str = DoubleToCString(handle_->Number(), buffer); | 1106 str = DoubleToCString(handle_->Number(), buffer); |
1108 } | 1107 } |
1109 return FACTORY->NewStringFromAscii(CStrVector(str)); | 1108 return FACTORY->NewStringFromAscii(CStrVector(str)); |
1110 } | 1109 } |
1111 | 1110 |
1112 | 1111 |
1113 } } // namespace v8::internal | 1112 } } // namespace v8::internal |
OLD | NEW |