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

Side by Side Diff: src/ia32/code-stubs-ia32.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
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 4721 matching lines...) Expand 10 before | Expand all | Expand 10 after
4732 // A monomorphic cache hit or an already megamorphic state: invoke the 4732 // A monomorphic cache hit or an already megamorphic state: invoke the
4733 // function without changing the state. 4733 // function without changing the state.
4734 __ cmp(ecx, edi); 4734 __ cmp(ecx, edi);
4735 __ j(equal, &done); 4735 __ j(equal, &done);
4736 __ cmp(ecx, Immediate(TypeFeedbackCells::MegamorphicSentinel(isolate))); 4736 __ cmp(ecx, Immediate(TypeFeedbackCells::MegamorphicSentinel(isolate)));
4737 __ j(equal, &done); 4737 __ j(equal, &done);
4738 4738
4739 // Special handling of the Array() function, which caches not only the 4739 // Special handling of the Array() function, which caches not only the
4740 // monomorphic Array function but the initial ElementsKind with special 4740 // monomorphic Array function but the initial ElementsKind with special
4741 // sentinels 4741 // sentinels
4742 Handle<Object> terminal_kind_sentinel =
4743 TypeFeedbackCells::MonomorphicArraySentinel(isolate,
4744 LAST_FAST_ELEMENTS_KIND);
4745 __ JumpIfNotSmi(ecx, &miss); 4742 __ JumpIfNotSmi(ecx, &miss);
4746 __ cmp(ecx, Immediate(terminal_kind_sentinel));
4747 __ j(above, &miss);
4748 // Load the global or builtins object from the current context 4743 // Load the global or builtins object from the current context
4749 __ LoadGlobalContext(ecx); 4744 __ LoadGlobalContext(ecx);
4750 // Make sure the function is the Array() function 4745 // Make sure the function is the Array() function
4751 __ cmp(edi, Operand(ecx, 4746 __ cmp(edi, Operand(ecx,
4752 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); 4747 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
4753 __ j(not_equal, &megamorphic); 4748 __ j(not_equal, &megamorphic);
4754 __ jmp(&done); 4749 __ jmp(&done);
4755 4750
4756 __ bind(&miss); 4751 __ bind(&miss);
4757 4752
(...skipping 3331 matching lines...) Expand 10 before | Expand all | Expand 10 after
8089 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 8084 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
8090 } 8085 }
8091 } 8086 }
8092 8087
8093 8088
8094 #undef __ 8089 #undef __
8095 8090
8096 } } // namespace v8::internal 8091 } } // namespace v8::internal
8097 8092
8098 #endif // V8_TARGET_ARCH_IA32 8093 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698