| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "ia32/lithium-codegen-ia32.h" | 9 #include "ia32/lithium-codegen-ia32.h" |
| 10 #include "ic.h" | 10 #include "ic.h" |
| (...skipping 5576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5587 codegen()->DoDeferredInstanceMigration(instr_, object_); | 5587 codegen()->DoDeferredInstanceMigration(instr_, object_); |
| 5588 } | 5588 } |
| 5589 Label* check_maps() { return &check_maps_; } | 5589 Label* check_maps() { return &check_maps_; } |
| 5590 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } | 5590 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } |
| 5591 private: | 5591 private: |
| 5592 LCheckMaps* instr_; | 5592 LCheckMaps* instr_; |
| 5593 Label check_maps_; | 5593 Label check_maps_; |
| 5594 Register object_; | 5594 Register object_; |
| 5595 }; | 5595 }; |
| 5596 | 5596 |
| 5597 if (instr->hydrogen()->CanOmitMapChecks()) return; | 5597 if (instr->hydrogen()->IsStabilityCheck()) { |
| 5598 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); |
| 5599 for (int i = 0; i < maps->size(); ++i) { |
| 5600 AddStabilityDependency(maps->at(i).handle()); |
| 5601 } |
| 5602 return; |
| 5603 } |
| 5598 | 5604 |
| 5599 LOperand* input = instr->value(); | 5605 LOperand* input = instr->value(); |
| 5600 ASSERT(input->IsRegister()); | 5606 ASSERT(input->IsRegister()); |
| 5601 Register reg = ToRegister(input); | 5607 Register reg = ToRegister(input); |
| 5602 | 5608 |
| 5603 DeferredCheckMaps* deferred = NULL; | 5609 DeferredCheckMaps* deferred = NULL; |
| 5604 if (instr->hydrogen()->has_migration_target()) { | 5610 if (instr->hydrogen()->HasMigrationTarget()) { |
| 5605 deferred = new(zone()) DeferredCheckMaps(this, instr, reg, x87_stack_); | 5611 deferred = new(zone()) DeferredCheckMaps(this, instr, reg, x87_stack_); |
| 5606 __ bind(deferred->check_maps()); | 5612 __ bind(deferred->check_maps()); |
| 5607 } | 5613 } |
| 5608 | 5614 |
| 5609 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); | 5615 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); |
| 5610 Label success; | 5616 Label success; |
| 5611 for (int i = 0; i < maps->size() - 1; i++) { | 5617 for (int i = 0; i < maps->size() - 1; i++) { |
| 5612 Handle<Map> map = maps->at(i).handle(); | 5618 Handle<Map> map = maps->at(i).handle(); |
| 5613 __ CompareMap(reg, map); | 5619 __ CompareMap(reg, map); |
| 5614 __ j(equal, &success, Label::kNear); | 5620 __ j(equal, &success, Label::kNear); |
| 5615 } | 5621 } |
| 5616 | 5622 |
| 5617 Handle<Map> map = maps->at(maps->size() - 1).handle(); | 5623 Handle<Map> map = maps->at(maps->size() - 1).handle(); |
| 5618 __ CompareMap(reg, map); | 5624 __ CompareMap(reg, map); |
| 5619 if (instr->hydrogen()->has_migration_target()) { | 5625 if (instr->hydrogen()->HasMigrationTarget()) { |
| 5620 __ j(not_equal, deferred->entry()); | 5626 __ j(not_equal, deferred->entry()); |
| 5621 } else { | 5627 } else { |
| 5622 DeoptimizeIf(not_equal, instr->environment()); | 5628 DeoptimizeIf(not_equal, instr->environment()); |
| 5623 } | 5629 } |
| 5624 | 5630 |
| 5625 __ bind(&success); | 5631 __ bind(&success); |
| 5626 } | 5632 } |
| 5627 | 5633 |
| 5628 | 5634 |
| 5629 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { | 5635 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6418 __ bind(deferred->exit()); | 6424 __ bind(deferred->exit()); |
| 6419 __ bind(&done); | 6425 __ bind(&done); |
| 6420 } | 6426 } |
| 6421 | 6427 |
| 6422 | 6428 |
| 6423 #undef __ | 6429 #undef __ |
| 6424 | 6430 |
| 6425 } } // namespace v8::internal | 6431 } } // namespace v8::internal |
| 6426 | 6432 |
| 6427 #endif // V8_TARGET_ARCH_IA32 | 6433 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |