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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-codegen-x64.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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) { 2160 LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
2161 // There are no real uses of the arguments object. 2161 // There are no real uses of the arguments object.
2162 // arguments.length and element access are supported directly on 2162 // arguments.length and element access are supported directly on
2163 // stack arguments, and any real arguments object use causes a bailout. 2163 // stack arguments, and any real arguments object use causes a bailout.
2164 // So this value is never used. 2164 // So this value is never used.
2165 return NULL; 2165 return NULL;
2166 } 2166 }
2167 2167
2168 2168
2169 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { 2169 LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
2170 LOperand* arguments = UseRegister(instr->arguments()); 2170 LOperand* args = UseRegister(instr->arguments());
2171 LOperand* length = UseTempRegister(instr->length()); 2171 LOperand* length = UseTempRegister(instr->length());
2172 LOperand* index = Use(instr->index()); 2172 LOperand* index = Use(instr->index());
2173 LAccessArgumentsAt* result = 2173 return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index));
2174 new(zone()) LAccessArgumentsAt(arguments, length, index);
2175 return AssignEnvironment(DefineAsRegister(result));
2176 } 2174 }
2177 2175
2178 2176
2179 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) { 2177 LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
2180 LOperand* object = UseFixed(instr->value(), rax); 2178 LOperand* object = UseFixed(instr->value(), rax);
2181 LToFastProperties* result = new(zone()) LToFastProperties(object); 2179 LToFastProperties* result = new(zone()) LToFastProperties(object);
2182 return MarkAsCall(DefineFixed(result, rax), instr); 2180 return MarkAsCall(DefineFixed(result, rax), instr);
2183 } 2181 }
2184 2182
2185 2183
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2312 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2315 LOperand* object = UseRegister(instr->object()); 2313 LOperand* object = UseRegister(instr->object());
2316 LOperand* index = UseTempRegister(instr->index()); 2314 LOperand* index = UseTempRegister(instr->index());
2317 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2315 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2318 } 2316 }
2319 2317
2320 2318
2321 } } // namespace v8::internal 2319 } } // namespace v8::internal
2322 2320
2323 #endif // V8_TARGET_ARCH_X64 2321 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698