OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 Handle<Object> value = instr->value(); | 1485 Handle<Object> value = instr->value(); |
1486 if (value->IsSmi()) { | 1486 if (value->IsSmi()) { |
1487 __ li(ToRegister(instr->result()), Operand(value)); | 1487 __ li(ToRegister(instr->result()), Operand(value)); |
1488 } else { | 1488 } else { |
1489 __ LoadHeapObject(ToRegister(instr->result()), | 1489 __ LoadHeapObject(ToRegister(instr->result()), |
1490 Handle<HeapObject>::cast(value)); | 1490 Handle<HeapObject>::cast(value)); |
1491 } | 1491 } |
1492 } | 1492 } |
1493 | 1493 |
1494 | 1494 |
1495 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { | |
1496 Register result = ToRegister(instr->result()); | |
1497 Register array = ToRegister(instr->value()); | |
1498 __ lw(result, FieldMemOperand(array, JSArray::kLengthOffset)); | |
1499 } | |
1500 | |
1501 | |
1502 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { | 1495 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { |
1503 Register result = ToRegister(instr->result()); | 1496 Register result = ToRegister(instr->result()); |
1504 Register array = ToRegister(instr->value()); | 1497 Register array = ToRegister(instr->value()); |
1505 __ lw(result, FieldMemOperand(array, FixedArrayBase::kLengthOffset)); | 1498 __ lw(result, FieldMemOperand(array, FixedArrayBase::kLengthOffset)); |
1506 } | 1499 } |
1507 | 1500 |
1508 | 1501 |
1509 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { | 1502 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { |
1510 Register result = ToRegister(instr->result()); | 1503 Register result = ToRegister(instr->result()); |
1511 Register map = ToRegister(instr->value()); | 1504 Register map = ToRegister(instr->value()); |
(...skipping 4594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6106 __ Subu(scratch, result, scratch); | 6099 __ Subu(scratch, result, scratch); |
6107 __ lw(result, FieldMemOperand(scratch, | 6100 __ lw(result, FieldMemOperand(scratch, |
6108 FixedArray::kHeaderSize - kPointerSize)); | 6101 FixedArray::kHeaderSize - kPointerSize)); |
6109 __ bind(&done); | 6102 __ bind(&done); |
6110 } | 6103 } |
6111 | 6104 |
6112 | 6105 |
6113 #undef __ | 6106 #undef __ |
6114 | 6107 |
6115 } } // namespace v8::internal | 6108 } } // namespace v8::internal |
OLD | NEW |