Overview
SHA1 Hash: | 8bf744898706956471449743f48d962af5b42972 |
---|---|
Date: | 2011-05-19 08:27:51 |
User: | kinaba |
Comment: | Tabun fixed long[] problem of TZTester (not tested yet). |
Timelines: | family | ancestors | descendants | both | trunk |
Downloads: | Tarball | ZIP archive |
Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [9165bd3629]
- sym-trunk inherited from [9165bd3629]
Changes
Modified TZTesterSp/tangentz/TZTester.java from [8b0f3086985103aa] to [9ea2716e7a7a319a].
271 */ 271 */ 272 private void generate_parameter(int Index, StringBuffer Code, DataType P 272 private void generate_parameter(int Index, StringBuffer Code, DataType P 273 { 273 { 274 // <<modified by cafelier>> : named parameters 274 // <<modified by cafelier>> : named parameters 275 String Name = (Index==-1 ? "_" : m_Problem.getParamNames()[Index 275 String Name = (Index==-1 ? "_" : m_Problem.getParamNames()[Index 276 276 277 String Desc = ParamType.getBaseName(); 277 String Desc = ParamType.getBaseName(); > 278 if (Desc.equals("long") || Desc.equals("Long")) > 279 Desc = "long long"; 278 280 279 if (ParamType.getDimension() == 0) 281 if (ParamType.getDimension() == 0) 280 { 282 { 281 // Just a scalar value, simply initialize it at declarat 283 // Just a scalar value, simply initialize it at declarat 282 if (Desc.equals("long") || Desc.equals("Long")) | 284 if (Desc.equals("long long")) 283 Code.append(ParamType.getDescriptor(m_Language) 285 Code.append(ParamType.getDescriptor(m_Language) 284 else 286 else 285 Code.append(ParamType.getDescriptor(m_Language) 287 Code.append(ParamType.getDescriptor(m_Language) 286 } 288 } 287 else 289 else 288 { 290 { 289 // <<modified by cafelier>> : empty array 291 // <<modified by cafelier>> : empty array ................................................................................................................................................................................ 290 if( Input.matches("^[\\s\\{\\}]+$") ) 292 if( Input.matches("^[\\s\\{\\}]+$") ) 291 { 293 { 292 Code.append(ParamType.getDescriptor(m_Language) 294 Code.append(ParamType.getDescriptor(m_Language) 293 } 295 } 294 else 296 else 295 { 297 { 296 // Arrays need to be converted to vector<type> b 298 // Arrays need to be converted to vector<type> b > 299 if (Desc.equals("long long")) > 300 Input = Input.replaceAll("¥¥d+","$1LL"); 297 Code.append(ParamType.getBaseName().toLowerCase( | 301 Code.append(Desc.toLowerCase() + " " + Name + "_ 298 Code.append(" "+ParamType.getDescriptor(m_Langu 302 Code.append(" "+ParamType.getDescriptor(m_Langu 299 } 303 } 300 } 304 } 301 } 305 } 302 } 306 }