Chromium Code Reviews| 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 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2054 // want the value in a register. If the target gets promoted before we | 2054 // want the value in a register. If the target gets promoted before we |
| 2055 // emit code, we will still get the register but will do an immediate | 2055 // emit code, we will still get the register but will do an immediate |
| 2056 // compare instead of the cell compare. This is safe. | 2056 // compare instead of the cell compare. This is safe. |
| 2057 LOperand* value = instr->target_in_new_space() | 2057 LOperand* value = instr->target_in_new_space() |
| 2058 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); | 2058 ? UseRegisterAtStart(instr->value()) : UseAtStart(instr->value()); |
| 2059 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 2059 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
| 2060 } | 2060 } |
| 2061 | 2061 |
| 2062 | 2062 |
| 2063 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 2063 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
| 2064 LOperand* context = NULL; | |
| 2064 LOperand* value = NULL; | 2065 LOperand* value = NULL; |
| 2065 if (!instr->CanOmitMapChecks()) value = UseRegisterAtStart(instr->value()); | 2066 if (!instr->CanOmitMapChecks()) { |
| 2066 LCheckMaps* result = new(zone()) LCheckMaps(value); | 2067 value = UseRegisterAtStart(instr->value()); |
| 2067 if (instr->CanOmitMapChecks()) return result; | 2068 if (instr->has_migration_target()) { |
| 2068 return AssignEnvironment(result); | 2069 // The context is not actually required for instance migration, so clobber |
| 2070 // the context register to Smi::FromInt(0). | |
| 2071 HConstant* clobber_value = graph()->GetConstant0(); | |
| 2072 context = UseConstant(clobber_value); | |
|
danno
2013/08/05 14:36:59
I don't think you need any of this new logic, do y
Toon Verwaest
2013/08/05 15:03:26
Done.
| |
| 2073 info()->MarkAsDeferredCalling(); | |
| 2074 } | |
| 2075 } | |
| 2076 LCheckMaps* result = new(zone()) LCheckMaps(context, value); | |
| 2077 if (!instr->CanOmitMapChecks()) { | |
| 2078 AssignEnvironment(result); | |
| 2079 if (instr->has_migration_target()) return AssignPointerMap(result); | |
| 2080 } | |
| 2081 return result; | |
| 2069 } | 2082 } |
| 2070 | 2083 |
| 2071 | 2084 |
| 2072 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { | 2085 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
| 2073 HValue* value = instr->value(); | 2086 HValue* value = instr->value(); |
| 2074 Representation input_rep = value->representation(); | 2087 Representation input_rep = value->representation(); |
| 2075 if (input_rep.IsDouble()) { | 2088 if (input_rep.IsDouble()) { |
| 2076 LOperand* reg = UseRegister(value); | 2089 LOperand* reg = UseRegister(value); |
| 2077 return DefineFixed(new(zone()) LClampDToUint8(reg), eax); | 2090 return DefineFixed(new(zone()) LClampDToUint8(reg), eax); |
| 2078 } else if (input_rep.IsInteger32()) { | 2091 } else if (input_rep.IsInteger32()) { |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2736 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2749 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2737 LOperand* object = UseRegister(instr->object()); | 2750 LOperand* object = UseRegister(instr->object()); |
| 2738 LOperand* index = UseTempRegister(instr->index()); | 2751 LOperand* index = UseTempRegister(instr->index()); |
| 2739 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2752 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2740 } | 2753 } |
| 2741 | 2754 |
| 2742 | 2755 |
| 2743 } } // namespace v8::internal | 2756 } } // namespace v8::internal |
| 2744 | 2757 |
| 2745 #endif // V8_TARGET_ARCH_IA32 | 2758 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |