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 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 | 1642 |
1643 Handle<Code> StoreIC::ComputeStoreHandler(LookupResult* lookup, | 1643 Handle<Code> StoreIC::ComputeStoreHandler(LookupResult* lookup, |
1644 Handle<JSObject> receiver, | 1644 Handle<JSObject> receiver, |
1645 Handle<String> name, | 1645 Handle<String> name, |
1646 Handle<Object> value) { | 1646 Handle<Object> value) { |
1647 Handle<Code> code = isolate()->stub_cache()->FindHandler( | 1647 Handle<Code> code = isolate()->stub_cache()->FindHandler( |
1648 name, receiver, kind(), strict_mode()); | 1648 name, receiver, kind(), strict_mode()); |
1649 if (!code.is_null()) return code; | 1649 if (!code.is_null()) return code; |
1650 | 1650 |
1651 code = CompileStoreHandler(lookup, receiver, name, value); | 1651 code = CompileStoreHandler(lookup, receiver, name, value); |
1652 if (code.is_null()) return generic_stub(); | 1652 if (code.is_null()) return slow_stub(); |
1653 | 1653 |
1654 if (code->is_handler() && code->type() != Code::NORMAL) { | 1654 if (code->is_handler() && code->type() != Code::NORMAL) { |
1655 HeapObject::UpdateMapCodeCache(receiver, name, code); | 1655 HeapObject::UpdateMapCodeCache(receiver, name, code); |
1656 } | 1656 } |
1657 | 1657 |
1658 return code; | 1658 return code; |
1659 } | 1659 } |
1660 | 1660 |
1661 | 1661 |
1662 Handle<Code> StoreIC::CompileStoreHandler(LookupResult* lookup, | 1662 Handle<Code> StoreIC::CompileStoreHandler(LookupResult* lookup, |
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2819 #undef ADDR | 2819 #undef ADDR |
2820 }; | 2820 }; |
2821 | 2821 |
2822 | 2822 |
2823 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2823 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2824 return IC_utilities[id]; | 2824 return IC_utilities[id]; |
2825 } | 2825 } |
2826 | 2826 |
2827 | 2827 |
2828 } } // namespace v8::internal | 2828 } } // namespace v8::internal |
OLD | NEW |