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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 if (index < 0) { | 602 if (index < 0) { |
603 // Index is an offset from the end of the object. | 603 // Index is an offset from the end of the object. |
604 int offset = map->instance_size() + (index * kPointerSize); | 604 int offset = map->instance_size() + (index * kPointerSize); |
605 if (PatchInlinedLoad(address(), map, offset)) { | 605 if (PatchInlinedLoad(address(), map, offset)) { |
606 set_target(megamorphic_stub()); | 606 set_target(megamorphic_stub()); |
607 return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex()); | 607 return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex()); |
608 } | 608 } |
609 } | 609 } |
610 } | 610 } |
611 | 611 |
612 // TODO(X64): Enable inline cache for load. | |
613 #ifndef V8_TARGET_ARCH_X64 | |
614 // Update inline cache and stub cache. | 612 // Update inline cache and stub cache. |
615 if (FLAG_use_ic && lookup.IsLoaded()) { | 613 if (FLAG_use_ic && lookup.IsLoaded()) { |
616 UpdateCaches(&lookup, state, object, name); | 614 UpdateCaches(&lookup, state, object, name); |
617 } | 615 } |
618 #endif | |
619 | 616 |
620 PropertyAttributes attr; | 617 PropertyAttributes attr; |
621 if (lookup.IsValid() && lookup.type() == INTERCEPTOR) { | 618 if (lookup.IsValid() && lookup.type() == INTERCEPTOR) { |
622 // Get the property. | 619 // Get the property. |
623 Object* result = object->GetProperty(*object, &lookup, *name, &attr); | 620 Object* result = object->GetProperty(*object, &lookup, *name, &attr); |
624 if (result->IsFailure()) return result; | 621 if (result->IsFailure()) return result; |
625 // If the property is not present, check if we need to throw an | 622 // If the property is not present, check if we need to throw an |
626 // exception. | 623 // exception. |
627 if (attr == ABSENT && is_contextual()) { | 624 if (attr == ABSENT && is_contextual()) { |
628 return ReferenceError("not_defined", name); | 625 return ReferenceError("not_defined", name); |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 #undef ADDR | 1374 #undef ADDR |
1378 }; | 1375 }; |
1379 | 1376 |
1380 | 1377 |
1381 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1378 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
1382 return IC_utilities[id]; | 1379 return IC_utilities[id]; |
1383 } | 1380 } |
1384 | 1381 |
1385 | 1382 |
1386 } } // namespace v8::internal | 1383 } } // namespace v8::internal |
OLD | NEW |