| 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 3486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3497 ASSERT(HasArgsInRegisters()); | 3497 ASSERT(HasArgsInRegisters()); |
| 3498 // Patch the (relocated) inlined map check. | 3498 // Patch the (relocated) inlined map check. |
| 3499 | 3499 |
| 3500 // The offset was stored in r4 safepoint slot. | 3500 // The offset was stored in r4 safepoint slot. |
| 3501 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal) | 3501 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal) |
| 3502 __ LoadFromSafepointRegisterSlot(scratch, r4); | 3502 __ LoadFromSafepointRegisterSlot(scratch, r4); |
| 3503 __ sub(inline_site, lr, scratch); | 3503 __ sub(inline_site, lr, scratch); |
| 3504 // Get the map location in scratch and patch it. | 3504 // Get the map location in scratch and patch it. |
| 3505 __ GetRelocatedValueLocation(inline_site, scratch); | 3505 __ GetRelocatedValueLocation(inline_site, scratch); |
| 3506 __ ldr(scratch, MemOperand(scratch)); | 3506 __ ldr(scratch, MemOperand(scratch)); |
| 3507 __ str(map, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 3507 __ str(map, FieldMemOperand(scratch, Cell::kValueOffset)); |
| 3508 } | 3508 } |
| 3509 | 3509 |
| 3510 // Register mapping: r3 is object map and r4 is function prototype. | 3510 // Register mapping: r3 is object map and r4 is function prototype. |
| 3511 // Get prototype of object into r2. | 3511 // Get prototype of object into r2. |
| 3512 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); | 3512 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); |
| 3513 | 3513 |
| 3514 // We don't need map any more. Use it as a scratch register. | 3514 // We don't need map any more. Use it as a scratch register. |
| 3515 Register scratch2 = map; | 3515 Register scratch2 = map; |
| 3516 map = no_reg; | 3516 map = no_reg; |
| 3517 | 3517 |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4630 // r1 : the function to call | 4630 // r1 : the function to call |
| 4631 // r2 : cache cell for call target | 4631 // r2 : cache cell for call target |
| 4632 Label done; | 4632 Label done; |
| 4633 | 4633 |
| 4634 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), | 4634 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), |
| 4635 masm->isolate()->heap()->undefined_value()); | 4635 masm->isolate()->heap()->undefined_value()); |
| 4636 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), | 4636 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), |
| 4637 masm->isolate()->heap()->the_hole_value()); | 4637 masm->isolate()->heap()->the_hole_value()); |
| 4638 | 4638 |
| 4639 // Load the cache state into r3. | 4639 // Load the cache state into r3. |
| 4640 __ ldr(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 4640 __ ldr(r3, FieldMemOperand(r2, Cell::kValueOffset)); |
| 4641 | 4641 |
| 4642 // A monomorphic cache hit or an already megamorphic state: invoke the | 4642 // A monomorphic cache hit or an already megamorphic state: invoke the |
| 4643 // function without changing the state. | 4643 // function without changing the state. |
| 4644 __ cmp(r3, r1); | 4644 __ cmp(r3, r1); |
| 4645 __ b(eq, &done); | 4645 __ b(eq, &done); |
| 4646 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); | 4646 __ CompareRoot(r3, Heap::kUndefinedValueRootIndex); |
| 4647 __ b(eq, &done); | 4647 __ b(eq, &done); |
| 4648 | 4648 |
| 4649 // A monomorphic miss (i.e, here the cache is not uninitialized) goes | 4649 // A monomorphic miss (i.e, here the cache is not uninitialized) goes |
| 4650 // megamorphic. | 4650 // megamorphic. |
| 4651 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); | 4651 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); |
| 4652 // MegamorphicSentinel is an immortal immovable object (undefined) so no | 4652 // MegamorphicSentinel is an immortal immovable object (undefined) so no |
| 4653 // write-barrier is needed. | 4653 // write-barrier is needed. |
| 4654 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex, ne); | 4654 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex, ne); |
| 4655 __ str(ip, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset), ne); | 4655 __ str(ip, FieldMemOperand(r2, Cell::kValueOffset), ne); |
| 4656 | 4656 |
| 4657 // An uninitialized cache is patched with the function. | 4657 // An uninitialized cache is patched with the function. |
| 4658 __ str(r1, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset), eq); | 4658 __ str(r1, FieldMemOperand(r2, Cell::kValueOffset), eq); |
| 4659 // No need for a write barrier here - cells are rescanned. | 4659 // No need for a write barrier here - cells are rescanned. |
| 4660 | 4660 |
| 4661 __ bind(&done); | 4661 __ bind(&done); |
| 4662 } | 4662 } |
| 4663 | 4663 |
| 4664 | 4664 |
| 4665 static void GenerateRecordCallTarget(MacroAssembler* masm) { | 4665 static void GenerateRecordCallTarget(MacroAssembler* masm) { |
| 4666 // Cache the called function in a global property cell. Cache states | 4666 // Cache the called function in a global property cell. Cache states |
| 4667 // are uninitialized, monomorphic (indicated by a JSFunction), and | 4667 // are uninitialized, monomorphic (indicated by a JSFunction), and |
| 4668 // megamorphic. | 4668 // megamorphic. |
| 4669 // r1 : the function to call | 4669 // r1 : the function to call |
| 4670 // r2 : cache cell for call target | 4670 // r2 : cache cell for call target |
| 4671 ASSERT(FLAG_optimize_constructed_arrays); | 4671 ASSERT(FLAG_optimize_constructed_arrays); |
| 4672 Label initialize, done, miss, megamorphic, not_array_function; | 4672 Label initialize, done, miss, megamorphic, not_array_function; |
| 4673 | 4673 |
| 4674 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), | 4674 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), |
| 4675 masm->isolate()->heap()->undefined_value()); | 4675 masm->isolate()->heap()->undefined_value()); |
| 4676 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), | 4676 ASSERT_EQ(*TypeFeedbackCells::UninitializedSentinel(masm->isolate()), |
| 4677 masm->isolate()->heap()->the_hole_value()); | 4677 masm->isolate()->heap()->the_hole_value()); |
| 4678 | 4678 |
| 4679 // Load the cache state into r3. | 4679 // Load the cache state into r3. |
| 4680 __ ldr(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 4680 __ ldr(r3, FieldMemOperand(r2, Cell::kValueOffset)); |
| 4681 | 4681 |
| 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 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 4704 __ bind(&miss); | 4704 __ bind(&miss); |
| 4705 | 4705 |
| 4706 // A monomorphic miss (i.e, here the cache is not uninitialized) goes | 4706 // A monomorphic miss (i.e, here the cache is not uninitialized) goes |
| 4707 // megamorphic. | 4707 // megamorphic. |
| 4708 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); | 4708 __ CompareRoot(r3, Heap::kTheHoleValueRootIndex); |
| 4709 __ b(eq, &initialize); | 4709 __ b(eq, &initialize); |
| 4710 // MegamorphicSentinel is an immortal immovable object (undefined) so no | 4710 // MegamorphicSentinel is an immortal immovable object (undefined) so no |
| 4711 // write-barrier is needed. | 4711 // write-barrier is needed. |
| 4712 __ bind(&megamorphic); | 4712 __ bind(&megamorphic); |
| 4713 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 4713 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
| 4714 __ str(ip, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 4714 __ str(ip, FieldMemOperand(r2, Cell::kValueOffset)); |
| 4715 __ jmp(&done); | 4715 __ jmp(&done); |
| 4716 | 4716 |
| 4717 // An uninitialized cache is patched with the function or sentinel to | 4717 // An uninitialized cache is patched with the function or sentinel to |
| 4718 // indicate the ElementsKind if function is the Array constructor. | 4718 // indicate the ElementsKind if function is the Array constructor. |
| 4719 __ bind(&initialize); | 4719 __ bind(&initialize); |
| 4720 // Make sure the function is the Array() function | 4720 // Make sure the function is the Array() function |
| 4721 __ LoadArrayFunction(r3); | 4721 __ LoadArrayFunction(r3); |
| 4722 __ cmp(r1, r3); | 4722 __ cmp(r1, r3); |
| 4723 __ b(ne, ¬_array_function); | 4723 __ b(ne, ¬_array_function); |
| 4724 | 4724 |
| 4725 // The target function is the Array constructor, install a sentinel value in | 4725 // The target function is the Array constructor, install a sentinel value in |
| 4726 // the constructor's type info cell that will track the initial ElementsKind | 4726 // the constructor's type info cell that will track the initial ElementsKind |
| 4727 // that should be used for the array when its constructed. | 4727 // that should be used for the array when its constructed. |
| 4728 Handle<Object> initial_kind_sentinel = | 4728 Handle<Object> initial_kind_sentinel = |
| 4729 TypeFeedbackCells::MonomorphicArraySentinel(masm->isolate(), | 4729 TypeFeedbackCells::MonomorphicArraySentinel(masm->isolate(), |
| 4730 GetInitialFastElementsKind()); | 4730 GetInitialFastElementsKind()); |
| 4731 __ mov(r3, Operand(initial_kind_sentinel)); | 4731 __ mov(r3, Operand(initial_kind_sentinel)); |
| 4732 __ str(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 4732 __ str(r3, FieldMemOperand(r2, Cell::kValueOffset)); |
| 4733 __ b(&done); | 4733 __ b(&done); |
| 4734 | 4734 |
| 4735 __ bind(¬_array_function); | 4735 __ bind(¬_array_function); |
| 4736 __ str(r1, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 4736 __ str(r1, FieldMemOperand(r2, Cell::kValueOffset)); |
| 4737 // No need for a write barrier here - cells are rescanned. | 4737 // No need for a write barrier here - cells are rescanned. |
| 4738 | 4738 |
| 4739 __ bind(&done); | 4739 __ bind(&done); |
| 4740 } | 4740 } |
| 4741 | 4741 |
| 4742 | 4742 |
| 4743 void CallFunctionStub::Generate(MacroAssembler* masm) { | 4743 void CallFunctionStub::Generate(MacroAssembler* masm) { |
| 4744 // r1 : the function to call | 4744 // r1 : the function to call |
| 4745 // r2 : cache cell for call target | 4745 // r2 : cache cell for call target |
| 4746 Label slow, non_function; | 4746 Label slow, non_function; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4802 | 4802 |
| 4803 // Slow-case: Non-function called. | 4803 // Slow-case: Non-function called. |
| 4804 __ bind(&slow); | 4804 __ bind(&slow); |
| 4805 if (RecordCallTarget()) { | 4805 if (RecordCallTarget()) { |
| 4806 // If there is a call target cache, mark it megamorphic in the | 4806 // If there is a call target cache, mark it megamorphic in the |
| 4807 // non-function case. MegamorphicSentinel is an immortal immovable | 4807 // non-function case. MegamorphicSentinel is an immortal immovable |
| 4808 // object (undefined) so no write barrier is needed. | 4808 // object (undefined) so no write barrier is needed. |
| 4809 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), | 4809 ASSERT_EQ(*TypeFeedbackCells::MegamorphicSentinel(masm->isolate()), |
| 4810 masm->isolate()->heap()->undefined_value()); | 4810 masm->isolate()->heap()->undefined_value()); |
| 4811 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 4811 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
| 4812 __ str(ip, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 4812 __ str(ip, FieldMemOperand(r2, Cell::kValueOffset)); |
| 4813 } | 4813 } |
| 4814 // Check for function proxy. | 4814 // Check for function proxy. |
| 4815 __ cmp(r3, Operand(JS_FUNCTION_PROXY_TYPE)); | 4815 __ cmp(r3, Operand(JS_FUNCTION_PROXY_TYPE)); |
| 4816 __ b(ne, &non_function); | 4816 __ b(ne, &non_function); |
| 4817 __ push(r1); // put proxy as additional argument | 4817 __ push(r1); // put proxy as additional argument |
| 4818 __ mov(r0, Operand(argc_ + 1, RelocInfo::NONE32)); | 4818 __ mov(r0, Operand(argc_ + 1, RelocInfo::NONE32)); |
| 4819 __ mov(r2, Operand::Zero()); | 4819 __ mov(r2, Operand::Zero()); |
| 4820 __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); | 4820 __ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); |
| 4821 __ SetCallKind(r5, CALL_AS_METHOD); | 4821 __ SetCallKind(r5, CALL_AS_METHOD); |
| 4822 { | 4822 { |
| (...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6475 __ Jump(r2); | 6475 __ Jump(r2); |
| 6476 } | 6476 } |
| 6477 | 6477 |
| 6478 | 6478 |
| 6479 void DirectCEntryStub::Generate(MacroAssembler* masm) { | 6479 void DirectCEntryStub::Generate(MacroAssembler* masm) { |
| 6480 __ ldr(pc, MemOperand(sp, 0)); | 6480 __ ldr(pc, MemOperand(sp, 0)); |
| 6481 } | 6481 } |
| 6482 | 6482 |
| 6483 | 6483 |
| 6484 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, | 6484 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, |
| 6485 ExternalReference function) { | |
| 6486 __ mov(r2, Operand(function)); | |
| 6487 GenerateCall(masm, r2); | |
| 6488 } | |
| 6489 | |
| 6490 | |
| 6491 void DirectCEntryStub::GenerateCall(MacroAssembler* masm, | |
| 6492 Register target) { | 6485 Register target) { |
| 6493 intptr_t code = | 6486 intptr_t code = |
| 6494 reinterpret_cast<intptr_t>(GetCode(masm->isolate()).location()); | 6487 reinterpret_cast<intptr_t>(GetCode(masm->isolate()).location()); |
| 6495 __ mov(lr, Operand(code, RelocInfo::CODE_TARGET)); | 6488 __ mov(lr, Operand(code, RelocInfo::CODE_TARGET)); |
| 6496 | 6489 |
| 6497 // Prevent literal pool emission during calculation of return address. | 6490 // Prevent literal pool emission during calculation of return address. |
| 6498 Assembler::BlockConstPoolScope block_const_pool(masm); | 6491 Assembler::BlockConstPoolScope block_const_pool(masm); |
| 6499 | 6492 |
| 6500 // Push return address (accessible to GC through exit frame pc). | 6493 // Push return address (accessible to GC through exit frame pc). |
| 6501 // Note that using pc with str is deprecated. | 6494 // Note that using pc with str is deprecated. |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7055 | 7048 |
| 7056 __ bind(&need_incremental); | 7049 __ bind(&need_incremental); |
| 7057 | 7050 |
| 7058 // Fall through when we need to inform the incremental marker. | 7051 // Fall through when we need to inform the incremental marker. |
| 7059 } | 7052 } |
| 7060 | 7053 |
| 7061 | 7054 |
| 7062 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { | 7055 void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { |
| 7063 // ----------- S t a t e ------------- | 7056 // ----------- S t a t e ------------- |
| 7064 // -- r0 : element value to store | 7057 // -- r0 : element value to store |
| 7065 // -- r1 : array literal | |
| 7066 // -- r2 : map of array literal | |
| 7067 // -- r3 : element index as smi | 7058 // -- r3 : element index as smi |
| 7068 // -- r4 : array literal index in function as smi | 7059 // -- sp[0] : array literal index in function as smi |
| 7060 // -- sp[4] : array literal |
| 7061 // clobbers r1, r2, r4 |
| 7069 // ----------------------------------- | 7062 // ----------------------------------- |
| 7070 | 7063 |
| 7071 Label element_done; | 7064 Label element_done; |
| 7072 Label double_elements; | 7065 Label double_elements; |
| 7073 Label smi_element; | 7066 Label smi_element; |
| 7074 Label slow_elements; | 7067 Label slow_elements; |
| 7075 Label fast_elements; | 7068 Label fast_elements; |
| 7076 | 7069 |
| 7070 // Get array literal index, array literal and its map. |
| 7071 __ ldr(r4, MemOperand(sp, 0 * kPointerSize)); |
| 7072 __ ldr(r1, MemOperand(sp, 1 * kPointerSize)); |
| 7073 __ ldr(r2, FieldMemOperand(r1, JSObject::kMapOffset)); |
| 7074 |
| 7077 __ CheckFastElements(r2, r5, &double_elements); | 7075 __ CheckFastElements(r2, r5, &double_elements); |
| 7078 // FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS | 7076 // FAST_*_SMI_ELEMENTS or FAST_*_ELEMENTS |
| 7079 __ JumpIfSmi(r0, &smi_element); | 7077 __ JumpIfSmi(r0, &smi_element); |
| 7080 __ CheckFastSmiElements(r2, r5, &fast_elements); | 7078 __ CheckFastSmiElements(r2, r5, &fast_elements); |
| 7081 | 7079 |
| 7082 // Store into the array literal requires a elements transition. Call into | 7080 // Store into the array literal requires a elements transition. Call into |
| 7083 // the runtime. | 7081 // the runtime. |
| 7084 __ bind(&slow_elements); | 7082 __ bind(&slow_elements); |
| 7085 // call. | 7083 // call. |
| 7086 __ Push(r1, r3, r0); | 7084 __ Push(r1, r3, r0); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7325 // builtin Array functions which always have maps. | 7323 // builtin Array functions which always have maps. |
| 7326 | 7324 |
| 7327 // Initial map for the builtin Array function should be a map. | 7325 // Initial map for the builtin Array function should be a map. |
| 7328 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); | 7326 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); |
| 7329 // Will both indicate a NULL and a Smi. | 7327 // Will both indicate a NULL and a Smi. |
| 7330 __ tst(r3, Operand(kSmiTagMask)); | 7328 __ tst(r3, Operand(kSmiTagMask)); |
| 7331 __ Assert(ne, "Unexpected initial map for Array function"); | 7329 __ Assert(ne, "Unexpected initial map for Array function"); |
| 7332 __ CompareObjectType(r3, r3, r4, MAP_TYPE); | 7330 __ CompareObjectType(r3, r3, r4, MAP_TYPE); |
| 7333 __ Assert(eq, "Unexpected initial map for Array function"); | 7331 __ Assert(eq, "Unexpected initial map for Array function"); |
| 7334 | 7332 |
| 7335 // We should either have undefined in ebx or a valid jsglobalpropertycell | 7333 // We should either have undefined in ebx or a valid cell |
| 7336 Label okay_here; | 7334 Label okay_here; |
| 7337 Handle<Map> global_property_cell_map( | 7335 Handle<Map> cell_map = masm->isolate()->factory()->cell_map(); |
| 7338 masm->isolate()->heap()->global_property_cell_map()); | |
| 7339 __ cmp(r2, Operand(undefined_sentinel)); | 7336 __ cmp(r2, Operand(undefined_sentinel)); |
| 7340 __ b(eq, &okay_here); | 7337 __ b(eq, &okay_here); |
| 7341 __ ldr(r3, FieldMemOperand(r2, 0)); | 7338 __ ldr(r3, FieldMemOperand(r2, 0)); |
| 7342 __ cmp(r3, Operand(global_property_cell_map)); | 7339 __ cmp(r3, Operand(cell_map)); |
| 7343 __ Assert(eq, "Expected property cell in register ebx"); | 7340 __ Assert(eq, "Expected property cell in register ebx"); |
| 7344 __ bind(&okay_here); | 7341 __ bind(&okay_here); |
| 7345 } | 7342 } |
| 7346 | 7343 |
| 7347 if (FLAG_optimize_constructed_arrays) { | 7344 if (FLAG_optimize_constructed_arrays) { |
| 7348 Label no_info, switch_ready; | 7345 Label no_info, switch_ready; |
| 7349 // Get the elements kind and case on that. | 7346 // Get the elements kind and case on that. |
| 7350 __ cmp(r2, Operand(undefined_sentinel)); | 7347 __ cmp(r2, Operand(undefined_sentinel)); |
| 7351 __ b(eq, &no_info); | 7348 __ b(eq, &no_info); |
| 7352 __ ldr(r3, FieldMemOperand(r2, JSGlobalPropertyCell::kValueOffset)); | 7349 __ ldr(r3, FieldMemOperand(r2, PropertyCell::kValueOffset)); |
| 7353 __ JumpIfNotSmi(r3, &no_info); | 7350 __ JumpIfNotSmi(r3, &no_info); |
| 7354 __ SmiUntag(r3); | 7351 __ SmiUntag(r3); |
| 7355 __ jmp(&switch_ready); | 7352 __ jmp(&switch_ready); |
| 7356 __ bind(&no_info); | 7353 __ bind(&no_info); |
| 7357 __ mov(r3, Operand(GetInitialFastElementsKind())); | 7354 __ mov(r3, Operand(GetInitialFastElementsKind())); |
| 7358 __ bind(&switch_ready); | 7355 __ bind(&switch_ready); |
| 7359 | 7356 |
| 7360 if (argument_count_ == ANY) { | 7357 if (argument_count_ == ANY) { |
| 7361 Label not_zero_case, not_one_case; | 7358 Label not_zero_case, not_one_case; |
| 7362 __ tst(r0, r0); | 7359 __ tst(r0, r0); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7491 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7488 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7492 } | 7489 } |
| 7493 } | 7490 } |
| 7494 | 7491 |
| 7495 | 7492 |
| 7496 #undef __ | 7493 #undef __ |
| 7497 | 7494 |
| 7498 } } // namespace v8::internal | 7495 } } // namespace v8::internal |
| 7499 | 7496 |
| 7500 #endif // V8_TARGET_ARCH_ARM | 7497 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |