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 4854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4865 scratch, times_pointer_size, roots_address)); | 4865 scratch, times_pointer_size, roots_address)); |
4866 __ j(not_equal, &miss, Label::kNear); | 4866 __ j(not_equal, &miss, Label::kNear); |
4867 __ mov(scratch, Immediate(Heap::kInstanceofCacheAnswerRootIndex)); | 4867 __ mov(scratch, Immediate(Heap::kInstanceofCacheAnswerRootIndex)); |
4868 __ mov(eax, Operand::StaticArray( | 4868 __ mov(eax, Operand::StaticArray( |
4869 scratch, times_pointer_size, roots_address)); | 4869 scratch, times_pointer_size, roots_address)); |
4870 __ ret((HasArgsInRegisters() ? 0 : 2) * kPointerSize); | 4870 __ ret((HasArgsInRegisters() ? 0 : 2) * kPointerSize); |
4871 __ bind(&miss); | 4871 __ bind(&miss); |
4872 } | 4872 } |
4873 | 4873 |
4874 // Get the prototype of the function. | 4874 // Get the prototype of the function. |
4875 __ TryGetFunctionPrototype(function, prototype, scratch, &slow); | 4875 __ TryGetFunctionPrototype(function, prototype, scratch, &slow, true); |
4876 | 4876 |
4877 // Check that the function prototype is a JS object. | 4877 // Check that the function prototype is a JS object. |
4878 __ JumpIfSmi(prototype, &slow); | 4878 __ JumpIfSmi(prototype, &slow); |
4879 __ IsObjectJSObjectType(prototype, scratch, scratch, &slow); | 4879 __ IsObjectJSObjectType(prototype, scratch, scratch, &slow); |
4880 | 4880 |
4881 // Update the global instanceof or call site inlined cache with the current | 4881 // Update the global instanceof or call site inlined cache with the current |
4882 // map and function. The cached answer will be set when it is known below. | 4882 // map and function. The cached answer will be set when it is known below. |
4883 if (!HasCallSiteInlineCheck()) { | 4883 if (!HasCallSiteInlineCheck()) { |
4884 __ mov(scratch, Immediate(Heap::kInstanceofCacheMapRootIndex)); | 4884 __ mov(scratch, Immediate(Heap::kInstanceofCacheMapRootIndex)); |
4885 __ mov(Operand::StaticArray(scratch, times_pointer_size, roots_address), map); | 4885 __ mov(Operand::StaticArray(scratch, times_pointer_size, roots_address), map); |
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6992 | 6992 |
6993 // Fall through when we need to inform the incremental marker. | 6993 // Fall through when we need to inform the incremental marker. |
6994 } | 6994 } |
6995 | 6995 |
6996 | 6996 |
6997 #undef __ | 6997 #undef __ |
6998 | 6998 |
6999 } } // namespace v8::internal | 6999 } } // namespace v8::internal |
7000 | 7000 |
7001 #endif // V8_TARGET_ARCH_IA32 | 7001 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |