OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5989 instr = BuildMonomorphicElementAccess( | 5989 instr = BuildMonomorphicElementAccess( |
5990 obj, key, val, NULL, map, is_store, expr->GetStoreMode()); | 5990 obj, key, val, NULL, map, is_store, expr->GetStoreMode()); |
5991 } | 5991 } |
5992 } else if (expr->GetReceiverTypes() != NULL && | 5992 } else if (expr->GetReceiverTypes() != NULL && |
5993 !expr->GetReceiverTypes()->is_empty()) { | 5993 !expr->GetReceiverTypes()->is_empty()) { |
5994 return HandlePolymorphicElementAccess( | 5994 return HandlePolymorphicElementAccess( |
5995 obj, key, val, expr, ast_id, position, is_store, | 5995 obj, key, val, expr, ast_id, position, is_store, |
5996 expr->GetStoreMode(), has_side_effects); | 5996 expr->GetStoreMode(), has_side_effects); |
5997 } else { | 5997 } else { |
5998 if (is_store) { | 5998 if (is_store) { |
| 5999 if (expr->IsAssignment() && expr->AsAssignment()->IsUninitialized()) { |
| 6000 AddSoftDeoptimize(); |
| 6001 } |
5999 instr = BuildStoreKeyedGeneric(obj, key, val); | 6002 instr = BuildStoreKeyedGeneric(obj, key, val); |
6000 } else { | 6003 } else { |
| 6004 if (expr->AsProperty()->IsUninitialized()) { |
| 6005 AddSoftDeoptimize(); |
| 6006 } |
6001 instr = BuildLoadKeyedGeneric(obj, key); | 6007 instr = BuildLoadKeyedGeneric(obj, key); |
6002 } | 6008 } |
6003 AddInstruction(instr); | 6009 AddInstruction(instr); |
6004 } | 6010 } |
6005 if (position != RelocInfo::kNoPosition) instr->set_position(position); | 6011 if (position != RelocInfo::kNoPosition) instr->set_position(position); |
6006 *has_side_effects = instr->HasObservableSideEffects(); | 6012 *has_side_effects = instr->HasObservableSideEffects(); |
6007 return instr; | 6013 return instr; |
6008 } | 6014 } |
6009 | 6015 |
6010 | 6016 |
(...skipping 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10114 if (ShouldProduceTraceOutput()) { | 10120 if (ShouldProduceTraceOutput()) { |
10115 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 10121 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
10116 } | 10122 } |
10117 | 10123 |
10118 #ifdef DEBUG | 10124 #ifdef DEBUG |
10119 graph_->Verify(false); // No full verify. | 10125 graph_->Verify(false); // No full verify. |
10120 #endif | 10126 #endif |
10121 } | 10127 } |
10122 | 10128 |
10123 } } // namespace v8::internal | 10129 } } // namespace v8::internal |
OLD | NEW |