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

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

Issue 19954005: Eliminate map checks of constant values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Naming Created 7 years, 5 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 2017 matching lines...) Expand 10 before | Expand all | Expand 10 after
2028 2028
2029 2029
2030 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { 2030 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
2031 LOperand* value = UseRegisterAtStart(instr->value()); 2031 LOperand* value = UseRegisterAtStart(instr->value());
2032 LInstruction* result = new(zone()) LCheckInstanceType(value); 2032 LInstruction* result = new(zone()) LCheckInstanceType(value);
2033 return AssignEnvironment(result); 2033 return AssignEnvironment(result);
2034 } 2034 }
2035 2035
2036 2036
2037 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { 2037 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
2038 LUnallocated* temp1 = TempRegister(); 2038 LUnallocated* temp1 = NULL;
2039 LOperand* temp2 = TempRegister(); 2039 LOperand* temp2 = NULL;
2040 if (!instr->CanOmitPrototypeChecks()) {
2041 temp1 = TempRegister();
2042 temp2 = TempRegister();
2043 }
2040 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2); 2044 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2);
2045 if (instr->CanOmitPrototypeChecks()) return result;
2041 return AssignEnvironment(result); 2046 return AssignEnvironment(result);
2042 } 2047 }
2043 2048
2044 2049
2045 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { 2050 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
2046 LOperand* value = UseRegisterAtStart(instr->value()); 2051 LOperand* value = UseRegisterAtStart(instr->value());
2047 return AssignEnvironment(new(zone()) LCheckFunction(value)); 2052 return AssignEnvironment(new(zone()) LCheckFunction(value));
2048 } 2053 }
2049 2054
2050 2055
2051 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { 2056 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) {
2052 LOperand* value = UseRegisterAtStart(instr->value()); 2057 LOperand* value = NULL;
2058 if (!instr->CanOmitMapChecks()) value = UseRegisterAtStart(instr->value());
2053 LInstruction* result = new(zone()) LCheckMaps(value); 2059 LInstruction* result = new(zone()) LCheckMaps(value);
2060 if (instr->CanOmitMapChecks()) return result;
2054 return AssignEnvironment(result); 2061 return AssignEnvironment(result);
2055 } 2062 }
2056 2063
2057 2064
2058 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { 2065 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
2059 HValue* value = instr->value(); 2066 HValue* value = instr->value();
2060 Representation input_rep = value->representation(); 2067 Representation input_rep = value->representation();
2061 LOperand* reg = UseRegister(value); 2068 LOperand* reg = UseRegister(value);
2062 if (input_rep.IsDouble()) { 2069 if (input_rep.IsDouble()) {
2063 return DefineAsRegister(new(zone()) LClampDToUint8(reg, FixedTemp(d11))); 2070 return DefineAsRegister(new(zone()) LClampDToUint8(reg, FixedTemp(d11)));
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
2640 2647
2641 2648
2642 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2649 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2643 LOperand* object = UseRegister(instr->object()); 2650 LOperand* object = UseRegister(instr->object());
2644 LOperand* index = UseRegister(instr->index()); 2651 LOperand* index = UseRegister(instr->index());
2645 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2652 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2646 } 2653 }
2647 2654
2648 2655
2649 } } // namespace v8::internal 2656 } } // 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