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

Side by Side Diff: src/x64/code-stubs-x64.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 | « src/ia32/code-stubs-ia32.cc ('k') | test/mjsunit/regress/regress-2566.js » ('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 2463 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 // elements of FixedArray type). Value must be a number, but only smis are 2474 // elements of FixedArray type). Value must be a number, but only smis are
2475 // accepted as the most common case. 2475 // accepted as the most common case.
2476 2476
2477 Label miss; 2477 Label miss;
2478 2478
2479 Register receiver = rdx; 2479 Register receiver = rdx;
2480 Register value = rax; 2480 Register value = rax;
2481 Register scratch = rbx; 2481 Register scratch = rbx;
2482 if (kind() == Code::KEYED_STORE_IC) { 2482 if (kind() == Code::KEYED_STORE_IC) {
2483 __ Cmp(rcx, masm->isolate()->factory()->length_string()); 2483 __ Cmp(rcx, masm->isolate()->factory()->length_string());
2484 __ j(not_equal, &miss);
2484 } 2485 }
2485 2486
2486 // Check that the receiver isn't a smi. 2487 // Check that the receiver isn't a smi.
2487 __ JumpIfSmi(receiver, &miss); 2488 __ JumpIfSmi(receiver, &miss);
2488 2489
2489 // Check that the object is a JS array. 2490 // Check that the object is a JS array.
2490 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch); 2491 __ CmpObjectType(receiver, JS_ARRAY_TYPE, scratch);
2491 __ j(not_equal, &miss); 2492 __ j(not_equal, &miss);
2492 2493
2493 // Check that elements are FixedArray. 2494 // Check that elements are FixedArray.
(...skipping 4387 matching lines...) Expand 10 before | Expand all | Expand 10 after
6881 #endif 6882 #endif
6882 6883
6883 __ Ret(); 6884 __ Ret();
6884 } 6885 }
6885 6886
6886 #undef __ 6887 #undef __
6887 6888
6888 } } // namespace v8::internal 6889 } } // namespace v8::internal
6889 6890
6890 #endif // V8_TARGET_ARCH_X64 6891 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | test/mjsunit/regress/regress-2566.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698