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

Side by Side Diff: src/hydrogen.cc

Issue 15660003: Avoid creating duplicate entries for a value when merging HSimulates (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 | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.h » ('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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 ASSERT(ast_id.IsNone() || 150 ASSERT(ast_id.IsNone() ||
151 ast_id == BailoutId::StubEntry() || 151 ast_id == BailoutId::StubEntry() ||
152 environment->closure()->shared()->VerifyBailoutId(ast_id)); 152 environment->closure()->shared()->VerifyBailoutId(ast_id));
153 153
154 int push_count = environment->push_count(); 154 int push_count = environment->push_count();
155 int pop_count = environment->pop_count(); 155 int pop_count = environment->pop_count();
156 156
157 HSimulate* instr = 157 HSimulate* instr =
158 new(zone()) HSimulate(ast_id, pop_count, zone(), removable); 158 new(zone()) HSimulate(ast_id, pop_count, zone(), removable);
159 // Order of pushed values: newest (top of stack) first. This allows 159 // Order of pushed values: newest (top of stack) first. This allows
160 // HSimulate::MergeInto() to easily append additional pushed values 160 // HSimulate::MergeWith() to easily append additional pushed values
161 // that are older (from further down the stack). 161 // that are older (from further down the stack).
162 for (int i = 0; i < push_count; ++i) { 162 for (int i = 0; i < push_count; ++i) {
163 instr->AddPushedValue(environment->ExpressionStackAt(i)); 163 instr->AddPushedValue(environment->ExpressionStackAt(i));
164 } 164 }
165 for (GrowableBitVector::Iterator it(environment->assigned_variables(), 165 for (GrowableBitVector::Iterator it(environment->assigned_variables(),
166 zone()); 166 zone());
167 !it.Done(); 167 !it.Done();
168 it.Advance()) { 168 it.Advance()) {
169 int index = it.Current(); 169 int index = it.Current();
170 instr->AddAssignedValue(index, environment->Lookup(index)); 170 instr->AddAssignedValue(index, environment->Lookup(index));
(...skipping 12304 matching lines...) Expand 10 before | Expand all | Expand 10 after
12475 } 12475 }
12476 } 12476 }
12477 12477
12478 #ifdef DEBUG 12478 #ifdef DEBUG
12479 if (graph_ != NULL) graph_->Verify(false); // No full verify. 12479 if (graph_ != NULL) graph_->Verify(false); // No full verify.
12480 if (allocator_ != NULL) allocator_->Verify(); 12480 if (allocator_ != NULL) allocator_->Verify();
12481 #endif 12481 #endif
12482 } 12482 }
12483 12483
12484 } } // namespace v8::internal 12484 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698