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

Side by Side Diff: src/hydrogen.cc

Issue 25604008: Fix test262 failures and x64 compile failure. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nits 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 | « 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 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 209 }
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 AddInstruction(new(zone()) HLeaveInlined()); 219 HEnvironment* env = last_environment();
220 int argument_count = state->entry()->arguments_pushed()
221 ? env->arguments_environment()->parameter_count() : 0;
222 AddInstruction(new(zone()) HLeaveInlined(argument_count));
220 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra)); 223 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra));
221 } 224 }
222 225
223 if (add_simulate) AddNewSimulate(BailoutId::None()); 226 if (add_simulate) AddNewSimulate(BailoutId::None());
224 HGoto* instr = new(zone()) HGoto(block); 227 HGoto* instr = new(zone()) HGoto(block);
225 Finish(instr); 228 Finish(instr);
226 } 229 }
227 230
228 231
229 void HBasicBlock::AddLeaveInlined(HValue* return_value, 232 void HBasicBlock::AddLeaveInlined(HValue* return_value,
230 FunctionState* state) { 233 FunctionState* state) {
231 HBasicBlock* target = state->function_return(); 234 HBasicBlock* target = state->function_return();
232 bool drop_extra = state->inlining_kind() == DROP_EXTRA_ON_RETURN; 235 bool drop_extra = state->inlining_kind() == DROP_EXTRA_ON_RETURN;
233 236
234 ASSERT(target->IsInlineReturnTarget()); 237 ASSERT(target->IsInlineReturnTarget());
235 ASSERT(return_value != NULL); 238 ASSERT(return_value != NULL);
236 AddInstruction(new(zone()) HLeaveInlined()); 239 HEnvironment* env = last_environment();
240 int argument_count = state->entry()->arguments_pushed()
241 ? env->arguments_environment()->parameter_count() : 0;
242 AddInstruction(new(zone()) HLeaveInlined(argument_count));
237 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra)); 243 UpdateEnvironment(last_environment()->DiscardInlined(drop_extra));
238 last_environment()->Push(return_value); 244 last_environment()->Push(return_value);
239 AddNewSimulate(BailoutId::None()); 245 AddNewSimulate(BailoutId::None());
240 HGoto* instr = new(zone()) HGoto(target); 246 HGoto* instr = new(zone()) HGoto(target);
241 Finish(instr); 247 Finish(instr);
242 } 248 }
243 249
244 250
245 void HBasicBlock::SetInitialEnvironment(HEnvironment* env) { 251 void HBasicBlock::SetInitialEnvironment(HEnvironment* env) {
246 ASSERT(!HasEnvironment()); 252 ASSERT(!HasEnvironment());
(...skipping 9604 matching lines...) Expand 10 before | Expand all | Expand 10 after
9851 if (ShouldProduceTraceOutput()) { 9857 if (ShouldProduceTraceOutput()) {
9852 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 9858 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
9853 } 9859 }
9854 9860
9855 #ifdef DEBUG 9861 #ifdef DEBUG
9856 graph_->Verify(false); // No full verify. 9862 graph_->Verify(false); // No full verify.
9857 #endif 9863 #endif
9858 } 9864 }
9859 9865
9860 } } // namespace v8::internal 9866 } } // 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