| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 case CodeStub::SubString: { | 741 case CodeStub::SubString: { |
| 742 SubStringStub stub; | 742 SubStringStub stub; |
| 743 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 743 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 744 break; | 744 break; |
| 745 } | 745 } |
| 746 case CodeStub::StringCharAt: { | 746 case CodeStub::StringCharAt: { |
| 747 StringCharAtStub stub; | 747 StringCharAtStub stub; |
| 748 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 748 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 749 break; | 749 break; |
| 750 } | 750 } |
| 751 case CodeStub::MathPow: { | |
| 752 MathPowStub stub; | |
| 753 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
| 754 break; | |
| 755 } | |
| 756 case CodeStub::NumberToString: { | 751 case CodeStub::NumberToString: { |
| 757 NumberToStringStub stub; | 752 NumberToStringStub stub; |
| 758 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 753 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 759 break; | 754 break; |
| 760 } | 755 } |
| 761 case CodeStub::StringAdd: { | 756 case CodeStub::StringAdd: { |
| 762 StringAddStub stub(NO_STRING_ADD_FLAGS); | 757 StringAddStub stub(NO_STRING_ADD_FLAGS); |
| 763 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 758 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 764 break; | 759 break; |
| 765 } | 760 } |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 } | 1074 } |
| 1080 | 1075 |
| 1081 | 1076 |
| 1082 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { | 1077 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
| 1083 Register result = ToRegister(instr->result()); | 1078 Register result = ToRegister(instr->result()); |
| 1084 Register array = ToRegister(instr->InputAt(0)); | 1079 Register array = ToRegister(instr->InputAt(0)); |
| 1085 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); | 1080 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); |
| 1086 } | 1081 } |
| 1087 | 1082 |
| 1088 | 1083 |
| 1089 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { | 1084 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { |
| 1090 Register result = ToRegister(instr->result()); | 1085 Register result = ToRegister(instr->result()); |
| 1091 Register array = ToRegister(instr->InputAt(0)); | 1086 Register array = ToRegister(instr->InputAt(0)); |
| 1092 __ mov(result, FieldOperand(array, PixelArray::kLengthOffset)); | 1087 __ mov(result, FieldOperand(array, ExternalArray::kLengthOffset)); |
| 1093 } | 1088 } |
| 1094 | 1089 |
| 1095 | 1090 |
| 1096 void LCodeGen::DoValueOf(LValueOf* instr) { | 1091 void LCodeGen::DoValueOf(LValueOf* instr) { |
| 1097 Register input = ToRegister(instr->InputAt(0)); | 1092 Register input = ToRegister(instr->InputAt(0)); |
| 1098 Register result = ToRegister(instr->result()); | 1093 Register result = ToRegister(instr->result()); |
| 1099 Register map = ToRegister(instr->TempAt(0)); | 1094 Register map = ToRegister(instr->TempAt(0)); |
| 1100 ASSERT(input.is(result)); | 1095 ASSERT(input.is(result)); |
| 1101 NearLabel done; | 1096 NearLabel done; |
| 1102 // If the object is a smi return the object. | 1097 // If the object is a smi return the object. |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 void LCodeGen::DoLoadElements(LLoadElements* instr) { | 2119 void LCodeGen::DoLoadElements(LLoadElements* instr) { |
| 2125 Register result = ToRegister(instr->result()); | 2120 Register result = ToRegister(instr->result()); |
| 2126 Register input = ToRegister(instr->InputAt(0)); | 2121 Register input = ToRegister(instr->InputAt(0)); |
| 2127 __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); | 2122 __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); |
| 2128 if (FLAG_debug_code) { | 2123 if (FLAG_debug_code) { |
| 2129 NearLabel done; | 2124 NearLabel done; |
| 2130 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2125 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
| 2131 Immediate(FACTORY->fixed_array_map())); | 2126 Immediate(FACTORY->fixed_array_map())); |
| 2132 __ j(equal, &done); | 2127 __ j(equal, &done); |
| 2133 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2128 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
| 2134 Immediate(FACTORY->pixel_array_map())); | 2129 Immediate(FACTORY->external_pixel_array_map())); |
| 2135 __ j(equal, &done); | 2130 __ j(equal, &done); |
| 2136 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2131 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
| 2137 Immediate(FACTORY->fixed_cow_array_map())); | 2132 Immediate(FACTORY->fixed_cow_array_map())); |
| 2138 __ Check(equal, "Check for fast elements or pixel array failed."); | 2133 __ Check(equal, "Check for fast elements or pixel array failed."); |
| 2139 __ bind(&done); | 2134 __ bind(&done); |
| 2140 } | 2135 } |
| 2141 } | 2136 } |
| 2142 | 2137 |
| 2143 | 2138 |
| 2144 void LCodeGen::DoLoadPixelArrayExternalPointer( | 2139 void LCodeGen::DoLoadExternalArrayPointer( |
| 2145 LLoadPixelArrayExternalPointer* instr) { | 2140 LLoadExternalArrayPointer* instr) { |
| 2146 Register result = ToRegister(instr->result()); | 2141 Register result = ToRegister(instr->result()); |
| 2147 Register input = ToRegister(instr->InputAt(0)); | 2142 Register input = ToRegister(instr->InputAt(0)); |
| 2148 __ mov(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); | 2143 __ mov(result, FieldOperand(input, |
| 2144 ExternalArray::kExternalPointerOffset)); |
| 2149 } | 2145 } |
| 2150 | 2146 |
| 2151 | 2147 |
| 2152 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { | 2148 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
| 2153 Register arguments = ToRegister(instr->arguments()); | 2149 Register arguments = ToRegister(instr->arguments()); |
| 2154 Register length = ToRegister(instr->length()); | 2150 Register length = ToRegister(instr->length()); |
| 2155 Operand index = ToOperand(instr->index()); | 2151 Operand index = ToOperand(instr->index()); |
| 2156 Register result = ToRegister(instr->result()); | 2152 Register result = ToRegister(instr->result()); |
| 2157 | 2153 |
| 2158 __ sub(length, index); | 2154 __ sub(length, index); |
| (...skipping 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3880 ASSERT(osr_pc_offset_ == -1); | 3876 ASSERT(osr_pc_offset_ == -1); |
| 3881 osr_pc_offset_ = masm()->pc_offset(); | 3877 osr_pc_offset_ = masm()->pc_offset(); |
| 3882 } | 3878 } |
| 3883 | 3879 |
| 3884 | 3880 |
| 3885 #undef __ | 3881 #undef __ |
| 3886 | 3882 |
| 3887 } } // namespace v8::internal | 3883 } } // namespace v8::internal |
| 3888 | 3884 |
| 3889 #endif // V8_TARGET_ARCH_IA32 | 3885 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |