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

Side by Side Diff: src/hydrogen.cc

Issue 6693062: Remove environment length from HSimulate instructions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 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/arm/lithium-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 HSimulate* HBasicBlock::CreateSimulate(int id) { 134 HSimulate* HBasicBlock::CreateSimulate(int id) {
135 ASSERT(HasEnvironment()); 135 ASSERT(HasEnvironment());
136 HEnvironment* environment = last_environment(); 136 HEnvironment* environment = last_environment();
137 ASSERT(id == AstNode::kNoNumber || 137 ASSERT(id == AstNode::kNoNumber ||
138 environment->closure()->shared()->VerifyBailoutId(id)); 138 environment->closure()->shared()->VerifyBailoutId(id));
139 139
140 int push_count = environment->push_count(); 140 int push_count = environment->push_count();
141 int pop_count = environment->pop_count(); 141 int pop_count = environment->pop_count();
142 142
143 int length = environment->length(); 143 HSimulate* instr = new HSimulate(id, pop_count);
144 HSimulate* instr = new HSimulate(id, pop_count, length);
145 for (int i = push_count - 1; i >= 0; --i) { 144 for (int i = push_count - 1; i >= 0; --i) {
146 instr->AddPushedValue(environment->ExpressionStackAt(i)); 145 instr->AddPushedValue(environment->ExpressionStackAt(i));
147 } 146 }
148 for (int i = 0; i < environment->assigned_variables()->length(); ++i) { 147 for (int i = 0; i < environment->assigned_variables()->length(); ++i) {
149 int index = environment->assigned_variables()->at(i); 148 int index = environment->assigned_variables()->at(i);
150 instr->AddAssignedValue(index, environment->Lookup(index)); 149 instr->AddAssignedValue(index, environment->Lookup(index));
151 } 150 }
152 environment->ClearHistory(); 151 environment->ClearHistory();
153 return instr; 152 return instr;
154 } 153 }
(...skipping 5796 matching lines...) Expand 10 before | Expand all | Expand 10 after
5951 } 5950 }
5952 } 5951 }
5953 5952
5954 #ifdef DEBUG 5953 #ifdef DEBUG
5955 if (graph_ != NULL) graph_->Verify(); 5954 if (graph_ != NULL) graph_->Verify();
5956 if (allocator_ != NULL) allocator_->Verify(); 5955 if (allocator_ != NULL) allocator_->Verify();
5957 #endif 5956 #endif
5958 } 5957 }
5959 5958
5960 } } // namespace v8::internal 5959 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698