OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3906 __ LoadRoot(ip, Heap::kInstanceofCacheMapRootIndex); | 3906 __ LoadRoot(ip, Heap::kInstanceofCacheMapRootIndex); |
3907 __ cmp(map, ip); | 3907 __ cmp(map, ip); |
3908 __ b(ne, &miss); | 3908 __ b(ne, &miss); |
3909 __ LoadRoot(r0, Heap::kInstanceofCacheAnswerRootIndex); | 3909 __ LoadRoot(r0, Heap::kInstanceofCacheAnswerRootIndex); |
3910 __ Ret(HasArgsInRegisters() ? 0 : 2); | 3910 __ Ret(HasArgsInRegisters() ? 0 : 2); |
3911 | 3911 |
3912 __ bind(&miss); | 3912 __ bind(&miss); |
3913 } | 3913 } |
3914 | 3914 |
3915 // Get the prototype of the function. | 3915 // Get the prototype of the function. |
3916 __ TryGetFunctionPrototype(function, prototype, scratch, &slow); | 3916 __ TryGetFunctionPrototype(function, prototype, scratch, &slow, true); |
3917 | 3917 |
3918 // Check that the function prototype is a JS object. | 3918 // Check that the function prototype is a JS object. |
3919 __ JumpIfSmi(prototype, &slow); | 3919 __ JumpIfSmi(prototype, &slow); |
3920 __ IsObjectJSObjectType(prototype, scratch, scratch, &slow); | 3920 __ IsObjectJSObjectType(prototype, scratch, scratch, &slow); |
3921 | 3921 |
3922 // Update the global instanceof or call site inlined cache with the current | 3922 // Update the global instanceof or call site inlined cache with the current |
3923 // map and function. The cached answer will be set when it is known below. | 3923 // map and function. The cached answer will be set when it is known below. |
3924 if (!HasCallSiteInlineCheck()) { | 3924 if (!HasCallSiteInlineCheck()) { |
3925 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex); | 3925 __ StoreRoot(function, Heap::kInstanceofCacheFunctionRootIndex); |
3926 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex); | 3926 __ StoreRoot(map, Heap::kInstanceofCacheMapRootIndex); |
(...skipping 3235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7162 | 7162 |
7163 // Fall through when we need to inform the incremental marker. | 7163 // Fall through when we need to inform the incremental marker. |
7164 } | 7164 } |
7165 | 7165 |
7166 | 7166 |
7167 #undef __ | 7167 #undef __ |
7168 | 7168 |
7169 } } // namespace v8::internal | 7169 } } // namespace v8::internal |
7170 | 7170 |
7171 #endif // V8_TARGET_ARCH_ARM | 7171 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |