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 4512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4523 cmpq(map_in_out, FieldOperand(scratch, offset)); | 4523 cmpq(map_in_out, FieldOperand(scratch, offset)); |
4524 j(not_equal, no_map_match); | 4524 j(not_equal, no_map_match); |
4525 | 4525 |
4526 // Use the transitioned cached map. | 4526 // Use the transitioned cached map. |
4527 offset = transitioned_kind * kPointerSize + | 4527 offset = transitioned_kind * kPointerSize + |
4528 FixedArrayBase::kHeaderSize; | 4528 FixedArrayBase::kHeaderSize; |
4529 movp(map_in_out, FieldOperand(scratch, offset)); | 4529 movp(map_in_out, FieldOperand(scratch, offset)); |
4530 } | 4530 } |
4531 | 4531 |
4532 | 4532 |
4533 void MacroAssembler::LoadInitialArrayMap( | |
4534 Register function_in, Register scratch, | |
4535 Register map_out, bool can_have_holes) { | |
4536 ASSERT(!function_in.is(map_out)); | |
4537 Label done; | |
4538 movp(map_out, FieldOperand(function_in, | |
4539 JSFunction::kPrototypeOrInitialMapOffset)); | |
4540 if (!FLAG_smi_only_arrays) { | |
4541 ElementsKind kind = can_have_holes ? FAST_HOLEY_ELEMENTS : FAST_ELEMENTS; | |
4542 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | |
4543 kind, | |
4544 map_out, | |
4545 scratch, | |
4546 &done); | |
4547 } else if (can_have_holes) { | |
4548 LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, | |
4549 FAST_HOLEY_SMI_ELEMENTS, | |
4550 map_out, | |
4551 scratch, | |
4552 &done); | |
4553 } | |
4554 bind(&done); | |
4555 } | |
4556 | |
4557 #ifdef _WIN64 | 4533 #ifdef _WIN64 |
4558 static const int kRegisterPassedArguments = 4; | 4534 static const int kRegisterPassedArguments = 4; |
4559 #else | 4535 #else |
4560 static const int kRegisterPassedArguments = 6; | 4536 static const int kRegisterPassedArguments = 6; |
4561 #endif | 4537 #endif |
4562 | 4538 |
4563 void MacroAssembler::LoadGlobalFunction(int index, Register function) { | 4539 void MacroAssembler::LoadGlobalFunction(int index, Register function) { |
4564 // Load the global or builtins object from the current context. | 4540 // Load the global or builtins object from the current context. |
4565 movp(function, | 4541 movp(function, |
4566 Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 4542 Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5008 j(equal, found); | 4984 j(equal, found); |
5009 movp(current, FieldOperand(current, Map::kPrototypeOffset)); | 4985 movp(current, FieldOperand(current, Map::kPrototypeOffset)); |
5010 CompareRoot(current, Heap::kNullValueRootIndex); | 4986 CompareRoot(current, Heap::kNullValueRootIndex); |
5011 j(not_equal, &loop_again); | 4987 j(not_equal, &loop_again); |
5012 } | 4988 } |
5013 | 4989 |
5014 | 4990 |
5015 } } // namespace v8::internal | 4991 } } // namespace v8::internal |
5016 | 4992 |
5017 #endif // V8_TARGET_ARCH_X64 | 4993 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |