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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 // Eliminate the load. Reuse previously stored value or load instruction. | 207 // Eliminate the load. Reuse previously stored value or load instruction. |
208 return approx->last_value_; | 208 return approx->last_value_; |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 // Process a store instruction, updating internal table state. If a previous | 212 // Process a store instruction, updating internal table state. If a previous |
213 // store to the same object and field makes this store redundant (e.g. because | 213 // store to the same object and field makes this store redundant (e.g. because |
214 // the stored values are the same), return NULL indicating that this store | 214 // the stored values are the same), return NULL indicating that this store |
215 // instruction is redundant. Otherwise, return {instr}. | 215 // instruction is redundant. Otherwise, return {instr}. |
216 HValue* store(HStoreNamedField* instr) { | 216 HValue* store(HStoreNamedField* instr) { |
217 if (instr->store_mode() == PREINITIALIZING_STORE) { | 217 if (!instr->access().existing_inobject_property()) { |
218 TRACE((" skipping preinitializing store\n")); | 218 TRACE((" skipping non existing property initialization store\n")); |
219 return instr; | 219 return instr; |
220 } | 220 } |
221 | 221 |
222 int field = FieldOf(instr->access()); | 222 int field = FieldOf(instr->access()); |
223 if (field < 0) return KillIfMisaligned(instr); | 223 if (field < 0) return KillIfMisaligned(instr); |
224 | 224 |
225 HValue* object = instr->object()->ActualValue(); | 225 HValue* object = instr->object()->ActualValue(); |
226 HValue* value = instr->value(); | 226 HValue* value = instr->value(); |
227 | 227 |
228 if (instr->has_transition()) { | 228 if (instr->has_transition()) { |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 } else { | 508 } else { |
509 // Perform only local analysis. | 509 // Perform only local analysis. |
510 for (int i = 0; i < graph()->blocks()->length(); i++) { | 510 for (int i = 0; i < graph()->blocks()->length(); i++) { |
511 table->Kill(); | 511 table->Kill(); |
512 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); | 512 engine.AnalyzeOneBlock(graph()->blocks()->at(i), table); |
513 } | 513 } |
514 } | 514 } |
515 } | 515 } |
516 | 516 |
517 } } // namespace v8::internal | 517 } } // namespace v8::internal |
OLD | NEW |