| 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 // Only allow 0 maps in case target() was reset to UNINITIALIZED by the GC. | 1015 // Only allow 0 maps in case target() was reset to UNINITIALIZED by the GC. |
| 1016 // In that case, allow the IC to go back monomorphic. | 1016 // In that case, allow the IC to go back monomorphic. |
| 1017 if (number_of_maps == 0 && target()->ic_state() != UNINITIALIZED) { | 1017 if (number_of_maps == 0 && target()->ic_state() != UNINITIALIZED) { |
| 1018 return false; | 1018 return false; |
| 1019 } | 1019 } |
| 1020 target()->FindAllCode(&handlers, receiver_maps.length()); | 1020 target()->FindAllCode(&handlers, receiver_maps.length()); |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 number_of_valid_maps++; | 1023 number_of_valid_maps++; |
| 1024 if (handler_to_overwrite >= 0) { | 1024 if (handler_to_overwrite >= 0) { |
| 1025 handlers.InsertAt(handler_to_overwrite, code); | 1025 handlers.Set(handler_to_overwrite, code); |
| 1026 } else { | 1026 } else { |
| 1027 receiver_maps.Add(new_receiver_map); | 1027 receiver_maps.Add(new_receiver_map); |
| 1028 handlers.Add(code); | 1028 handlers.Add(code); |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 Handle<Code> ic = isolate()->stub_cache()->ComputePolymorphicIC( | 1031 Handle<Code> ic = isolate()->stub_cache()->ComputePolymorphicIC( |
| 1032 &receiver_maps, &handlers, number_of_valid_maps, name); | 1032 &receiver_maps, &handlers, number_of_valid_maps, name); |
| 1033 set_target(*ic); | 1033 set_target(*ic); |
| 1034 return true; | 1034 return true; |
| 1035 } | 1035 } |
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2974 #undef ADDR | 2974 #undef ADDR |
| 2975 }; | 2975 }; |
| 2976 | 2976 |
| 2977 | 2977 |
| 2978 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2978 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2979 return IC_utilities[id]; | 2979 return IC_utilities[id]; |
| 2980 } | 2980 } |
| 2981 | 2981 |
| 2982 | 2982 |
| 2983 } } // namespace v8::internal | 2983 } } // namespace v8::internal |
| OLD | NEW |