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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 } | 1003 } |
1004 | 1004 |
1005 | 1005 |
1006 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { | 1006 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
1007 Register result = ToRegister(instr->result()); | 1007 Register result = ToRegister(instr->result()); |
1008 Register array = ToRegister(instr->InputAt(0)); | 1008 Register array = ToRegister(instr->InputAt(0)); |
1009 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); | 1009 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); |
1010 } | 1010 } |
1011 | 1011 |
1012 | 1012 |
1013 void LCodeGen::DoPixelArrayLength(LPixelArrayLength* instr) { | 1013 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { |
1014 Register result = ToRegister(instr->result()); | 1014 Register result = ToRegister(instr->result()); |
1015 Register array = ToRegister(instr->InputAt(0)); | 1015 Register array = ToRegister(instr->InputAt(0)); |
1016 __ mov(result, FieldOperand(array, PixelArray::kLengthOffset)); | 1016 __ mov(result, FieldOperand(array, ExternalArray::kLengthOffset)); |
1017 } | 1017 } |
1018 | 1018 |
1019 | 1019 |
1020 void LCodeGen::DoValueOf(LValueOf* instr) { | 1020 void LCodeGen::DoValueOf(LValueOf* instr) { |
1021 Register input = ToRegister(instr->InputAt(0)); | 1021 Register input = ToRegister(instr->InputAt(0)); |
1022 Register result = ToRegister(instr->result()); | 1022 Register result = ToRegister(instr->result()); |
1023 Register map = ToRegister(instr->TempAt(0)); | 1023 Register map = ToRegister(instr->TempAt(0)); |
1024 ASSERT(input.is(result)); | 1024 ASSERT(input.is(result)); |
1025 NearLabel done; | 1025 NearLabel done; |
1026 // If the object is a smi return the object. | 1026 // If the object is a smi return the object. |
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2041 void LCodeGen::DoLoadElements(LLoadElements* instr) { | 2041 void LCodeGen::DoLoadElements(LLoadElements* instr) { |
2042 Register result = ToRegister(instr->result()); | 2042 Register result = ToRegister(instr->result()); |
2043 Register input = ToRegister(instr->InputAt(0)); | 2043 Register input = ToRegister(instr->InputAt(0)); |
2044 __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); | 2044 __ mov(result, FieldOperand(input, JSObject::kElementsOffset)); |
2045 if (FLAG_debug_code) { | 2045 if (FLAG_debug_code) { |
2046 NearLabel done; | 2046 NearLabel done; |
2047 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2047 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
2048 Immediate(Factory::fixed_array_map())); | 2048 Immediate(Factory::fixed_array_map())); |
2049 __ j(equal, &done); | 2049 __ j(equal, &done); |
2050 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2050 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
2051 Immediate(Factory::pixel_array_map())); | 2051 Immediate(Factory::external_pixel_array_map())); |
2052 __ j(equal, &done); | 2052 __ j(equal, &done); |
2053 __ cmp(FieldOperand(result, HeapObject::kMapOffset), | 2053 __ cmp(FieldOperand(result, HeapObject::kMapOffset), |
2054 Immediate(Factory::fixed_cow_array_map())); | 2054 Immediate(Factory::fixed_cow_array_map())); |
2055 __ Check(equal, "Check for fast elements or pixel array failed."); | 2055 __ Check(equal, "Check for fast elements or pixel array failed."); |
2056 __ bind(&done); | 2056 __ bind(&done); |
2057 } | 2057 } |
2058 } | 2058 } |
2059 | 2059 |
2060 | 2060 |
2061 void LCodeGen::DoLoadPixelArrayExternalPointer( | 2061 void LCodeGen::DoLoadExternalArrayPointer( |
2062 LLoadPixelArrayExternalPointer* instr) { | 2062 LLoadExternalArrayPointer* instr) { |
2063 Register result = ToRegister(instr->result()); | 2063 Register result = ToRegister(instr->result()); |
2064 Register input = ToRegister(instr->InputAt(0)); | 2064 Register input = ToRegister(instr->InputAt(0)); |
2065 __ mov(result, FieldOperand(input, PixelArray::kExternalPointerOffset)); | 2065 __ mov(result, FieldOperand(input, |
| 2066 ExternalArray::kExternalPointerOffset)); |
2066 } | 2067 } |
2067 | 2068 |
2068 | 2069 |
2069 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { | 2070 void LCodeGen::DoAccessArgumentsAt(LAccessArgumentsAt* instr) { |
2070 Register arguments = ToRegister(instr->arguments()); | 2071 Register arguments = ToRegister(instr->arguments()); |
2071 Register length = ToRegister(instr->length()); | 2072 Register length = ToRegister(instr->length()); |
2072 Operand index = ToOperand(instr->index()); | 2073 Operand index = ToOperand(instr->index()); |
2073 Register result = ToRegister(instr->result()); | 2074 Register result = ToRegister(instr->result()); |
2074 | 2075 |
2075 __ sub(length, index); | 2076 __ sub(length, index); |
(...skipping 1728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3804 ASSERT(osr_pc_offset_ == -1); | 3805 ASSERT(osr_pc_offset_ == -1); |
3805 osr_pc_offset_ = masm()->pc_offset(); | 3806 osr_pc_offset_ = masm()->pc_offset(); |
3806 } | 3807 } |
3807 | 3808 |
3808 | 3809 |
3809 #undef __ | 3810 #undef __ |
3810 | 3811 |
3811 } } // namespace v8::internal | 3812 } } // namespace v8::internal |
3812 | 3813 |
3813 #endif // V8_TARGET_ARCH_IA32 | 3814 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |