| 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 10078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10089 | 10089 |
| 10090 bool has_side_effects = false; | 10090 bool has_side_effects = false; |
| 10091 HValue* load = HandleKeyedElementAccess( | 10091 HValue* load = HandleKeyedElementAccess( |
| 10092 obj, key, NULL, prop, prop->LoadId(), RelocInfo::kNoPosition, | 10092 obj, key, NULL, prop, prop->LoadId(), RelocInfo::kNoPosition, |
| 10093 false, // is_store | 10093 false, // is_store |
| 10094 &has_side_effects); | 10094 &has_side_effects); |
| 10095 Push(load); | 10095 Push(load); |
| 10096 if (has_side_effects) AddSimulate(prop->LoadId(), REMOVABLE_SIMULATE); | 10096 if (has_side_effects) AddSimulate(prop->LoadId(), REMOVABLE_SIMULATE); |
| 10097 | 10097 |
| 10098 after = BuildIncrement(returns_original_input, expr); | 10098 after = BuildIncrement(returns_original_input, expr); |
| 10099 input = Pop(); | 10099 input = environment()->ExpressionStackAt(0); |
| 10100 | 10100 |
| 10101 expr->RecordTypeFeedback(oracle(), zone()); | 10101 expr->RecordTypeFeedback(oracle(), zone()); |
| 10102 HandleKeyedElementAccess(obj, key, after, expr, expr->AssignmentId(), | 10102 HandleKeyedElementAccess(obj, key, after, expr, expr->AssignmentId(), |
| 10103 RelocInfo::kNoPosition, | 10103 RelocInfo::kNoPosition, |
| 10104 true, // is_store | 10104 true, // is_store |
| 10105 &has_side_effects); | 10105 &has_side_effects); |
| 10106 | 10106 |
| 10107 // Drop the key from the bailout environment. Overwrite the receiver | 10107 // Drop the key and the original value from the bailout environment. |
| 10108 // with the result of the operation, and the placeholder with the | 10108 // Overwrite the receiver with the result of the operation, and the |
| 10109 // original value if necessary. | 10109 // placeholder with the original value if necessary. |
| 10110 Drop(1); | 10110 Drop(2); |
| 10111 environment()->SetExpressionStackAt(0, after); | 10111 environment()->SetExpressionStackAt(0, after); |
| 10112 if (returns_original_input) environment()->SetExpressionStackAt(1, input); | 10112 if (returns_original_input) environment()->SetExpressionStackAt(1, input); |
| 10113 ASSERT(has_side_effects); // Stores always have side effects. | 10113 ASSERT(has_side_effects); // Stores always have side effects. |
| 10114 AddSimulate(expr->AssignmentId(), REMOVABLE_SIMULATE); | 10114 AddSimulate(expr->AssignmentId(), REMOVABLE_SIMULATE); |
| 10115 } | 10115 } |
| 10116 } | 10116 } |
| 10117 | 10117 |
| 10118 Drop(returns_original_input ? 2 : 1); | 10118 Drop(returns_original_input ? 2 : 1); |
| 10119 return ast_context()->ReturnValue(expr->is_postfix() ? input : after); | 10119 return ast_context()->ReturnValue(expr->is_postfix() ? input : after); |
| 10120 } | 10120 } |
| (...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12304 } | 12304 } |
| 12305 } | 12305 } |
| 12306 | 12306 |
| 12307 #ifdef DEBUG | 12307 #ifdef DEBUG |
| 12308 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 12308 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 12309 if (allocator_ != NULL) allocator_->Verify(); | 12309 if (allocator_ != NULL) allocator_->Verify(); |
| 12310 #endif | 12310 #endif |
| 12311 } | 12311 } |
| 12312 | 12312 |
| 12313 } } // namespace v8::internal | 12313 } } // namespace v8::internal |
| OLD | NEW |