OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 return true; | 1658 return true; |
1659 } | 1659 } |
1660 | 1660 |
1661 | 1661 |
1662 Register StubCompiler::CheckPrototypes(JSObject* object, | 1662 Register StubCompiler::CheckPrototypes(JSObject* object, |
1663 Register object_reg, | 1663 Register object_reg, |
1664 JSObject* holder, | 1664 JSObject* holder, |
1665 Register holder_reg, | 1665 Register holder_reg, |
1666 Register scratch, | 1666 Register scratch, |
1667 String* name, | 1667 String* name, |
| 1668 int save_at_depth, |
1668 Label* miss) { | 1669 Label* miss) { |
| 1670 // TODO(<bug>): support object saving. |
| 1671 ASSERT(save_at_depth == kInvalidProtoDepth); |
| 1672 |
1669 // Check that the maps haven't changed. | 1673 // Check that the maps haven't changed. |
1670 Register result = | 1674 Register result = |
1671 __ CheckMaps(object, object_reg, holder, holder_reg, scratch, miss); | 1675 __ CheckMaps(object, object_reg, holder, holder_reg, scratch, miss); |
1672 | 1676 |
1673 // If we've skipped any global objects, it's not enough to verify | 1677 // If we've skipped any global objects, it's not enough to verify |
1674 // that their maps haven't changed. | 1678 // that their maps haven't changed. |
1675 while (object != holder) { | 1679 while (object != holder) { |
1676 if (object->IsGlobalObject()) { | 1680 if (object->IsGlobalObject()) { |
1677 GlobalObject* global = GlobalObject::cast(object); | 1681 GlobalObject* global = GlobalObject::cast(object); |
1678 Object* probe = global->EnsurePropertyCell(name); | 1682 Object* probe = global->EnsurePropertyCell(name); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 1869 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
1866 | 1870 |
1867 // Return the generated code. | 1871 // Return the generated code. |
1868 return GetCode(); | 1872 return GetCode(); |
1869 } | 1873 } |
1870 | 1874 |
1871 | 1875 |
1872 #undef __ | 1876 #undef __ |
1873 | 1877 |
1874 } } // namespace v8::internal | 1878 } } // namespace v8::internal |
OLD | NEW |