| 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 5397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5408 // smi | 5408 // smi |
| 5409 __ bind(&is_smi); | 5409 __ bind(&is_smi); |
| 5410 __ SmiUntag(input_reg); | 5410 __ SmiUntag(input_reg); |
| 5411 __ ClampUint8(input_reg); | 5411 __ ClampUint8(input_reg); |
| 5412 | 5412 |
| 5413 __ bind(&done); | 5413 __ bind(&done); |
| 5414 } | 5414 } |
| 5415 | 5415 |
| 5416 | 5416 |
| 5417 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { | 5417 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { |
| 5418 ASSERT(instr->temp()->Equals(instr->result())); | |
| 5419 Register reg = ToRegister(instr->temp()); | 5418 Register reg = ToRegister(instr->temp()); |
| 5420 | 5419 |
| 5421 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); | 5420 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); |
| 5422 ZoneList<Handle<Map> >* maps = instr->maps(); | 5421 ZoneList<Handle<Map> >* maps = instr->maps(); |
| 5423 | 5422 |
| 5424 ASSERT(prototypes->length() == maps->length()); | 5423 ASSERT(prototypes->length() == maps->length()); |
| 5425 | 5424 |
| 5426 // TODO(ulan): Move this check to hydrogen and split HCheckPrototypeMaps | |
| 5427 // into two instruction: one that checks the prototypes and another that | |
| 5428 // loads the holder (HConstant). Find a way to do it without breaking | |
| 5429 // parallel recompilation. | |
| 5430 if (instr->hydrogen()->CanOmitPrototypeChecks()) { | 5425 if (instr->hydrogen()->CanOmitPrototypeChecks()) { |
| 5431 for (int i = 0; i < maps->length(); i++) { | 5426 for (int i = 0; i < maps->length(); i++) { |
| 5432 prototype_maps_.Add(maps->at(i), info()->zone()); | 5427 prototype_maps_.Add(maps->at(i), info()->zone()); |
| 5433 } | 5428 } |
| 5434 __ LoadHeapObject(reg, prototypes->at(prototypes->length() - 1)); | |
| 5435 } else { | 5429 } else { |
| 5436 for (int i = 0; i < prototypes->length(); i++) { | 5430 for (int i = 0; i < prototypes->length(); i++) { |
| 5437 __ LoadHeapObject(reg, prototypes->at(i)); | 5431 __ LoadHeapObject(reg, prototypes->at(i)); |
| 5438 DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr); | 5432 DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr); |
| 5439 } | 5433 } |
| 5440 } | 5434 } |
| 5441 } | 5435 } |
| 5442 | 5436 |
| 5443 | 5437 |
| 5444 void LCodeGen::DoAllocateObject(LAllocateObject* instr) { | 5438 void LCodeGen::DoAllocateObject(LAllocateObject* instr) { |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6292 FixedArray::kHeaderSize - kPointerSize)); | 6286 FixedArray::kHeaderSize - kPointerSize)); |
| 6293 __ bind(&done); | 6287 __ bind(&done); |
| 6294 } | 6288 } |
| 6295 | 6289 |
| 6296 | 6290 |
| 6297 #undef __ | 6291 #undef __ |
| 6298 | 6292 |
| 6299 } } // namespace v8::internal | 6293 } } // namespace v8::internal |
| 6300 | 6294 |
| 6301 #endif // V8_TARGET_ARCH_IA32 | 6295 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |