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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 } | 1590 } |
1591 | 1591 |
1592 | 1592 |
1593 Handle<Code> CallStubCompiler::CompileArrayPushCall( | 1593 Handle<Code> CallStubCompiler::CompileArrayPushCall( |
1594 Handle<Object> object, | 1594 Handle<Object> object, |
1595 Handle<JSObject> holder, | 1595 Handle<JSObject> holder, |
1596 Handle<Cell> cell, | 1596 Handle<Cell> cell, |
1597 Handle<JSFunction> function, | 1597 Handle<JSFunction> function, |
1598 Handle<String> name, | 1598 Handle<String> name, |
1599 Code::StubType type) { | 1599 Code::StubType type) { |
1600 // If object is not an array or is observed, bail out to regular call. | 1600 // If object is not an array or is observed or sealed, bail out to regular |
| 1601 // call. |
1601 if (!object->IsJSArray() || | 1602 if (!object->IsJSArray() || |
1602 !cell.is_null() || | 1603 !cell.is_null() || |
1603 Handle<JSArray>::cast(object)->map()->is_observed()) { | 1604 Handle<JSArray>::cast(object)->map()->is_observed() || |
| 1605 !Handle<JSArray>::cast(object)->map()->is_extensible()) { |
1604 return Handle<Code>::null(); | 1606 return Handle<Code>::null(); |
1605 } | 1607 } |
1606 | 1608 |
1607 Label miss; | 1609 Label miss; |
1608 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); | 1610 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); |
1609 Register receiver = a0; | 1611 Register receiver = a0; |
1610 Register scratch = a1; | 1612 Register scratch = a1; |
1611 | 1613 |
1612 const int argc = arguments().immediate(); | 1614 const int argc = arguments().immediate(); |
1613 | 1615 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 } | 1834 } |
1833 | 1835 |
1834 | 1836 |
1835 Handle<Code> CallStubCompiler::CompileArrayPopCall( | 1837 Handle<Code> CallStubCompiler::CompileArrayPopCall( |
1836 Handle<Object> object, | 1838 Handle<Object> object, |
1837 Handle<JSObject> holder, | 1839 Handle<JSObject> holder, |
1838 Handle<Cell> cell, | 1840 Handle<Cell> cell, |
1839 Handle<JSFunction> function, | 1841 Handle<JSFunction> function, |
1840 Handle<String> name, | 1842 Handle<String> name, |
1841 Code::StubType type) { | 1843 Code::StubType type) { |
1842 // If object is not an array or is observed, bail out to regular call. | 1844 // If object is not an array or is observed or sealed, bail out to regular |
| 1845 // call. |
1843 if (!object->IsJSArray() || | 1846 if (!object->IsJSArray() || |
1844 !cell.is_null() || | 1847 !cell.is_null() || |
1845 Handle<JSArray>::cast(object)->map()->is_observed()) { | 1848 Handle<JSArray>::cast(object)->map()->is_observed() || |
| 1849 !Handle<JSArray>::cast(object)->map()->is_extensible()) { |
1846 return Handle<Code>::null(); | 1850 return Handle<Code>::null(); |
1847 } | 1851 } |
1848 | 1852 |
1849 Label miss, return_undefined, call_builtin; | 1853 Label miss, return_undefined, call_builtin; |
1850 Register receiver = a0; | 1854 Register receiver = a0; |
1851 Register scratch = a1; | 1855 Register scratch = a1; |
1852 Register elements = a3; | 1856 Register elements = a3; |
1853 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); | 1857 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); |
1854 | 1858 |
1855 // Get the elements array of the object. | 1859 // Get the elements array of the object. |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2882 // ----------------------------------- | 2886 // ----------------------------------- |
2883 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2887 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
2884 } | 2888 } |
2885 | 2889 |
2886 | 2890 |
2887 #undef __ | 2891 #undef __ |
2888 | 2892 |
2889 } } // namespace v8::internal | 2893 } } // namespace v8::internal |
2890 | 2894 |
2891 #endif // V8_TARGET_ARCH_MIPS | 2895 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |