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 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 } | 1204 } |
1205 | 1205 |
1206 | 1206 |
1207 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { | 1207 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { |
1208 Register result = ToRegister(instr->result()); | 1208 Register result = ToRegister(instr->result()); |
1209 Register array = ToRegister(instr->InputAt(0)); | 1209 Register array = ToRegister(instr->InputAt(0)); |
1210 __ mov(result, FieldOperand(array, JSArray::kLengthOffset)); | 1210 __ mov(result, FieldOperand(array, JSArray::kLengthOffset)); |
1211 } | 1211 } |
1212 | 1212 |
1213 | 1213 |
1214 void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { | 1214 void LCodeGen::DoFixedArrayBaseLength( |
| 1215 LFixedArrayBaseLength* instr) { |
1215 Register result = ToRegister(instr->result()); | 1216 Register result = ToRegister(instr->result()); |
1216 Register array = ToRegister(instr->InputAt(0)); | 1217 Register array = ToRegister(instr->InputAt(0)); |
1217 __ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); | 1218 __ mov(result, FieldOperand(array, FixedArrayBase::kLengthOffset)); |
1218 } | 1219 } |
1219 | 1220 |
1220 | 1221 |
1221 void LCodeGen::DoExternalArrayLength(LExternalArrayLength* instr) { | |
1222 Register result = ToRegister(instr->result()); | |
1223 Register array = ToRegister(instr->InputAt(0)); | |
1224 __ mov(result, FieldOperand(array, ExternalArray::kLengthOffset)); | |
1225 } | |
1226 | |
1227 | |
1228 void LCodeGen::DoElementsKind(LElementsKind* instr) { | 1222 void LCodeGen::DoElementsKind(LElementsKind* instr) { |
1229 Register result = ToRegister(instr->result()); | 1223 Register result = ToRegister(instr->result()); |
1230 Register input = ToRegister(instr->InputAt(0)); | 1224 Register input = ToRegister(instr->InputAt(0)); |
1231 | 1225 |
1232 // Load map into |result|. | 1226 // Load map into |result|. |
1233 __ mov(result, FieldOperand(input, HeapObject::kMapOffset)); | 1227 __ mov(result, FieldOperand(input, HeapObject::kMapOffset)); |
1234 // Load the map's "bit field 2" into |result|. We only need the first byte, | 1228 // Load the map's "bit field 2" into |result|. We only need the first byte, |
1235 // but the following masking takes care of that anyway. | 1229 // but the following masking takes care of that anyway. |
1236 __ mov(result, FieldOperand(result, Map::kBitField2Offset)); | 1230 __ mov(result, FieldOperand(result, Map::kBitField2Offset)); |
1237 // Retrieve elements_kind from bit field 2. | 1231 // Retrieve elements_kind from bit field 2. |
(...skipping 3141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4379 env->deoptimization_index()); | 4373 env->deoptimization_index()); |
4380 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4374 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4381 } | 4375 } |
4382 | 4376 |
4383 | 4377 |
4384 #undef __ | 4378 #undef __ |
4385 | 4379 |
4386 } } // namespace v8::internal | 4380 } } // namespace v8::internal |
4387 | 4381 |
4388 #endif // V8_TARGET_ARCH_IA32 | 4382 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |