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

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

Issue 11106012: Consistently make the bounds check for AccessArgumentsAt explicit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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/mips/lithium-codegen-mips.cc ('k') | src/x64/lithium-codegen-x64.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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { 2099 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
2100 // There are no real uses of the arguments object. 2100 // There are no real uses of the arguments object.
2101 // arguments.length and element access are supported directly on 2101 // arguments.length and element access are supported directly on
2102 // stack arguments, and any real arguments object use causes a bailout. 2102 // stack arguments, and any real arguments object use causes a bailout.
2103 // So this value is never used. 2103 // So this value is never used.
2104 return NULL; 2104 return NULL;
2105 } 2105 }
2106 2106
2107 2107
2108 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { 2108 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
2109 LOperand* arguments = UseRegister(instr->arguments()); 2109 LOperand* args = UseRegister(instr->arguments());
2110 LOperand* length = UseTempRegister(instr->length()); 2110 LOperand* length = UseTempRegister(instr->length());
2111 LOperand* index = UseRegister(instr->index()); 2111 LOperand* index = UseRegister(instr->index());
2112 LAccessArgumentsAt* result = 2112 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index));
2113 new(zone()) LAccessArgumentsAt(arguments, length, index);
2114 return AssignEnvironment(DefineAsRegister(result));
2115 } 2113 }
2116 2114
2117 2115
2118 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { 2116 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
2119 LOperand* object = UseFixed(instr->value(), a0); 2117 LOperand* object = UseFixed(instr->value(), a0);
2120 LToFastProperties* result = new(zone()) LToFastProperties(object); 2118 LToFastProperties* result = new(zone()) LToFastProperties(object);
2121 return MarkAsCall(DefineFixed(result, v0), instr); 2119 return MarkAsCall(DefineFixed(result, v0), instr);
2122 } 2120 }
2123 2121
2124 2122
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 2250
2253 2251
2254 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2252 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2255 LOperand* object = UseRegister(instr->object()); 2253 LOperand* object = UseRegister(instr->object());
2256 LOperand* index = UseRegister(instr->index()); 2254 LOperand* index = UseRegister(instr->index());
2257 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2255 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2258 } 2256 }
2259 2257
2260 2258
2261 } } // namespace v8::internal 2259 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698