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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 } | 1209 } |
1210 | 1210 |
1211 | 1211 |
1212 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { | 1212 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { |
1213 Register result = ToRegister(instr->result()); | 1213 Register result = ToRegister(instr->result()); |
1214 Register array = ToRegister(instr->InputAt(0)); | 1214 Register array = ToRegister(instr->InputAt(0)); |
1215 __ movq(result, FieldOperand(array, JSArray::kLengthOffset)); | 1215 __ movq(result, FieldOperand(array, JSArray::kLengthOffset)); |
1216 } | 1216 } |
1217 | 1217 |
1218 | 1218 |
1219 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { | 1219 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { |
1220 Register result = ToRegister(instr->result()); | 1220 Register result = ToRegister(instr->result()); |
1221 Register array = ToRegister(instr->InputAt(0)); | 1221 Register array = ToRegister(instr->InputAt(0)); |
1222 __ movq(result, FieldOperand(array, FixedArray::kLengthOffset)); | 1222 __ movq(result, FieldOperand(array, FixedArrayBase::kLengthOffset)); |
1223 } | 1223 } |
1224 | 1224 |
1225 | 1225 |
1226 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { | |
1227 Register result = ToRegister(instr->result()); | |
1228 Register array = ToRegister(instr->InputAt(0)); | |
1229 __ movl(result, FieldOperand(array, ExternalPixelArray::kLengthOffset)); | |
1230 } | |
1231 | |
1232 | |
1233 void LCodeGen::DoElementsKind(LElementsKind* instr) { | 1226 void LCodeGen::DoElementsKind(LElementsKind* instr) { |
1234 Register result = ToRegister(instr->result()); | 1227 Register result = ToRegister(instr->result()); |
1235 Register input = ToRegister(instr->InputAt(0)); | 1228 Register input = ToRegister(instr->InputAt(0)); |
1236 | 1229 |
1237 // Load map into |result|. | 1230 // Load map into |result|. |
1238 __ movq(result, FieldOperand(input, HeapObject::kMapOffset)); | 1231 __ movq(result, FieldOperand(input, HeapObject::kMapOffset)); |
1239 // Load the map's "bit field 2" into |result|. We only need the first byte. | 1232 // Load the map's "bit field 2" into |result|. We only need the first byte. |
1240 __ movzxbq(result, FieldOperand(result, Map::kBitField2Offset)); | 1233 __ movzxbq(result, FieldOperand(result, Map::kBitField2Offset)); |
1241 // Retrieve elements_kind from bit field 2. | 1234 // Retrieve elements_kind from bit field 2. |
1242 __ and_(result, Immediate(Map::kElementsKindMask)); | 1235 __ and_(result, Immediate(Map::kElementsKindMask)); |
(...skipping 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4163 RegisterEnvironmentForDeoptimization(environment); | 4156 RegisterEnvironmentForDeoptimization(environment); |
4164 ASSERT(osr_pc_offset_ == -1); | 4157 ASSERT(osr_pc_offset_ == -1); |
4165 osr_pc_offset_ = masm()->pc_offset(); | 4158 osr_pc_offset_ = masm()->pc_offset(); |
4166 } | 4159 } |
4167 | 4160 |
4168 #undef __ | 4161 #undef __ |
4169 | 4162 |
4170 } } // namespace v8::internal | 4163 } } // namespace v8::internal |
4171 | 4164 |
4172 #endif // V8_TARGET_ARCH_X64 | 4165 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |