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 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2039 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2039 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
2040 if (instr->access().IsExternalMemory() && instr->access().offset() == 0) { | 2040 if (instr->access().IsExternalMemory() && instr->access().offset() == 0) { |
2041 LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); | 2041 LOperand* obj = UseRegisterOrConstantAtStart(instr->object()); |
2042 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); | 2042 return DefineFixed(new(zone()) LLoadNamedField(obj), rax); |
2043 } | 2043 } |
2044 LOperand* obj = UseRegisterAtStart(instr->object()); | 2044 LOperand* obj = UseRegisterAtStart(instr->object()); |
2045 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2045 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2046 } | 2046 } |
2047 | 2047 |
2048 | 2048 |
2049 LInstruction* LChunkBuilder::DoLoadNamedFieldPolymorphic( | |
2050 HLoadNamedFieldPolymorphic* instr) { | |
2051 ASSERT(instr->representation().IsTagged()); | |
2052 if (instr->need_generic()) { | |
2053 LOperand* obj = UseFixed(instr->object(), rax); | |
2054 LLoadNamedFieldPolymorphic* result = | |
2055 new(zone()) LLoadNamedFieldPolymorphic(obj); | |
2056 return MarkAsCall(DefineFixed(result, rax), instr); | |
2057 } else { | |
2058 LOperand* obj = UseRegisterAtStart(instr->object()); | |
2059 LLoadNamedFieldPolymorphic* result = | |
2060 new(zone()) LLoadNamedFieldPolymorphic(obj); | |
2061 return AssignEnvironment(DefineAsRegister(result)); | |
2062 } | |
2063 } | |
2064 | |
2065 | |
2066 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { | 2049 LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) { |
2067 LOperand* object = UseFixed(instr->object(), rax); | 2050 LOperand* object = UseFixed(instr->object(), rax); |
2068 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(object); | 2051 LLoadNamedGeneric* result = new(zone()) LLoadNamedGeneric(object); |
2069 return MarkAsCall(DefineFixed(result, rax), instr); | 2052 return MarkAsCall(DefineFixed(result, rax), instr); |
2070 } | 2053 } |
2071 | 2054 |
2072 | 2055 |
2073 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 2056 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
2074 HLoadFunctionPrototype* instr) { | 2057 HLoadFunctionPrototype* instr) { |
2075 return AssignEnvironment(DefineAsRegister( | 2058 return AssignEnvironment(DefineAsRegister( |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2507 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2525 LOperand* object = UseRegister(instr->object()); | 2508 LOperand* object = UseRegister(instr->object()); |
2526 LOperand* index = UseTempRegister(instr->index()); | 2509 LOperand* index = UseTempRegister(instr->index()); |
2527 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2510 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2528 } | 2511 } |
2529 | 2512 |
2530 | 2513 |
2531 } } // namespace v8::internal | 2514 } } // namespace v8::internal |
2532 | 2515 |
2533 #endif // V8_TARGET_ARCH_X64 | 2516 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |