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 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1633 } | 1633 } |
1634 | 1634 |
1635 | 1635 |
1636 Handle<Code> CallStubCompiler::CompileArrayPushCall( | 1636 Handle<Code> CallStubCompiler::CompileArrayPushCall( |
1637 Handle<Object> object, | 1637 Handle<Object> object, |
1638 Handle<JSObject> holder, | 1638 Handle<JSObject> holder, |
1639 Handle<Cell> cell, | 1639 Handle<Cell> cell, |
1640 Handle<JSFunction> function, | 1640 Handle<JSFunction> function, |
1641 Handle<String> name, | 1641 Handle<String> name, |
1642 Code::StubType type) { | 1642 Code::StubType type) { |
1643 // If object is not an array or is observed, bail out to regular call. | 1643 // If object is not an array or is observed or sealed, bail out to regular |
| 1644 // call. |
1644 if (!object->IsJSArray() || | 1645 if (!object->IsJSArray() || |
1645 !cell.is_null() || | 1646 !cell.is_null() || |
1646 Handle<JSArray>::cast(object)->map()->is_observed()) { | 1647 Handle<JSArray>::cast(object)->map()->is_observed() || |
| 1648 !Handle<JSArray>::cast(object)->map()->is_extensible()) { |
1647 return Handle<Code>::null(); | 1649 return Handle<Code>::null(); |
1648 } | 1650 } |
1649 | 1651 |
1650 Label miss; | 1652 Label miss; |
1651 | 1653 |
1652 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); | 1654 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); |
1653 Register receiver = r0; | 1655 Register receiver = r0; |
1654 Register scratch = r1; | 1656 Register scratch = r1; |
1655 | 1657 |
1656 const int argc = arguments().immediate(); | 1658 const int argc = arguments().immediate(); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 } | 1878 } |
1877 | 1879 |
1878 | 1880 |
1879 Handle<Code> CallStubCompiler::CompileArrayPopCall( | 1881 Handle<Code> CallStubCompiler::CompileArrayPopCall( |
1880 Handle<Object> object, | 1882 Handle<Object> object, |
1881 Handle<JSObject> holder, | 1883 Handle<JSObject> holder, |
1882 Handle<Cell> cell, | 1884 Handle<Cell> cell, |
1883 Handle<JSFunction> function, | 1885 Handle<JSFunction> function, |
1884 Handle<String> name, | 1886 Handle<String> name, |
1885 Code::StubType type) { | 1887 Code::StubType type) { |
1886 // If object is not an array or is observed, bail out to regular call. | 1888 // If object is not an array or is observed or sealed, bail out to regular |
| 1889 // call. |
1887 if (!object->IsJSArray() || | 1890 if (!object->IsJSArray() || |
1888 !cell.is_null() || | 1891 !cell.is_null() || |
1889 Handle<JSArray>::cast(object)->map()->is_observed()) { | 1892 Handle<JSArray>::cast(object)->map()->is_observed() || |
| 1893 !Handle<JSArray>::cast(object)->map()->is_extensible()) { |
1890 return Handle<Code>::null(); | 1894 return Handle<Code>::null(); |
1891 } | 1895 } |
1892 | 1896 |
1893 Label miss, return_undefined, call_builtin; | 1897 Label miss, return_undefined, call_builtin; |
1894 Register receiver = r0; | 1898 Register receiver = r0; |
1895 Register scratch = r1; | 1899 Register scratch = r1; |
1896 Register elements = r3; | 1900 Register elements = r3; |
1897 | 1901 |
1898 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); | 1902 HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); |
1899 | 1903 |
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2962 // ----------------------------------- | 2966 // ----------------------------------- |
2963 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 2967 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
2964 } | 2968 } |
2965 | 2969 |
2966 | 2970 |
2967 #undef __ | 2971 #undef __ |
2968 | 2972 |
2969 } } // namespace v8::internal | 2973 } } // namespace v8::internal |
2970 | 2974 |
2971 #endif // V8_TARGET_ARCH_ARM | 2975 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |