Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 4671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4682 // A monomorphic cache hit or an already megamorphic state: invoke the | 4682 // A monomorphic cache hit or an already megamorphic state: invoke the |
| 4683 // function without changing the state. | 4683 // function without changing the state. |
| 4684 __ cmp(r3, r1); | 4684 __ cmp(r3, r1); |
| 4685 __ b(eq, &done); | 4685 __ b(eq, &done); |
| 4686 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); | 4686 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); |
| 4687 __ b(eq, &done); | 4687 __ b(eq, &done); |
| 4688 | 4688 |
| 4689 // Special handling of the Array() function, which caches not only the | 4689 // Special handling of the Array() function, which caches not only the |
| 4690 // monomorphic Array function but the initial ElementsKind with special | 4690 // monomorphic Array function but the initial ElementsKind with special |
| 4691 // sentinels | 4691 // sentinels |
| 4692 Handle<Object> terminal_kind_sentinel = | |
| 4693 TypeFeedbackCells::MonomorphicArraySentinel(masm->isolate(), | |
| 4694 LAST_FAST_ELEMENTS_KIND); | |
| 4695 __ JumpIfNotSmi(r3, &miss); | 4692 __ JumpIfNotSmi(r3, &miss); |
| 4696 __ cmp(r3, Operand(terminal_kind_sentinel)); | |
|
danno
2013/06/13 15:19:44
How about you turn this into:
if (FLAG_debug_co
| |
| 4697 __ b(gt, &miss); | |
| 4698 // Make sure the function is the Array() function | 4693 // Make sure the function is the Array() function |
| 4699 __ LoadArrayFunction(r3); | 4694 __ LoadArrayFunction(r3); |
| 4700 __ cmp(r1, r3); | 4695 __ cmp(r1, r3); |
| 4701 __ b(ne, &megamorphic); | 4696 __ b(ne, &megamorphic); |
| 4702 __ jmp(&done); | 4697 __ jmp(&done); |
| 4703 | 4698 |
| 4704 __ bind(&miss); | 4699 __ bind(&miss); |
| 4705 | 4700 |
| 4706 // A monomorphic miss (i.e, here the cache is not uninitialized) goes | 4701 // A monomorphic miss (i.e, here the cache is not uninitialized) goes |
| 4707 // megamorphic. | 4702 // megamorphic. |
| (...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7490 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7485 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7491 } | 7486 } |
| 7492 } | 7487 } |
| 7493 | 7488 |
| 7494 | 7489 |
| 7495 #undef __ | 7490 #undef __ |
| 7496 | 7491 |
| 7497 } } // namespace v8::internal | 7492 } } // namespace v8::internal |
| 7498 | 7493 |
| 7499 #endif // V8_TARGET_ARCH_ARM | 7494 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |