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::LoadGlobalContext(Register global_context) { | |
2693 // Load the global or builtins object from the current context. | |
2694 mov(global_context, | |
2695 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | |
2696 // Load the native context from the global or builtins object. | |
2697 mov(global_context, | |
2698 FieldOperand(global_context, GlobalObject::kNativeContextOffset)); | |
2699 } | |
2700 | |
2701 | |
2702 void MacroAssembler::LoadGlobalFunction(int index, Register function) { | 2692 void MacroAssembler::LoadGlobalFunction(int index, Register function) { |
2703 // Load the global or builtins object from the current context. | 2693 // Load the global or builtins object from the current context. |
2704 mov(function, | 2694 mov(function, |
2705 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 2695 Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
2706 // Load the native context from the global or builtins object. | 2696 // Load the native context from the global or builtins object. |
2707 mov(function, | 2697 mov(function, |
2708 FieldOperand(function, GlobalObject::kNativeContextOffset)); | 2698 FieldOperand(function, GlobalObject::kNativeContextOffset)); |
2709 // Load the function from the native context. | 2699 // Load the function from the native context. |
2710 mov(function, Operand(function, Context::SlotOffset(index))); | 2700 mov(function, Operand(function, Context::SlotOffset(index))); |
2711 } | 2701 } |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3609 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); | 3599 cmp(scratch1, Immediate(DICTIONARY_ELEMENTS)); |
3610 j(equal, found); | 3600 j(equal, found); |
3611 mov(current, FieldOperand(current, Map::kPrototypeOffset)); | 3601 mov(current, FieldOperand(current, Map::kPrototypeOffset)); |
3612 cmp(current, Immediate(factory->null_value())); | 3602 cmp(current, Immediate(factory->null_value())); |
3613 j(not_equal, &loop_again); | 3603 j(not_equal, &loop_again); |
3614 } | 3604 } |
3615 | 3605 |
3616 } } // namespace v8::internal | 3606 } } // namespace v8::internal |
3617 | 3607 |
3618 #endif // V8_TARGET_ARCH_IA32 | 3608 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |