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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 12378085: Properly handle misses for StoreArrayLengthStub on ia32 and x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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/x64/code-stubs-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 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 // (currently anything except for external arrays which means anything with 3356 // (currently anything except for external arrays which means anything with
3357 // elements of FixedArray type). Value must be a number, but only smis are 3357 // elements of FixedArray type). Value must be a number, but only smis are
3358 // accepted as the most common case. 3358 // accepted as the most common case.
3359 3359
3360 Label miss; 3360 Label miss;
3361 3361
3362 Register receiver = edx; 3362 Register receiver = edx;
3363 Register value = eax; 3363 Register value = eax;
3364 Register scratch = ebx; 3364 Register scratch = ebx;
3365 3365
3366 if (kind() == Code::KEYED_LOAD_IC) { 3366 if (kind() == Code::KEYED_STORE_IC) {
3367 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string())); 3367 __ cmp(ecx, Immediate(masm->isolate()->factory()->length_string()));
3368 __ j(not_equal, &miss); 3368 __ j(not_equal, &miss);
3369 } 3369 }
3370 3370
3371 // Check that the receiver isn't a smi. 3371 // Check that the receiver isn't a smi.
3372 __ JumpIfSmi(receiver, &miss); 3372 __ JumpIfSmi(receiver, &miss);
3373 3373
3374 // Check that the object is a JS array. 3374 // Check that the object is a JS array.
3375 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch); 3375 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch);
3376 __ j(not_equal, &miss); 3376 __ j(not_equal, &miss);
(...skipping 4496 matching lines...) Expand 10 before | Expand all | Expand 10 after
7873 // Restore ecx. 7873 // Restore ecx.
7874 __ pop(ecx); 7874 __ pop(ecx);
7875 __ ret(0); 7875 __ ret(0);
7876 } 7876 }
7877 7877
7878 #undef __ 7878 #undef __
7879 7879
7880 } } // namespace v8::internal 7880 } } // namespace v8::internal
7881 7881
7882 #endif // V8_TARGET_ARCH_IA32 7882 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698