OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 return ReferenceError("not_defined", name); | 448 return ReferenceError("not_defined", name); |
449 } | 449 } |
450 return TypeError("undefined_method", object, name); | 450 return TypeError("undefined_method", object, name); |
451 } | 451 } |
452 } | 452 } |
453 | 453 |
454 ASSERT(result != Heap::the_hole_value()); | 454 ASSERT(result != Heap::the_hole_value()); |
455 | 455 |
456 if (result->IsJSFunction()) { | 456 if (result->IsJSFunction()) { |
457 // Check if there is an optimized (builtin) version of the function. | 457 // Check if there is an optimized (builtin) version of the function. |
458 // Ignored this will degrade performance for Array.prototype.{push,pop}. | 458 // Ignored this will degrade performance for some Array functions. |
459 // Please note we only return the optimized function iff | 459 // Please note we only return the optimized function iff |
460 // the JSObject has FastElements. | 460 // the JSObject has FastElements. |
461 if (object->IsJSObject() && JSObject::cast(*object)->HasFastElements()) { | 461 if (object->IsJSObject() && JSObject::cast(*object)->HasFastElements()) { |
462 Object* opt = Top::LookupSpecialFunction(JSObject::cast(*object), | 462 Object* opt = Top::LookupSpecialFunction(JSObject::cast(*object), |
463 lookup.holder(), | 463 lookup.holder(), |
464 JSFunction::cast(result)); | 464 JSFunction::cast(result)); |
465 if (opt->IsJSFunction()) return opt; | 465 if (opt->IsJSFunction()) return opt; |
466 } | 466 } |
467 | 467 |
468 #ifdef ENABLE_DEBUGGER_SUPPORT | 468 #ifdef ENABLE_DEBUGGER_SUPPORT |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 #undef ADDR | 1395 #undef ADDR |
1396 }; | 1396 }; |
1397 | 1397 |
1398 | 1398 |
1399 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1399 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
1400 return IC_utilities[id]; | 1400 return IC_utilities[id]; |
1401 } | 1401 } |
1402 | 1402 |
1403 | 1403 |
1404 } } // namespace v8::internal | 1404 } } // namespace v8::internal |
OLD | NEW |