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

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: Response to review comments from Danno out of band 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') | src/ia32/lithium-codegen-ia32.cc » ('J')
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 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 // There are no real uses of the arguments object. 2446 // There are no real uses of the arguments object.
2447 // arguments.length and element access are supported directly on 2447 // arguments.length and element access are supported directly on
2448 // stack arguments, and any real arguments object use causes a bailout. 2448 // stack arguments, and any real arguments object use causes a bailout.
2449 // So this value is never used. 2449 // So this value is never used.
2450 return NULL; 2450 return NULL;
2451 } 2451 }
2452 2452
2453 2453
2454 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { 2454 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
2455 LOperand* args = UseRegister(instr->arguments()); 2455 LOperand* args = UseRegister(instr->arguments());
2456 LOperand* length = UseTempRegister(instr->length()); 2456 LOperand* length;
2457 LOperand* index = UseRegister(instr->index()); 2457 LOperand* index;
2458 if (instr->length()->IsConstant() && instr->index()->IsConstant()) {
2459 length = UseRegisterOrConstant(instr->length());
2460 index = UseOrConstant(instr->index());
2461 } else {
2462 length = UseTempRegister(instr->length());
2463 index = Use(instr->index());
2464 }
2458 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index)); 2465 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index));
2459 } 2466 }
2460 2467
2461 2468
2462 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { 2469 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
2463 LOperand* object = UseFixed(instr->value(), r0); 2470 LOperand* object = UseFixed(instr->value(), r0);
2464 LToFastProperties* result = new(zone()) LToFastProperties(object); 2471 LToFastProperties* result = new(zone()) LToFastProperties(object);
2465 return MarkAsCall(DefineFixed(result, r0), instr); 2472 return MarkAsCall(DefineFixed(result, r0), instr);
2466 } 2473 }
2467 2474
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
2594 2601
2595 2602
2596 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2603 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2597 LOperand* object = UseRegister(instr->object()); 2604 LOperand* object = UseRegister(instr->object());
2598 LOperand* index = UseRegister(instr->index()); 2605 LOperand* index = UseRegister(instr->index());
2599 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2606 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2600 } 2607 }
2601 2608
2602 2609
2603 } } // namespace v8::internal 2610 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | src/ia32/lithium-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698