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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 } | 435 } |
436 | 436 |
437 | 437 |
438 void IC::RegisterWeakMapDependency(Handle<Code> stub) { | 438 void IC::RegisterWeakMapDependency(Handle<Code> stub) { |
439 if (FLAG_collect_maps && FLAG_weak_embedded_maps_in_ic && | 439 if (FLAG_collect_maps && FLAG_weak_embedded_maps_in_ic && |
440 stub->CanBeWeakStub()) { | 440 stub->CanBeWeakStub()) { |
441 ASSERT(!stub->is_weak_stub()); | 441 ASSERT(!stub->is_weak_stub()); |
442 MapHandleList maps; | 442 MapHandleList maps; |
443 stub->FindAllMaps(&maps); | 443 stub->FindAllMaps(&maps); |
444 if (maps.length() == 1 && stub->IsWeakObjectInIC(*maps.at(0))) { | 444 if (maps.length() == 1 && stub->IsWeakObjectInIC(*maps.at(0))) { |
445 maps.at(0)->AddDependentIC(stub); | 445 Map::AddDependentIC(maps.at(0), stub); |
446 stub->mark_as_weak_stub(); | 446 stub->mark_as_weak_stub(); |
447 if (FLAG_enable_ool_constant_pool) { | 447 if (FLAG_enable_ool_constant_pool) { |
448 stub->constant_pool()->set_weak_object_state( | 448 stub->constant_pool()->set_weak_object_state( |
449 ConstantPoolArray::WEAK_OBJECTS_IN_IC); | 449 ConstantPoolArray::WEAK_OBJECTS_IN_IC); |
450 } | 450 } |
451 } | 451 } |
452 } | 452 } |
453 } | 453 } |
454 | 454 |
455 | 455 |
(...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2946 #undef ADDR | 2946 #undef ADDR |
2947 }; | 2947 }; |
2948 | 2948 |
2949 | 2949 |
2950 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2950 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2951 return IC_utilities[id]; | 2951 return IC_utilities[id]; |
2952 } | 2952 } |
2953 | 2953 |
2954 | 2954 |
2955 } } // namespace v8::internal | 2955 } } // namespace v8::internal |
OLD | NEW |