| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 4852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4863 __ andb(kScratchRegister, Immediate(mask)); | 4863 __ andb(kScratchRegister, Immediate(mask)); |
| 4864 __ cmpb(kScratchRegister, Immediate(tag)); | 4864 __ cmpb(kScratchRegister, Immediate(tag)); |
| 4865 DeoptimizeIf(not_equal, instr->environment()); | 4865 DeoptimizeIf(not_equal, instr->environment()); |
| 4866 } | 4866 } |
| 4867 } | 4867 } |
| 4868 } | 4868 } |
| 4869 | 4869 |
| 4870 | 4870 |
| 4871 void LCodeGen::DoCheckValue(LCheckValue* instr) { | 4871 void LCodeGen::DoCheckValue(LCheckValue* instr) { |
| 4872 Register reg = ToRegister(instr->value()); | 4872 Register reg = ToRegister(instr->value()); |
| 4873 Handle<HeapObject> object = instr->hydrogen()->object(); | 4873 Handle<HeapObject> object = instr->hydrogen()->object().handle(); |
| 4874 __ CmpHeapObject(reg, object); | 4874 __ CmpHeapObject(reg, object); |
| 4875 DeoptimizeIf(not_equal, instr->environment()); | 4875 DeoptimizeIf(not_equal, instr->environment()); |
| 4876 } | 4876 } |
| 4877 | 4877 |
| 4878 | 4878 |
| 4879 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { | 4879 void LCodeGen::DoDeferredInstanceMigration(LCheckMaps* instr, Register object) { |
| 4880 { | 4880 { |
| 4881 PushSafepointRegistersScope scope(this); | 4881 PushSafepointRegistersScope scope(this); |
| 4882 __ push(object); | 4882 __ push(object); |
| 4883 CallRuntimeFromDeferred(Runtime::kMigrateInstance, 1, instr); | 4883 CallRuntimeFromDeferred(Runtime::kMigrateInstance, 1, instr); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 4904 Label check_maps_; | 4904 Label check_maps_; |
| 4905 Register object_; | 4905 Register object_; |
| 4906 }; | 4906 }; |
| 4907 | 4907 |
| 4908 if (instr->hydrogen()->CanOmitMapChecks()) return; | 4908 if (instr->hydrogen()->CanOmitMapChecks()) return; |
| 4909 | 4909 |
| 4910 LOperand* input = instr->value(); | 4910 LOperand* input = instr->value(); |
| 4911 ASSERT(input->IsRegister()); | 4911 ASSERT(input->IsRegister()); |
| 4912 Register reg = ToRegister(input); | 4912 Register reg = ToRegister(input); |
| 4913 | 4913 |
| 4914 SmallMapList* map_set = instr->hydrogen()->map_set(); | |
| 4915 | |
| 4916 DeferredCheckMaps* deferred = NULL; | 4914 DeferredCheckMaps* deferred = NULL; |
| 4917 if (instr->hydrogen()->has_migration_target()) { | 4915 if (instr->hydrogen()->has_migration_target()) { |
| 4918 deferred = new(zone()) DeferredCheckMaps(this, instr, reg); | 4916 deferred = new(zone()) DeferredCheckMaps(this, instr, reg); |
| 4919 __ bind(deferred->check_maps()); | 4917 __ bind(deferred->check_maps()); |
| 4920 } | 4918 } |
| 4921 | 4919 |
| 4920 UniqueSet<Map> map_set = instr->hydrogen()->map_set(); |
| 4922 Label success; | 4921 Label success; |
| 4923 for (int i = 0; i < map_set->length() - 1; i++) { | 4922 for (int i = 0; i < map_set.size() - 1; i++) { |
| 4924 Handle<Map> map = map_set->at(i); | 4923 Handle<Map> map = map_set.at(i).handle(); |
| 4925 __ CompareMap(reg, map, &success); | 4924 __ CompareMap(reg, map, &success); |
| 4926 __ j(equal, &success); | 4925 __ j(equal, &success); |
| 4927 } | 4926 } |
| 4928 | 4927 |
| 4929 Handle<Map> map = map_set->last(); | 4928 Handle<Map> map = map_set.at(map_set.size() - 1).handle(); |
| 4930 __ CompareMap(reg, map, &success); | 4929 __ CompareMap(reg, map, &success); |
| 4931 if (instr->hydrogen()->has_migration_target()) { | 4930 if (instr->hydrogen()->has_migration_target()) { |
| 4932 __ j(not_equal, deferred->entry()); | 4931 __ j(not_equal, deferred->entry()); |
| 4933 } else { | 4932 } else { |
| 4934 DeoptimizeIf(not_equal, instr->environment()); | 4933 DeoptimizeIf(not_equal, instr->environment()); |
| 4935 } | 4934 } |
| 4936 | 4935 |
| 4937 __ bind(&success); | 4936 __ bind(&success); |
| 4938 } | 4937 } |
| 4939 | 4938 |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5501 FixedArray::kHeaderSize - kPointerSize)); | 5500 FixedArray::kHeaderSize - kPointerSize)); |
| 5502 __ bind(&done); | 5501 __ bind(&done); |
| 5503 } | 5502 } |
| 5504 | 5503 |
| 5505 | 5504 |
| 5506 #undef __ | 5505 #undef __ |
| 5507 | 5506 |
| 5508 } } // namespace v8::internal | 5507 } } // namespace v8::internal |
| 5509 | 5508 |
| 5510 #endif // V8_TARGET_ARCH_X64 | 5509 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |