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

Side by Side Diff: src/hydrogen.cc

Issue 25665006: Fix failure in unit tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | 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 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 211
212 void HBasicBlock::Goto(HBasicBlock* block, 212 void HBasicBlock::Goto(HBasicBlock* block,
213 FunctionState* state, 213 FunctionState* state,
214 bool add_simulate) { 214 bool add_simulate) {
215 bool drop_extra = state != NULL && 215 bool drop_extra = state != NULL &&
216 state->inlining_kind() == DROP_EXTRA_ON_RETURN; 216 state->inlining_kind() == DROP_EXTRA_ON_RETURN;
217 217
218 if (block->IsInlineReturnTarget()) { 218 if (block->IsInlineReturnTarget()) {
219 HEnvironment* env = last_environment(); 219 HEnvironment* env = last_environment();
220 int argument_count = state->entry()->arguments_pushed() 220 int argument_count = env->arguments_environment()->parameter_count();
221 ? env->arguments_environment()->parameter_count() : 0; 221 AddInstruction(new(zone()) HLeaveInlined(state->entry(), argument_count));
222 AddInstruction(new(zone()) HLeaveInlined(argument_count));
223 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra)); 222 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra));
224 } 223 }
225 224
226 if (add_simulate) AddNewSimulate(BailoutId::None()); 225 if (add_simulate) AddNewSimulate(BailoutId::None());
227 HGoto* instr = new(zone()) HGoto(block); 226 HGoto* instr = new(zone()) HGoto(block);
228 Finish(instr); 227 Finish(instr);
229 } 228 }
230 229
231 230
232 void HBasicBlock::AddLeaveInlined(HValue* return_value, 231 void HBasicBlock::AddLeaveInlined(HValue* return_value,
233 FunctionState* state) { 232 FunctionState* state) {
234 HBasicBlock* target = state->function_return(); 233 HBasicBlock* target = state->function_return();
235 bool drop_extra = state->inlining_kind() == DROP_EXTRA_ON_RETURN; 234 bool drop_extra = state->inlining_kind() == DROP_EXTRA_ON_RETURN;
236 235
237 ASSERT(target->IsInlineReturnTarget()); 236 ASSERT(target->IsInlineReturnTarget());
238 ASSERT(return_value != NULL); 237 ASSERT(return_value != NULL);
239 HEnvironment* env = last_environment(); 238 HEnvironment* env = last_environment();
240 int argument_count = state->entry()->arguments_pushed() 239 int argument_count = env->arguments_environment()->parameter_count();
241 ? env->arguments_environment()->parameter_count() : 0; 240 AddInstruction(new(zone()) HLeaveInlined(state->entry(), argument_count));
242 AddInstruction(new(zone()) HLeaveInlined(argument_count));
243 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra)); 241 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra));
244 last_environment()->Push(return_value); 242 last_environment()->Push(return_value);
245 AddNewSimulate(BailoutId::None()); 243 AddNewSimulate(BailoutId::None());
246 HGoto* instr = new(zone()) HGoto(target); 244 HGoto* instr = new(zone()) HGoto(target);
247 Finish(instr); 245 Finish(instr);
248 } 246 }
249 247
250 248
251 void HBasicBlock::SetInitialEnvironment(HEnvironment* env) { 249 void HBasicBlock::SetInitialEnvironment(HEnvironment* env) {
252 ASSERT(!HasEnvironment()); 250 ASSERT(!HasEnvironment());
(...skipping 9604 matching lines...) Expand 10 before | Expand all | Expand 10 after
9857 if (ShouldProduceTraceOutput()) { 9855 if (ShouldProduceTraceOutput()) {
9858 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9856 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9859 } 9857 }
9860 9858
9861 #ifdef DEBUG 9859 #ifdef DEBUG
9862 graph_->Verify(false); // No full verify. 9860 graph_->Verify(false); // No full verify.
9863 #endif 9861 #endif
9864 } 9862 }
9865 9863
9866 } } // namespace v8::internal 9864 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698