Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1999 | 1999 |
| 2000 | 2000 |
| 2001 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2001 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2002 LOperand* left = UseRegisterAtStart(instr->left()); | 2002 LOperand* left = UseRegisterAtStart(instr->left()); |
| 2003 LOperand* right = UseRegisterAtStart(instr->right()); | 2003 LOperand* right = UseRegisterAtStart(instr->right()); |
| 2004 return MarkAsCall(DefineFixed(new LStringAdd(left, right), r0), instr); | 2004 return MarkAsCall(DefineFixed(new LStringAdd(left, right), r0), instr); |
| 2005 } | 2005 } |
| 2006 | 2006 |
| 2007 | 2007 |
| 2008 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { | 2008 LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) { |
| 2009 LOperand* string = UseRegister(instr->string()); | 2009 LOperand* string = UseTempRegister(instr->string()); |
| 2010 LOperand* index = UseRegisterOrConstant(instr->index()); | 2010 LOperand* index = UseRegisterOrConstant(instr->index()); |
| 2011 LStringCharCodeAt* result = new LStringCharCodeAt(string, index); | 2011 LStringCharCodeAt* result = new LStringCharCodeAt(string, index); |
| 2012 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); | 2012 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); |
| 2013 } | 2013 } |
|
Yang
2011/08/04 09:19:53
Legacy bug. The register 'string' is being altered
| |
| 2014 | 2014 |
| 2015 | 2015 |
| 2016 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { | 2016 LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
| 2017 LOperand* char_code = UseRegister(instr->value()); | 2017 LOperand* char_code = UseRegister(instr->value()); |
| 2018 LStringCharFromCode* result = new LStringCharFromCode(char_code); | 2018 LStringCharFromCode* result = new LStringCharFromCode(char_code); |
| 2019 return AssignPointerMap(DefineAsRegister(result)); | 2019 return AssignPointerMap(DefineAsRegister(result)); |
| 2020 } | 2020 } |
| 2021 | 2021 |
| 2022 | 2022 |
| 2023 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { | 2023 LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2188 | 2188 |
| 2189 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2189 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
| 2190 LOperand* key = UseRegisterAtStart(instr->key()); | 2190 LOperand* key = UseRegisterAtStart(instr->key()); |
| 2191 LOperand* object = UseRegisterAtStart(instr->object()); | 2191 LOperand* object = UseRegisterAtStart(instr->object()); |
| 2192 LIn* result = new LIn(key, object); | 2192 LIn* result = new LIn(key, object); |
| 2193 return MarkAsCall(DefineFixed(result, r0), instr); | 2193 return MarkAsCall(DefineFixed(result, r0), instr); |
| 2194 } | 2194 } |
| 2195 | 2195 |
| 2196 | 2196 |
| 2197 } } // namespace v8::internal | 2197 } } // namespace v8::internal |
| OLD | NEW |