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 5523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5534 | 5534 |
5535 // smi | 5535 // smi |
5536 __ bind(&is_smi); | 5536 __ bind(&is_smi); |
5537 __ ClampUint8(result_reg, result_reg); | 5537 __ ClampUint8(result_reg, result_reg); |
5538 | 5538 |
5539 __ bind(&done); | 5539 __ bind(&done); |
5540 } | 5540 } |
5541 | 5541 |
5542 | 5542 |
5543 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { | 5543 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { |
5544 ASSERT(instr->temp()->Equals(instr->result())); | |
5545 Register prototype_reg = ToRegister(instr->temp()); | 5544 Register prototype_reg = ToRegister(instr->temp()); |
5546 Register map_reg = ToRegister(instr->temp2()); | 5545 Register map_reg = ToRegister(instr->temp2()); |
5547 | 5546 |
5548 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); | 5547 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); |
5549 ZoneList<Handle<Map> >* maps = instr->maps(); | 5548 ZoneList<Handle<Map> >* maps = instr->maps(); |
5550 | 5549 |
5551 ASSERT(prototypes->length() == maps->length()); | 5550 ASSERT(prototypes->length() == maps->length()); |
5552 | 5551 |
5553 if (instr->hydrogen()->CanOmitPrototypeChecks()) { | 5552 if (instr->hydrogen()->CanOmitPrototypeChecks()) { |
5554 for (int i = 0; i < maps->length(); i++) { | 5553 for (int i = 0; i < maps->length(); i++) { |
5555 prototype_maps_.Add(maps->at(i), info()->zone()); | 5554 prototype_maps_.Add(maps->at(i), info()->zone()); |
5556 } | 5555 } |
5557 __ LoadHeapObject(prototype_reg, | |
5558 prototypes->at(prototypes->length() - 1)); | |
5559 } else { | 5556 } else { |
5560 for (int i = 0; i < prototypes->length(); i++) { | 5557 for (int i = 0; i < prototypes->length(); i++) { |
5561 __ LoadHeapObject(prototype_reg, prototypes->at(i)); | 5558 __ LoadHeapObject(prototype_reg, prototypes->at(i)); |
5562 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); | 5559 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); |
5563 DoCheckMapCommon(map_reg, | 5560 DoCheckMapCommon(map_reg, |
5564 maps->at(i), | 5561 maps->at(i), |
5565 ALLOW_ELEMENT_TRANSITION_MAPS, | 5562 ALLOW_ELEMENT_TRANSITION_MAPS, |
5566 instr->environment()); | 5563 instr->environment()); |
5567 } | 5564 } |
5568 } | 5565 } |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6399 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6396 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
6400 __ ldr(result, FieldMemOperand(scratch, | 6397 __ ldr(result, FieldMemOperand(scratch, |
6401 FixedArray::kHeaderSize - kPointerSize)); | 6398 FixedArray::kHeaderSize - kPointerSize)); |
6402 __ bind(&done); | 6399 __ bind(&done); |
6403 } | 6400 } |
6404 | 6401 |
6405 | 6402 |
6406 #undef __ | 6403 #undef __ |
6407 | 6404 |
6408 } } // namespace v8::internal | 6405 } } // namespace v8::internal |
OLD | NEW |