| 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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 | 2036 |
| 2037 | 2037 |
| 2038 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { | 2038 LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) { |
| 2039 LOperand* value = UseRegisterAtStart(instr->value()); | 2039 LOperand* value = UseRegisterAtStart(instr->value()); |
| 2040 LOperand* temp = TempRegister(); | 2040 LOperand* temp = TempRegister(); |
| 2041 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value, temp); | 2041 LCheckInstanceType* result = new(zone()) LCheckInstanceType(value, temp); |
| 2042 return AssignEnvironment(result); | 2042 return AssignEnvironment(result); |
| 2043 } | 2043 } |
| 2044 | 2044 |
| 2045 | 2045 |
| 2046 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 2046 LInstruction* LChunkBuilder::DoCheckValue(HCheckValue* instr) { |
| 2047 // If the target is in new space, we'll emit a global cell compare and so | 2047 // If the object is in new space, we'll emit a global cell compare and so |
| 2048 // want the value in a register. If the target gets promoted before we | 2048 // want the value in a register. If the object gets promoted before we |
| 2049 // emit code, we will still get the register but will do an immediate | 2049 // emit code, we will still get the register but will do an immediate |
| 2050 // compare instead of the cell compare. This is safe. | 2050 // compare instead of the cell compare. This is safe. |
| 2051 LOperand* value = instr->target_in_new_space() | 2051 LOperand* value = instr->object_in_new_space() |
| 2052 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); | 2052 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); |
| 2053 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 2053 return AssignEnvironment(new(zone()) LCheckValue(value)); |
| 2054 } | 2054 } |
| 2055 | 2055 |
| 2056 | 2056 |
| 2057 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 2057 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
| 2058 LOperand* value = NULL; | 2058 LOperand* value = NULL; |
| 2059 if (!instr->CanOmitMapChecks()) { | 2059 if (!instr->CanOmitMapChecks()) { |
| 2060 value = UseRegisterAtStart(instr->value()); | 2060 value = UseRegisterAtStart(instr->value()); |
| 2061 if (instr->has_migration_target()) info()->MarkAsDeferredCalling(); | 2061 if (instr->has_migration_target()) info()->MarkAsDeferredCalling(); |
| 2062 } | 2062 } |
| 2063 LCheckMaps* result = new(zone()) LCheckMaps(value); | 2063 LCheckMaps* result = new(zone()) LCheckMaps(value); |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2712 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2713 LOperand* object = UseRegister(instr->object()); | 2713 LOperand* object = UseRegister(instr->object()); |
| 2714 LOperand* index = UseTempRegister(instr->index()); | 2714 LOperand* index = UseTempRegister(instr->index()); |
| 2715 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2715 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2716 } | 2716 } |
| 2717 | 2717 |
| 2718 | 2718 |
| 2719 } } // namespace v8::internal | 2719 } } // namespace v8::internal |
| 2720 | 2720 |
| 2721 #endif // V8_TARGET_ARCH_IA32 | 2721 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |