OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 4633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4645 | 4645 |
4646 void HGraphBuilder::AddCheckConstantFunction(Call* expr, | 4646 void HGraphBuilder::AddCheckConstantFunction(Call* expr, |
4647 HValue* receiver, | 4647 HValue* receiver, |
4648 Handle<Map> receiver_map, | 4648 Handle<Map> receiver_map, |
4649 bool smi_and_map_check) { | 4649 bool smi_and_map_check) { |
4650 // Constant functions have the nice property that the map will change if they | 4650 // Constant functions have the nice property that the map will change if they |
4651 // are overwritten. Therefore it is enough to check the map of the holder and | 4651 // are overwritten. Therefore it is enough to check the map of the holder and |
4652 // its prototypes. | 4652 // its prototypes. |
4653 if (smi_and_map_check) { | 4653 if (smi_and_map_check) { |
4654 AddInstruction(new(zone()) HCheckNonSmi(receiver)); | 4654 AddInstruction(new(zone()) HCheckNonSmi(receiver)); |
4655 AddInstruction(new(zone()) HCheckMap(receiver, receiver_map, | 4655 AddInstruction(new(zone()) HCheckMap(receiver, receiver_map)); |
4656 NULL, ALLOW_ELEMENT_TRANSITION_MAPS)); | |
4657 } | 4656 } |
4658 if (!expr->holder().is_null()) { | 4657 if (!expr->holder().is_null()) { |
4659 AddInstruction(new(zone()) HCheckPrototypeMaps( | 4658 AddInstruction(new(zone()) HCheckPrototypeMaps( |
4660 Handle<JSObject>(JSObject::cast(receiver_map->prototype())), | 4659 Handle<JSObject>(JSObject::cast(receiver_map->prototype())), |
4661 expr->holder())); | 4660 expr->holder())); |
4662 } | 4661 } |
4663 } | 4662 } |
4664 | 4663 |
4665 | 4664 |
4666 void HGraphBuilder::HandlePolymorphicCallNamed(Call* expr, | 4665 void HGraphBuilder::HandlePolymorphicCallNamed(Call* expr, |
(...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7312 } | 7311 } |
7313 } | 7312 } |
7314 | 7313 |
7315 #ifdef DEBUG | 7314 #ifdef DEBUG |
7316 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7315 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
7317 if (allocator_ != NULL) allocator_->Verify(); | 7316 if (allocator_ != NULL) allocator_->Verify(); |
7318 #endif | 7317 #endif |
7319 } | 7318 } |
7320 | 7319 |
7321 } } // namespace v8::internal | 7320 } } // namespace v8::internal |
OLD | NEW |