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

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

Issue 79143007: MIPS: Optimize AccessArgumentsAt. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years 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
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | 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 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 instr->ReplayEnvironment(current_block_->last_environment()); 2452 instr->ReplayEnvironment(current_block_->last_environment());
2453 2453
2454 // There are no real uses of a captured object. 2454 // There are no real uses of a captured object.
2455 return NULL; 2455 return NULL;
2456 } 2456 }
2457 2457
2458 2458
2459 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { 2459 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
2460 info()->MarkAsRequiresFrame(); 2460 info()->MarkAsRequiresFrame();
2461 LOperand* args = UseRegister(instr->arguments()); 2461 LOperand* args = UseRegister(instr->arguments());
2462 LOperand* length; 2462 LOperand* length = UseRegisterOrConstantAtStart(instr->length());
2463 LOperand* index; 2463 LOperand* index = UseRegisterOrConstantAtStart(instr->index());
2464 if (instr->length()->IsConstant() && instr->index()->IsConstant()) {
2465 length = UseRegisterOrConstant(instr->length());
2466 index = UseOrConstant(instr->index());
2467 } else {
2468 length = UseTempRegister(instr->length());
2469 index = UseRegisterAtStart(instr->index());
2470 }
2471 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); 2464 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index));
2472 } 2465 }
2473 2466
2474 2467
2475 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { 2468 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
2476 LOperand* object = UseFixed(instr->value(), a0); 2469 LOperand* object = UseFixed(instr->value(), a0);
2477 LToFastProperties* result = new(zone()) LToFastProperties(object); 2470 LToFastProperties* result = new(zone()) LToFastProperties(object);
2478 return MarkAsCall(DefineFixed(result, v0), instr); 2471 return MarkAsCall(DefineFixed(result, v0), instr);
2479 } 2472 }
2480 2473
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2595 2588
2596 2589
2597 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2590 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2598 LOperand* object = UseRegister(instr->object()); 2591 LOperand* object = UseRegister(instr->object());
2599 LOperand* index = UseRegister(instr->index()); 2592 LOperand* index = UseRegister(instr->index());
2600 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2593 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2601 } 2594 }
2602 2595
2603 2596
2604 } } // namespace v8::internal 2597 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698