Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: src/hydrogen.cc

Issue 14793009: Do not change environment between simulate and scope with no observable side-effects in HandlePrope… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2671.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6972 matching lines...) Expand 10 before | Expand all | Expand 10 after
6983 AddInstruction(instr); 6983 AddInstruction(instr);
6984 if (instr->HasObservableSideEffects()) { 6984 if (instr->HasObservableSideEffects()) {
6985 AddSimulate(expr->AssignmentId(), REMOVABLE_SIMULATE); 6985 AddSimulate(expr->AssignmentId(), REMOVABLE_SIMULATE);
6986 } 6986 }
6987 return ast_context()->ReturnValue(Pop()); 6987 return ast_context()->ReturnValue(Pop());
6988 6988
6989 } else { 6989 } else {
6990 // Keyed store. 6990 // Keyed store.
6991 CHECK_ALIVE(VisitForValue(prop->key())); 6991 CHECK_ALIVE(VisitForValue(prop->key()));
6992 CHECK_ALIVE(VisitForValue(expr->value())); 6992 CHECK_ALIVE(VisitForValue(expr->value()));
6993 HValue* value = Pop(); 6993 HValue* value = environment()->ExpressionStackAt(0);
6994 HValue* key = Pop(); 6994 HValue* key = environment()->ExpressionStackAt(1);
6995 HValue* object = Pop(); 6995 HValue* object = environment()->ExpressionStackAt(2);
6996 bool has_side_effects = false; 6996 bool has_side_effects = false;
6997 HandleKeyedElementAccess(object, key, value, expr, expr->AssignmentId(), 6997 HandleKeyedElementAccess(object, key, value, expr, expr->AssignmentId(),
6998 expr->position(), 6998 expr->position(),
6999 true, // is_store 6999 true, // is_store
7000 &has_side_effects); 7000 &has_side_effects);
7001 Drop(3);
7001 Push(value); 7002 Push(value);
7002 AddSimulate(expr->AssignmentId(), REMOVABLE_SIMULATE); 7003 AddSimulate(expr->AssignmentId(), REMOVABLE_SIMULATE);
7003 return ast_context()->ReturnValue(Pop()); 7004 return ast_context()->ReturnValue(Pop());
7004 } 7005 }
7005 } 7006 }
7006 7007
7007 7008
7008 // Because not every expression has a position and there is not common 7009 // Because not every expression has a position and there is not common
7009 // superclass of Assignment and CountOperation, we cannot just pass the 7010 // superclass of Assignment and CountOperation, we cannot just pass the
7010 // owning expression instead of position and ast_id separately. 7011 // owning expression instead of position and ast_id separately.
(...skipping 4863 matching lines...) Expand 10 before | Expand all | Expand 10 after
11874 } 11875 }
11875 } 11876 }
11876 11877
11877 #ifdef DEBUG 11878 #ifdef DEBUG
11878 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11879 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11879 if (allocator_ != NULL) allocator_->Verify(); 11880 if (allocator_ != NULL) allocator_->Verify();
11880 #endif 11881 #endif
11881 } 11882 }
11882 11883
11883 } } // namespace v8::internal 11884 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2671.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698