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

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

Issue 16855008: An unnecessary check for the range of a smi was being performed in (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
« src/arm/code-stubs-arm.cc ('K') | « src/ia32/code-stubs-ia32.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 3760 matching lines...) Expand 10 before | Expand all | Expand 10 after
3771 // A monomorphic cache hit or an already megamorphic state: invoke the 3771 // A monomorphic cache hit or an already megamorphic state: invoke the
3772 // function without changing the state. 3772 // function without changing the state.
3773 __ cmpq(rcx, rdi); 3773 __ cmpq(rcx, rdi);
3774 __ j(equal, &done); 3774 __ j(equal, &done);
3775 __ Cmp(rcx, TypeFeedbackCells::MegamorphicSentinel(isolate)); 3775 __ Cmp(rcx, TypeFeedbackCells::MegamorphicSentinel(isolate));
3776 __ j(equal, &done); 3776 __ j(equal, &done);
3777 3777
3778 // Special handling of the Array() function, which caches not only the 3778 // Special handling of the Array() function, which caches not only the
3779 // monomorphic Array function but the initial ElementsKind with special 3779 // monomorphic Array function but the initial ElementsKind with special
3780 // sentinels 3780 // sentinels
3781 Handle<Object> terminal_kind_sentinel =
3782 TypeFeedbackCells::MonomorphicArraySentinel(isolate,
3783 LAST_FAST_ELEMENTS_KIND);
3784 __ JumpIfNotSmi(rcx, &miss); 3781 __ JumpIfNotSmi(rcx, &miss);
3785 __ Cmp(rcx, terminal_kind_sentinel);
3786 __ j(above, &miss);
3787 // Make sure the function is the Array() function 3782 // Make sure the function is the Array() function
3788 __ LoadArrayFunction(rcx); 3783 __ LoadArrayFunction(rcx);
3789 __ cmpq(rdi, rcx); 3784 __ cmpq(rdi, rcx);
3790 __ j(not_equal, &megamorphic); 3785 __ j(not_equal, &megamorphic);
3791 __ jmp(&done); 3786 __ jmp(&done);
3792 3787
3793 __ bind(&miss); 3788 __ bind(&miss);
3794 3789
3795 // A monomorphic miss (i.e, here the cache is not uninitialized) goes 3790 // A monomorphic miss (i.e, here the cache is not uninitialized) goes
3796 // megamorphic. 3791 // megamorphic.
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after
7094 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 7089 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
7095 } 7090 }
7096 } 7091 }
7097 7092
7098 7093
7099 #undef __ 7094 #undef __
7100 7095
7101 } } // namespace v8::internal 7096 } } // namespace v8::internal
7102 7097
7103 #endif // V8_TARGET_ARCH_X64 7098 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/arm/code-stubs-arm.cc ('K') | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698