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 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1898 info()->MarkAsDeferredCalling(); | 1898 info()->MarkAsDeferredCalling(); |
1899 LOperand* value = UseRegister(instr->value()); | 1899 LOperand* value = UseRegister(instr->value()); |
1900 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1900 LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
1901 return AssignEnvironment(DefineAsRegister(res)); | 1901 return AssignEnvironment(DefineAsRegister(res)); |
1902 } else if (to.IsSmi()) { | 1902 } else if (to.IsSmi()) { |
1903 HValue* val = instr->value(); | 1903 HValue* val = instr->value(); |
1904 LOperand* value = UseRegister(val); | 1904 LOperand* value = UseRegister(val); |
1905 if (val->type().IsSmi()) { | 1905 if (val->type().IsSmi()) { |
1906 return DefineSameAsFirst(new(zone()) LDummyUse(value)); | 1906 return DefineSameAsFirst(new(zone()) LDummyUse(value)); |
1907 } | 1907 } |
1908 return AssignEnvironment( | 1908 return AssignEnvironment(DefineSameAsFirst(new(zone()) LCheckSmi(value))); |
1909 DefineSameAsFirst(new(zone()) LCheckSmiAndReturn(value))); | |
1910 } else { | 1909 } else { |
1911 ASSERT(to.IsInteger32()); | 1910 ASSERT(to.IsInteger32()); |
1912 LOperand* value = NULL; | 1911 LOperand* value = NULL; |
1913 LInstruction* res = NULL; | 1912 LInstruction* res = NULL; |
1914 if (instr->value()->type().IsSmi()) { | 1913 if (instr->value()->type().IsSmi()) { |
1915 value = UseRegisterAtStart(instr->value()); | 1914 value = UseRegisterAtStart(instr->value()); |
1916 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); | 1915 res = DefineAsRegister(new(zone()) LSmiUntag(value, false)); |
1917 } else { | 1916 } else { |
1918 value = UseRegister(instr->value()); | 1917 value = UseRegister(instr->value()); |
1919 LOperand* temp1 = TempRegister(); | 1918 LOperand* temp1 = TempRegister(); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2006 | 2005 |
2007 | 2006 |
2008 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { | 2007 LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) { |
2009 LUnallocated* temp1 = TempRegister(); | 2008 LUnallocated* temp1 = TempRegister(); |
2010 LOperand* temp2 = TempRegister(); | 2009 LOperand* temp2 = TempRegister(); |
2011 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2); | 2010 LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2); |
2012 return AssignEnvironment(result); | 2011 return AssignEnvironment(result); |
2013 } | 2012 } |
2014 | 2013 |
2015 | 2014 |
2016 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | |
2017 LOperand* value = UseRegisterAtStart(instr->value()); | |
2018 return AssignEnvironment(new(zone()) LCheckSmi(value)); | |
2019 } | |
2020 | |
2021 | |
2022 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 2015 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
2023 LOperand* value = UseRegisterAtStart(instr->value()); | 2016 LOperand* value = UseRegisterAtStart(instr->value()); |
2024 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 2017 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
2025 } | 2018 } |
2026 | 2019 |
2027 | 2020 |
2028 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 2021 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
2029 LOperand* value = UseRegisterAtStart(instr->value()); | 2022 LOperand* value = UseRegisterAtStart(instr->value()); |
2030 LInstruction* result = new(zone()) LCheckMaps(value); | 2023 LInstruction* result = new(zone()) LCheckMaps(value); |
2031 return AssignEnvironment(result); | 2024 return AssignEnvironment(result); |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2630 | 2623 |
2631 | 2624 |
2632 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2625 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2633 LOperand* object = UseRegister(instr->object()); | 2626 LOperand* object = UseRegister(instr->object()); |
2634 LOperand* index = UseRegister(instr->index()); | 2627 LOperand* index = UseRegister(instr->index()); |
2635 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2628 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2636 } | 2629 } |
2637 | 2630 |
2638 | 2631 |
2639 } } // namespace v8::internal | 2632 } } // namespace v8::internal |
OLD | NEW |