| 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 552 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 563     // Go up the prototype chain, recording where we are currently. | 563     // Go up the prototype chain, recording where we are currently. | 
| 564     holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); | 564     holder_ = Handle<JSObject>(JSObject::cast(type->prototype())); | 
| 565     type = Handle<Map>(holder()->map()); | 565     type = Handle<Map>(holder()->map()); | 
| 566   } | 566   } | 
| 567 } | 567 } | 
| 568 | 568 | 
| 569 | 569 | 
| 570 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global, | 570 bool Call::ComputeGlobalTarget(Handle<GlobalObject> global, | 
| 571                                LookupResult* lookup) { | 571                                LookupResult* lookup) { | 
| 572   target_ = Handle<JSFunction>::null(); | 572   target_ = Handle<JSFunction>::null(); | 
| 573   cell_ = Handle<JSGlobalPropertyCell>::null(); | 573   cell_ = Handle<Cell>::null(); | 
| 574   ASSERT(lookup->IsFound() && | 574   ASSERT(lookup->IsFound() && | 
| 575          lookup->type() == NORMAL && | 575          lookup->type() == NORMAL && | 
| 576          lookup->holder() == *global); | 576          lookup->holder() == *global); | 
| 577   cell_ = Handle<JSGlobalPropertyCell>(global->GetPropertyCell(lookup)); | 577   cell_ = Handle<Cell>(global->GetPropertyCell(lookup)); | 
| 578   if (cell_->value()->IsJSFunction()) { | 578   if (cell_->value()->IsJSFunction()) { | 
| 579     Handle<JSFunction> candidate(JSFunction::cast(cell_->value())); | 579     Handle<JSFunction> candidate(JSFunction::cast(cell_->value())); | 
| 580     // If the function is in new space we assume it's more likely to | 580     // If the function is in new space we assume it's more likely to | 
| 581     // change and thus prefer the general IC code. | 581     // change and thus prefer the general IC code. | 
| 582     if (!HEAP->InNewSpace(*candidate)) { | 582     if (!HEAP->InNewSpace(*candidate)) { | 
| 583       target_ = candidate; | 583       target_ = candidate; | 
| 584       return true; | 584       return true; | 
| 585     } | 585     } | 
| 586   } | 586   } | 
| 587   return false; | 587   return false; | 
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1193     OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 1193     OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); | 
| 1194     str = arr; | 1194     str = arr; | 
| 1195   } else { | 1195   } else { | 
| 1196     str = DoubleToCString(handle_->Number(), buffer); | 1196     str = DoubleToCString(handle_->Number(), buffer); | 
| 1197   } | 1197   } | 
| 1198   return factory->NewStringFromAscii(CStrVector(str)); | 1198   return factory->NewStringFromAscii(CStrVector(str)); | 
| 1199 } | 1199 } | 
| 1200 | 1200 | 
| 1201 | 1201 | 
| 1202 } }  // namespace v8::internal | 1202 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|