| 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 2671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2682 cmp(map_in_out, FieldOperand(scratch, offset)); | 2682 cmp(map_in_out, FieldOperand(scratch, offset)); |
| 2683 j(not_equal, no_map_match); | 2683 j(not_equal, no_map_match); |
| 2684 | 2684 |
| 2685 // Use the transitioned cached map. | 2685 // Use the transitioned cached map. |
| 2686 offset = transitioned_kind * kPointerSize + | 2686 offset = transitioned_kind * kPointerSize + |
| 2687 FixedArrayBase::kHeaderSize; | 2687 FixedArrayBase::kHeaderSize; |
| 2688 mov(map_in_out, FieldOperand(scratch, offset)); | 2688 mov(map_in_out, FieldOperand(scratch, offset)); |
| 2689 } | 2689 } |
| 2690 | 2690 |
| 2691 | 2691 |
| 2692 void MacroAssembler::LoadInitialArrayMap( | |
| 2693 Register function_in, Register scratch, | |
| 2694 Register map_out, bool can_have_holes) { | |
| 2695 ASSERT(!function_in.is(map_out)); | |
| 2696 Label done; | |
| 2697 mov(map_out, FieldOperand(function_in, | |
| 2698 JSFunction::kPrototypeOrInitialMapOffset)); | |
| 2699 if (!FLAG_smi_only_arrays) { | |
| 2700 ElementsKind kind = can_have_holes ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS; | |
| 2701 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | |
| 2702 kind, | |
| 2703 map_out, | |
| 2704 scratch, | |
| 2705 &done); | |
| 2706 } else if (can_have_holes) { | |
| 2707 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | |
| 2708 FAST_HOLEY_SMI_ELEMENTS, | |
| 2709 map_out, | |
| 2710 scratch, | |
| 2711 &done); | |
| 2712 } | |
| 2713 bind(&done); | |
| 2714 } | |
| 2715 | |
| 2716 | |
| 2717 void MacroAssembler::LoadGlobalContext(Register global_context) { | 2692 void MacroAssembler::LoadGlobalContext(Register global_context) { |
| 2718 // Load the global or builtins object from the current context. | 2693 // Load the global or builtins object from the current context. |
| 2719 mov(global_context, | 2694 mov(global_context, |
| 2720 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 2695 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
| 2721 // Load the native context from the global or builtins object. | 2696 // Load the native context from the global or builtins object. |
| 2722 mov(global_context, | 2697 mov(global_context, |
| 2723 FieldOperand(global_context, GlobalObject::kNativeContextOffset)); | 2698 FieldOperand(global_context, GlobalObject::kNativeContextOffset)); |
| 2724 } | 2699 } |
| 2725 | 2700 |
| 2726 | 2701 |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3634 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); | 3609 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); |
| 3635 j(equal, found); | 3610 j(equal, found); |
| 3636 mov(current, FieldOperand(current, Map::kPrototypeOffset)); | 3611 mov(current, FieldOperand(current, Map::kPrototypeOffset)); |
| 3637 cmp(current, Immediate(factory->null_value())); | 3612 cmp(current, Immediate(factory->null_value())); |
| 3638 j(not_equal, &loop_again); | 3613 j(not_equal, &loop_again); |
| 3639 } | 3614 } |
| 3640 | 3615 |
| 3641 } } // namespace v8::internal | 3616 } } // namespace v8::internal |
| 3642 | 3617 |
| 3643 #endif // V8_TARGET_ARCH_IA32 | 3618 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |