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

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

Issue 14022011: Improvements in lithium code generation. Recognizing if some operands are constants, we can often s… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review updates Created 7 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 | « no previous file | src/arm/lithium-codegen-arm.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 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 // There are no real uses of the arguments object. 2450 // There are no real uses of the arguments object.
2451 // arguments.length and element access are supported directly on 2451 // arguments.length and element access are supported directly on
2452 // stack arguments, and any real arguments object use causes a bailout. 2452 // stack arguments, and any real arguments object use causes a bailout.
2453 // So this value is never used. 2453 // So this value is never used.
2454 return NULL; 2454 return NULL;
2455 } 2455 }
2456 2456
2457 2457
2458 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { 2458 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
2459 LOperand* args = UseRegister(instr->arguments()); 2459 LOperand* args = UseRegister(instr->arguments());
2460 LOperand* length = UseTempRegister(instr->length()); 2460 LOperand* length;
2461 LOperand* index = UseRegister(instr->index()); 2461 LOperand* index;
2462 if (instr->length()->IsConstant() && instr->index()->IsConstant()) {
2463 length = UseRegisterOrConstant(instr->length());
2464 index = UseOrConstant(instr->index());
2465 } else {
2466 length = UseTempRegister(instr->length());
2467 index = Use(instr->index());
2468 }
2462 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); 2469 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index));
2463 } 2470 }
2464 2471
2465 2472
2466 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { 2473 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
2467 LOperand* object = UseFixed(instr->value(), r0); 2474 LOperand* object = UseFixed(instr->value(), r0);
2468 LToFastProperties* result = new(zone()) LToFastProperties(object); 2475 LToFastProperties* result = new(zone()) LToFastProperties(object);
2469 return MarkAsCall(DefineFixed(result, r0), instr); 2476 return MarkAsCall(DefineFixed(result, r0), instr);
2470 } 2477 }
2471 2478
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 2605
2599 2606
2600 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2607 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2601 LOperand* object = UseRegister(instr->object()); 2608 LOperand* object = UseRegister(instr->object());
2602 LOperand* index = UseRegister(instr->index()); 2609 LOperand* index = UseRegister(instr->index());
2603 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2610 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2604 } 2611 }
2605 2612
2606 2613
2607 } } // namespace v8::internal 2614 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698