| 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 5284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5295 __ jmp(&done); | 5295 __ jmp(&done); |
| 5296 | 5296 |
| 5297 // smi | 5297 // smi |
| 5298 __ bind(&is_smi); | 5298 __ bind(&is_smi); |
| 5299 __ ClampUint8(result_reg, result_reg); | 5299 __ ClampUint8(result_reg, result_reg); |
| 5300 | 5300 |
| 5301 __ bind(&done); | 5301 __ bind(&done); |
| 5302 } | 5302 } |
| 5303 | 5303 |
| 5304 | 5304 |
| 5305 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { | |
| 5306 if (instr->hydrogen()->CanOmitPrototypeChecks()) return; | |
| 5307 | |
| 5308 Register prototype_reg = ToRegister(instr->temp()); | |
| 5309 Register map_reg = ToRegister(instr->temp2()); | |
| 5310 | |
| 5311 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); | |
| 5312 ZoneList<Handle<Map> >* maps = instr->maps(); | |
| 5313 | |
| 5314 ASSERT(prototypes->length() == maps->length()); | |
| 5315 | |
| 5316 for (int i = 0; i < prototypes->length(); i++) { | |
| 5317 __ LoadHeapObject(prototype_reg, prototypes->at(i)); | |
| 5318 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); | |
| 5319 DoCheckMapCommon(map_reg, maps->at(i), instr->environment()); | |
| 5320 } | |
| 5321 } | |
| 5322 | |
| 5323 | |
| 5324 void LCodeGen::DoAllocate(LAllocate* instr) { | 5305 void LCodeGen::DoAllocate(LAllocate* instr) { |
| 5325 class DeferredAllocate: public LDeferredCode { | 5306 class DeferredAllocate: public LDeferredCode { |
| 5326 public: | 5307 public: |
| 5327 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5308 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
| 5328 : LDeferredCode(codegen), instr_(instr) { } | 5309 : LDeferredCode(codegen), instr_(instr) { } |
| 5329 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } | 5310 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } |
| 5330 virtual LInstruction* instr() { return instr_; } | 5311 virtual LInstruction* instr() { return instr_; } |
| 5331 private: | 5312 private: |
| 5332 LAllocate* instr_; | 5313 LAllocate* instr_; |
| 5333 }; | 5314 }; |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5831 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5812 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5832 __ ldr(result, FieldMemOperand(scratch, | 5813 __ ldr(result, FieldMemOperand(scratch, |
| 5833 FixedArray::kHeaderSize - kPointerSize)); | 5814 FixedArray::kHeaderSize - kPointerSize)); |
| 5834 __ bind(&done); | 5815 __ bind(&done); |
| 5835 } | 5816 } |
| 5836 | 5817 |
| 5837 | 5818 |
| 5838 #undef __ | 5819 #undef __ |
| 5839 | 5820 |
| 5840 } } // namespace v8::internal | 5821 } } // namespace v8::internal |
| OLD | NEW |