| OLD | NEW | 
|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 668 | 668 | 
| 669     // TODO(all): Add support for stop_t FLAG in DEBUG mode. | 669     // TODO(all): Add support for stop_t FLAG in DEBUG mode. | 
| 670 | 670 | 
| 671     // Classic mode functions and builtins need to replace the receiver with the | 671     // Classic mode functions and builtins need to replace the receiver with the | 
| 672     // global proxy when called as functions (without an explicit receiver | 672     // global proxy when called as functions (without an explicit receiver | 
| 673     // object). | 673     // object). | 
| 674     if (info_->this_has_uses() && | 674     if (info_->this_has_uses() && | 
| 675         info_->is_classic_mode() && | 675         info_->is_classic_mode() && | 
| 676         !info_->is_native()) { | 676         !info_->is_native()) { | 
| 677       Label ok; | 677       Label ok; | 
| 678       int receiver_offset = info_->scope()->num_parameters() * kXRegSizeInBytes; | 678       int receiver_offset = info_->scope()->num_parameters() * kXRegSize; | 
| 679       __ Peek(x10, receiver_offset); | 679       __ Peek(x10, receiver_offset); | 
| 680       __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | 680       __ JumpIfNotRoot(x10, Heap::kUndefinedValueRootIndex, &ok); | 
| 681 | 681 | 
| 682       __ Ldr(x10, GlobalObjectMemOperand()); | 682       __ Ldr(x10, GlobalObjectMemOperand()); | 
| 683       __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalReceiverOffset)); | 683       __ Ldr(x10, FieldMemOperand(x10, GlobalObject::kGlobalReceiverOffset)); | 
| 684       __ Poke(x10, receiver_offset); | 684       __ Poke(x10, receiver_offset); | 
| 685 | 685 | 
| 686       __ Bind(&ok); | 686       __ Bind(&ok); | 
| 687     } | 687     } | 
| 688   } | 688   } | 
| (...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2856 } | 2856 } | 
| 2857 | 2857 | 
| 2858 | 2858 | 
| 2859 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { | 2859 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { | 
| 2860   Register input = ToRegister(instr->value()); | 2860   Register input = ToRegister(instr->value()); | 
| 2861   Register result = ToRegister(instr->result()); | 2861   Register result = ToRegister(instr->result()); | 
| 2862 | 2862 | 
| 2863   __ AssertString(input); | 2863   __ AssertString(input); | 
| 2864 | 2864 | 
| 2865   // Assert that we can use a W register load to get the hash. | 2865   // Assert that we can use a W register load to get the hash. | 
| 2866   ASSERT((String::kHashShift + String::kArrayIndexValueBits) < kWRegSize); | 2866   ASSERT((String::kHashShift + String::kArrayIndexValueBits) < kWRegSizeInBits); | 
| 2867   __ Ldr(result.W(), FieldMemOperand(input, String::kHashFieldOffset)); | 2867   __ Ldr(result.W(), FieldMemOperand(input, String::kHashFieldOffset)); | 
| 2868   __ IndexFromHash(result, result); | 2868   __ IndexFromHash(result, result); | 
| 2869 } | 2869 } | 
| 2870 | 2870 | 
| 2871 | 2871 | 
| 2872 void LCodeGen::EmitGoto(int block) { | 2872 void LCodeGen::EmitGoto(int block) { | 
| 2873   // Do not emit jump if we are emitting a goto to the next block. | 2873   // Do not emit jump if we are emitting a goto to the next block. | 
| 2874   if (!IsNextEmittedBlock(block)) { | 2874   if (!IsNextEmittedBlock(block)) { | 
| 2875     __ B(chunk_->GetAssemblyLabel(LookupDestination(block))); | 2875     __ B(chunk_->GetAssemblyLabel(LookupDestination(block))); | 
| 2876   } | 2876   } | 
| (...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5837   __ Bind(&out_of_object); | 5837   __ Bind(&out_of_object); | 
| 5838   __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 5838   __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 
| 5839   // Index is equal to negated out of object property index plus 1. | 5839   // Index is equal to negated out of object property index plus 1. | 
| 5840   __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 5840   __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); | 
| 5841   __ Ldr(result, FieldMemOperand(result, | 5841   __ Ldr(result, FieldMemOperand(result, | 
| 5842                                  FixedArray::kHeaderSize - kPointerSize)); | 5842                                  FixedArray::kHeaderSize - kPointerSize)); | 
| 5843   __ Bind(&done); | 5843   __ Bind(&done); | 
| 5844 } | 5844 } | 
| 5845 | 5845 | 
| 5846 } }  // namespace v8::internal | 5846 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|