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

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 10938016: Fix lost arguments dropping in HLeaveInlined. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jakob Kummerow. Created 8 years, 3 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/hydrogen-instructions.h ('k') | src/mips/lithium-mips.cc » ('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 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2231 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { 2231 LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
2232 LOperand* context = UseFixed(instr->context(), esi); 2232 LOperand* context = UseFixed(instr->context(), esi);
2233 LOperand* object = UseAtStart(instr->object()); 2233 LOperand* object = UseAtStart(instr->object());
2234 LOperand* key = UseOrConstantAtStart(instr->key()); 2234 LOperand* key = UseOrConstantAtStart(instr->key());
2235 LDeleteProperty* result = new(zone()) LDeleteProperty(context, object, key); 2235 LDeleteProperty* result = new(zone()) LDeleteProperty(context, object, key);
2236 return MarkAsCall(DefineFixed(result, eax), instr); 2236 return MarkAsCall(DefineFixed(result, eax), instr);
2237 } 2237 }
2238 2238
2239 2239
2240 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { 2240 LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
2241 ASSERT(argument_count_ == 0);
2241 allocator_->MarkAsOsrEntry(); 2242 allocator_->MarkAsOsrEntry();
2242 current_block_->last_environment()->set_ast_id(instr->ast_id()); 2243 current_block_->last_environment()->set_ast_id(instr->ast_id());
2243 return AssignEnvironment(new(zone()) LOsrEntry); 2244 return AssignEnvironment(new(zone()) LOsrEntry);
2244 } 2245 }
2245 2246
2246 2247
2247 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { 2248 LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
2248 int spill_index = chunk()->GetParameterStackSlot(instr->index()); 2249 int spill_index = chunk()->GetParameterStackSlot(instr->index());
2249 return DefineAsSpilled(new(zone()) LParameter, spill_index); 2250 return DefineAsSpilled(new(zone()) LParameter, spill_index);
2250 } 2251 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2378 chunk_->AddInlinedClosure(instr->closure()); 2379 chunk_->AddInlinedClosure(instr->closure());
2379 return NULL; 2380 return NULL;
2380 } 2381 }
2381 2382
2382 2383
2383 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2384 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2384 LInstruction* pop = NULL; 2385 LInstruction* pop = NULL;
2385 2386
2386 HEnvironment* env = current_block_->last_environment(); 2387 HEnvironment* env = current_block_->last_environment();
2387 2388
2388 if (instr->arguments_pushed()) { 2389 if (env->entry()->arguments_pushed()) {
2389 int argument_count = env->arguments_environment()->parameter_count(); 2390 int argument_count = env->arguments_environment()->parameter_count();
2390 pop = new(zone()) LDrop(argument_count); 2391 pop = new(zone()) LDrop(argument_count);
2391 argument_count_ -= argument_count; 2392 argument_count_ -= argument_count;
2392 } 2393 }
2393 2394
2394 HEnvironment* outer = current_block_->last_environment()-> 2395 HEnvironment* outer = current_block_->last_environment()->
2395 DiscardInlined(false); 2396 DiscardInlined(false);
2396 current_block_->UpdateEnvironment(outer); 2397 current_block_->UpdateEnvironment(outer);
2397 return pop; 2398 return pop;
2398 } 2399 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2433 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2433 LOperand* object = UseRegister(instr->object()); 2434 LOperand* object = UseRegister(instr->object());
2434 LOperand* index = UseTempRegister(instr->index()); 2435 LOperand* index = UseTempRegister(instr->index());
2435 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2436 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2436 } 2437 }
2437 2438
2438 2439
2439 } } // namespace v8::internal 2440 } } // namespace v8::internal
2440 2441
2441 #endif // V8_TARGET_ARCH_IA32 2442 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698