001 /* This file was generated with JastAdd2 (http://jastadd.org) version R20130213 */ 002 package AST; 003 004 import java.util.HashSet; 005 import java.io.File; 006 import java.util.*; 007 import beaver.*; 008 import java.util.ArrayList; 009 import java.util.zip.*; 010 import java.io.*; 011 import java.io.FileNotFoundException; 012 import java.util.Collection; 013 /** 014 * @production DoubleType : {@link FloatingPointType}; 015 * @ast node 016 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/java.ast:63 017 */ 018 public class DoubleType extends FloatingPointType implements Cloneable { 019 /** 020 * @apilevel low-level 021 */ 022 public void flushCache() { 023 } 024 /** 025 * @apilevel internal 026 */ 027 public void flushCollectionCache() { 028 } 029 /** 030 * @apilevel internal 031 */ 032 @SuppressWarnings({"unchecked", "cast"}) 033 public DoubleType clone() throws CloneNotSupportedException { 034 DoubleType node = (DoubleType)super.clone(); 035 node.typeDescriptor_computed = false; 036 node.typeDescriptor_value = null; 037 node.jvmName_computed = false; 038 node.jvmName_value = null; 039 node.boxed_computed = false; 040 node.boxed_value = null; 041 node.in$Circle(false); 042 node.is$Final(false); 043 return node; 044 } 045 /** 046 * @apilevel internal 047 */ 048 @SuppressWarnings({"unchecked", "cast"}) 049 public DoubleType copy() { 050 051 try { 052 DoubleType node = (DoubleType) clone(); 053 node.parent = null; 054 if(children != null) 055 node.children = (ASTNode[]) children.clone(); 056 057 return node; 058 } catch (CloneNotSupportedException e) { 059 throw new Error("Error: clone not supported for " + getClass().getName()); 060 } 061 062 }/** 063 * Create a deep copy of the AST subtree at this node. 064 * The copy is dangling, i.e. has no parent. 065 * @return dangling copy of the subtree at this node 066 * @apilevel low-level 067 */ 068 @SuppressWarnings({"unchecked", "cast"}) 069 public DoubleType fullCopy() { 070 071 DoubleType tree = (DoubleType) copy(); 072 if (children != null) { 073 for (int i = 0; i < children.length; ++i) { 074 075 ASTNode child = (ASTNode) children[i]; 076 if(child != null) { 077 child = child.fullCopy(); 078 tree.setChild(child, i); 079 } 080 } 081 } 082 return tree; 083 084 } /** 085 * @ast method 086 * @aspect PrettyPrint 087 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/PrettyPrint.jadd:853 088 */ 089 public void toString(StringBuffer s) { 090 s.append("double"); 091 } 092 /** 093 * @ast method 094 * @aspect Attributes 095 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/Attributes.jrag:66 096 */ 097 public int addConstant(ConstantPool p, Constant c) { return p.addConstant(c.doubleValue()); } 098 /** 099 * @ast method 100 * @aspect CodeGeneration 101 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:545 102 */ 103 public void emitPushConstant(CodeGeneration gen, int value) { DoubleLiteral.push(gen, value); } 104 /** 105 * @ast method 106 * @aspect CodeGeneration 107 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:617 108 */ 109 public void emitReturn(CodeGeneration gen) { gen.emit(Bytecode.DRETURN);} 110 /** 111 * @ast method 112 * @aspect CodeGeneration 113 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:662 114 */ 115 public void emitLoadLocal(CodeGeneration gen, int pos) { 116 gen.maxLocals = Math.max(gen.maxLocals, pos+2); 117 if(pos == 0) gen.emit(Bytecode.DLOAD_0); 118 else if(pos == 1) gen.emit(Bytecode.DLOAD_1); 119 else if(pos == 2) gen.emit(Bytecode.DLOAD_2); 120 else if(pos == 3) gen.emit(Bytecode.DLOAD_3); 121 else if(pos < 256) gen.emit(Bytecode.DLOAD).add(pos); 122 else gen.emit(Bytecode.WIDE).emit(Bytecode.DLOAD).add2(pos); 123 } 124 /** 125 * @ast method 126 * @aspect CodeGeneration 127 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:775 128 */ 129 public void emitStoreLocal(CodeGeneration gen, int pos) { 130 gen.maxLocals = Math.max(gen.maxLocals, pos+2); 131 if(pos == 0) gen.emit(Bytecode.DSTORE_0); 132 else if(pos == 1) gen.emit(Bytecode.DSTORE_1); 133 else if(pos == 2) gen.emit(Bytecode.DSTORE_2); 134 else if(pos == 3) gen.emit(Bytecode.DSTORE_3); 135 else if(pos < 256) gen.emit(Bytecode.DSTORE).add(pos); 136 else gen.emit(Bytecode.WIDE).emit(Bytecode.DSTORE).add2(pos); 137 } 138 /** 139 * @ast method 140 * @aspect CodeGeneration 141 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:846 142 */ 143 public void emitDup(CodeGeneration gen) { gen.emit(Bytecode.DUP2); } 144 /** 145 * @ast method 146 * @aspect CodeGeneration 147 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:851 148 */ 149 public void emitDup_x1(CodeGeneration gen) { gen.emit(Bytecode.DUP2_X1); } 150 /** 151 * @ast method 152 * @aspect CodeGeneration 153 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:856 154 */ 155 public void emitDup_x2(CodeGeneration gen) { gen.emit(Bytecode.DUP2_X2); } 156 /** 157 * @ast method 158 * @aspect CodeGeneration 159 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:861 160 */ 161 public void emitPop(CodeGeneration gen) { gen.emit(Bytecode.POP2); } 162 /** 163 * @ast method 164 * @aspect CodeGenerationConversions 165 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:945 166 */ 167 void emitCastTo(CodeGeneration gen, TypeDecl type) { type.doubleToThis(gen); } 168 /** 169 * @ast method 170 * @aspect CodeGenerationConversions 171 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:957 172 */ 173 void intToThis(CodeGeneration gen) { gen.emit(Bytecode.I2D); } 174 /** 175 * @ast method 176 * @aspect CodeGenerationConversions 177 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:969 178 */ 179 void floatToThis(CodeGeneration gen) { gen.emit(Bytecode.F2D); } 180 /** 181 * @ast method 182 * @aspect CodeGenerationConversions 183 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:978 184 */ 185 void doubleToThis(CodeGeneration gen) { } 186 /** 187 * @ast method 188 * @aspect CodeGenerationConversions 189 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:987 190 */ 191 void longToThis(CodeGeneration gen) { gen.emit(Bytecode.L2D); } 192 /** 193 * @ast method 194 * @aspect CodeGenerationConversions 195 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:994 196 */ 197 void byteToThis(CodeGeneration gen) { gen.emit(Bytecode.I2D);} 198 /** 199 * @ast method 200 * @aspect CodeGenerationConversions 201 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1002 202 */ 203 void charToThis(CodeGeneration gen) { gen.emit(Bytecode.I2D);} 204 /** 205 * @ast method 206 * @aspect CodeGenerationConversions 207 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1010 208 */ 209 void shortToThis(CodeGeneration gen) { gen.emit(Bytecode.I2D); } 210 /** 211 * @ast method 212 * @aspect CodeGenerationBinaryOperations 213 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1041 214 */ 215 void neg(CodeGeneration gen) { gen.emit(Bytecode.DNEG); } 216 /** 217 * @ast method 218 * @aspect CodeGenerationBinaryOperations 219 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1053 220 */ 221 void add(CodeGeneration gen) {gen.emit(Bytecode.DADD);} 222 /** 223 * @ast method 224 * @aspect CodeGenerationBinaryOperations 225 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1059 226 */ 227 void sub(CodeGeneration gen) {gen.emit(Bytecode.DSUB);} 228 /** 229 * @ast method 230 * @aspect CodeGenerationBinaryOperations 231 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1065 232 */ 233 void mul(CodeGeneration gen) {gen.emit(Bytecode.DMUL);} 234 /** 235 * @ast method 236 * @aspect CodeGenerationBinaryOperations 237 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1071 238 */ 239 void div(CodeGeneration gen) {gen.emit(Bytecode.DDIV);} 240 /** 241 * @ast method 242 * @aspect CodeGenerationBinaryOperations 243 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1077 244 */ 245 void rem(CodeGeneration gen) {gen.emit(Bytecode.DREM);} 246 /** 247 * @ast method 248 * @aspect CodeGenerationBranch 249 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1110 250 */ 251 public void branchLT(CodeGeneration gen, int label) { gen.emit(Bytecode.DCMPG).emitCompare(Bytecode.IFLT, label); } 252 /** 253 * @ast method 254 * @aspect CodeGenerationBranch 255 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1116 256 */ 257 public void branchLE(CodeGeneration gen, int label) { gen.emit(Bytecode.DCMPG).emitCompare(Bytecode.IFLE, label); } 258 /** 259 * @ast method 260 * @aspect CodeGenerationBranch 261 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1122 262 */ 263 public void branchGE(CodeGeneration gen, int label) { gen.emit(Bytecode.DCMPL).emitCompare(Bytecode.IFGE, label); } 264 /** 265 * @ast method 266 * @aspect CodeGenerationBranch 267 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1128 268 */ 269 public void branchGT(CodeGeneration gen, int label) { gen.emit(Bytecode.DCMPL).emitCompare(Bytecode.IFGT, label); } 270 /** 271 * @ast method 272 * @aspect CodeGenerationBranch 273 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1134 274 */ 275 public void branchEQ(CodeGeneration gen, int label) { gen.emit(Bytecode.DCMPL).emitCompare(Bytecode.IFEQ, label); } 276 /** 277 * @ast method 278 * @aspect CodeGenerationBranch 279 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:1143 280 */ 281 public void branchNE(CodeGeneration gen, int label) { gen.emit(Bytecode.DCMPL).emitCompare(Bytecode.IFNE, label); } 282 /** 283 * @ast method 284 * @aspect AnnotationsCodegen 285 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Backend/AnnotationsCodegen.jrag:189 286 */ 287 public int addAnnotConstant(ConstantPool p, Constant c) { 288 return addConstant(p, c); 289 } 290 /** 291 * @ast method 292 * 293 */ 294 public DoubleType() { 295 super(); 296 297 298 } 299 /** 300 * Initializes the child array to the correct size. 301 * Initializes List and Opt nta children. 302 * @apilevel internal 303 * @ast method 304 * @ast method 305 * 306 */ 307 public void init$Children() { 308 children = new ASTNode[3]; 309 setChild(new Opt(), 1); 310 setChild(new List(), 2); 311 } 312 /** 313 * @ast method 314 * 315 */ 316 public DoubleType(Modifiers p0, String p1, Opt<Access> p2, List<BodyDecl> p3) { 317 setChild(p0, 0); 318 setID(p1); 319 setChild(p2, 1); 320 setChild(p3, 2); 321 } 322 /** 323 * @ast method 324 * 325 */ 326 public DoubleType(Modifiers p0, beaver.Symbol p1, Opt<Access> p2, List<BodyDecl> p3) { 327 setChild(p0, 0); 328 setID(p1); 329 setChild(p2, 1); 330 setChild(p3, 2); 331 } 332 /** 333 * @apilevel low-level 334 * @ast method 335 * 336 */ 337 protected int numChildren() { 338 return 3; 339 } 340 /** 341 * @apilevel internal 342 * @ast method 343 * 344 */ 345 public boolean mayHaveRewrite() { 346 return false; 347 } 348 /** 349 * Replaces the Modifiers child. 350 * @param node The new node to replace the Modifiers child. 351 * @apilevel high-level 352 * @ast method 353 * 354 */ 355 public void setModifiers(Modifiers node) { 356 setChild(node, 0); 357 } 358 /** 359 * Retrieves the Modifiers child. 360 * @return The current node used as the Modifiers child. 361 * @apilevel high-level 362 * @ast method 363 * 364 */ 365 public Modifiers getModifiers() { 366 return (Modifiers)getChild(0); 367 } 368 /** 369 * Retrieves the Modifiers child. 370 * <p><em>This method does not invoke AST transformations.</em></p> 371 * @return The current node used as the Modifiers child. 372 * @apilevel low-level 373 * @ast method 374 * 375 */ 376 public Modifiers getModifiersNoTransform() { 377 return (Modifiers)getChildNoTransform(0); 378 } 379 /** 380 * Replaces the lexeme ID. 381 * @param value The new value for the lexeme ID. 382 * @apilevel high-level 383 * @ast method 384 * 385 */ 386 public void setID(String value) { 387 tokenString_ID = value; 388 } 389 /** 390 * JastAdd-internal setter for lexeme ID using the Beaver parser. 391 * @apilevel internal 392 * @ast method 393 * 394 */ 395 public void setID(beaver.Symbol symbol) { 396 if(symbol.value != null && !(symbol.value instanceof String)) 397 throw new UnsupportedOperationException("setID is only valid for String lexemes"); 398 tokenString_ID = (String)symbol.value; 399 IDstart = symbol.getStart(); 400 IDend = symbol.getEnd(); 401 } 402 /** 403 * Retrieves the value for the lexeme ID. 404 * @return The value for the lexeme ID. 405 * @apilevel high-level 406 * @ast method 407 * 408 */ 409 public String getID() { 410 return tokenString_ID != null ? tokenString_ID : ""; 411 } 412 /** 413 * Replaces the optional node for the SuperClassAccess child. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! 414 * @param opt The new node to be used as the optional node for the SuperClassAccess child. 415 * @apilevel low-level 416 * @ast method 417 * 418 */ 419 public void setSuperClassAccessOpt(Opt<Access> opt) { 420 setChild(opt, 1); 421 } 422 /** 423 * Check whether the optional SuperClassAccess child exists. 424 * @return {@code true} if the optional SuperClassAccess child exists, {@code false} if it does not. 425 * @apilevel high-level 426 * @ast method 427 * 428 */ 429 public boolean hasSuperClassAccess() { 430 return getSuperClassAccessOpt().getNumChild() != 0; 431 } 432 /** 433 * Retrieves the (optional) SuperClassAccess child. 434 * @return The SuperClassAccess child, if it exists. Returns {@code null} otherwise. 435 * @apilevel low-level 436 * @ast method 437 * 438 */ 439 @SuppressWarnings({"unchecked", "cast"}) 440 public Access getSuperClassAccess() { 441 return (Access)getSuperClassAccessOpt().getChild(0); 442 } 443 /** 444 * Replaces the (optional) SuperClassAccess child. 445 * @param node The new node to be used as the SuperClassAccess child. 446 * @apilevel high-level 447 * @ast method 448 * 449 */ 450 public void setSuperClassAccess(Access node) { 451 getSuperClassAccessOpt().setChild(node, 0); 452 } 453 /** 454 * @apilevel low-level 455 * @ast method 456 * 457 */ 458 @SuppressWarnings({"unchecked", "cast"}) 459 public Opt<Access> getSuperClassAccessOpt() { 460 return (Opt<Access>)getChild(1); 461 } 462 /** 463 * Retrieves the optional node for child SuperClassAccess. This is the {@code Opt} node containing the child SuperClassAccess, not the actual child! 464 * <p><em>This method does not invoke AST transformations.</em></p> 465 * @return The optional node for child SuperClassAccess. 466 * @apilevel low-level 467 * @ast method 468 * 469 */ 470 @SuppressWarnings({"unchecked", "cast"}) 471 public Opt<Access> getSuperClassAccessOptNoTransform() { 472 return (Opt<Access>)getChildNoTransform(1); 473 } 474 /** 475 * Replaces the BodyDecl list. 476 * @param list The new list node to be used as the BodyDecl list. 477 * @apilevel high-level 478 * @ast method 479 * 480 */ 481 public void setBodyDeclList(List<BodyDecl> list) { 482 setChild(list, 2); 483 } 484 /** 485 * Retrieves the number of children in the BodyDecl list. 486 * @return Number of children in the BodyDecl list. 487 * @apilevel high-level 488 * @ast method 489 * 490 */ 491 public int getNumBodyDecl() { 492 return getBodyDeclList().getNumChild(); 493 } 494 /** 495 * Retrieves the number of children in the BodyDecl list. 496 * Calling this method will not trigger rewrites.. 497 * @return Number of children in the BodyDecl list. 498 * @apilevel low-level 499 * @ast method 500 * 501 */ 502 public int getNumBodyDeclNoTransform() { 503 return getBodyDeclListNoTransform().getNumChildNoTransform(); 504 } 505 /** 506 * Retrieves the element at index {@code i} in the BodyDecl list.. 507 * @param i Index of the element to return. 508 * @return The element at position {@code i} in the BodyDecl list. 509 * @apilevel high-level 510 * @ast method 511 * 512 */ 513 @SuppressWarnings({"unchecked", "cast"}) 514 public BodyDecl getBodyDecl(int i) { 515 return (BodyDecl)getBodyDeclList().getChild(i); 516 } 517 /** 518 * Append an element to the BodyDecl list. 519 * @param node The element to append to the BodyDecl list. 520 * @apilevel high-level 521 * @ast method 522 * 523 */ 524 public void addBodyDecl(BodyDecl node) { 525 List<BodyDecl> list = (parent == null || state == null) ? getBodyDeclListNoTransform() : getBodyDeclList(); 526 list.addChild(node); 527 } 528 /** 529 * @apilevel low-level 530 * @ast method 531 * 532 */ 533 public void addBodyDeclNoTransform(BodyDecl node) { 534 List<BodyDecl> list = getBodyDeclListNoTransform(); 535 list.addChild(node); 536 } 537 /** 538 * Replaces the BodyDecl list element at index {@code i} with the new node {@code node}. 539 * @param node The new node to replace the old list element. 540 * @param i The list index of the node to be replaced. 541 * @apilevel high-level 542 * @ast method 543 * 544 */ 545 public void setBodyDecl(BodyDecl node, int i) { 546 List<BodyDecl> list = getBodyDeclList(); 547 list.setChild(node, i); 548 } 549 /** 550 * Retrieves the BodyDecl list. 551 * @return The node representing the BodyDecl list. 552 * @apilevel high-level 553 * @ast method 554 * 555 */ 556 public List<BodyDecl> getBodyDecls() { 557 return getBodyDeclList(); 558 } 559 /** 560 * Retrieves the BodyDecl list. 561 * <p><em>This method does not invoke AST transformations.</em></p> 562 * @return The node representing the BodyDecl list. 563 * @apilevel low-level 564 * @ast method 565 * 566 */ 567 public List<BodyDecl> getBodyDeclsNoTransform() { 568 return getBodyDeclListNoTransform(); 569 } 570 /** 571 * Retrieves the BodyDecl list. 572 * @return The node representing the BodyDecl list. 573 * @apilevel high-level 574 * @ast method 575 * 576 */ 577 @SuppressWarnings({"unchecked", "cast"}) 578 public List<BodyDecl> getBodyDeclList() { 579 List<BodyDecl> list = (List<BodyDecl>)getChild(2); 580 list.getNumChild(); 581 return list; 582 } 583 /** 584 * Retrieves the BodyDecl list. 585 * <p><em>This method does not invoke AST transformations.</em></p> 586 * @return The node representing the BodyDecl list. 587 * @apilevel low-level 588 * @ast method 589 * 590 */ 591 @SuppressWarnings({"unchecked", "cast"}) 592 public List<BodyDecl> getBodyDeclListNoTransform() { 593 return (List<BodyDecl>)getChildNoTransform(2); 594 } 595 /** 596 * @attribute syn 597 * @aspect ConstantExpression 598 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:160 599 */ 600 public Constant cast(Constant c) { 601 ASTNode$State state = state(); 602 try { return Constant.create(c.doubleValue()); } 603 finally { 604 } 605 } 606 /** 607 * @attribute syn 608 * @aspect ConstantExpression 609 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:174 610 */ 611 public Constant plus(Constant c) { 612 ASTNode$State state = state(); 613 try { return c; } 614 finally { 615 } 616 } 617 /** 618 * @attribute syn 619 * @aspect ConstantExpression 620 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:183 621 */ 622 public Constant minus(Constant c) { 623 ASTNode$State state = state(); 624 try { return Constant.create(-c.doubleValue()); } 625 finally { 626 } 627 } 628 /** 629 * @attribute syn 630 * @aspect ConstantExpression 631 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:199 632 */ 633 public Constant mul(Constant c1, Constant c2) { 634 ASTNode$State state = state(); 635 try { return Constant.create(c1.doubleValue() * c2.doubleValue()); } 636 finally { 637 } 638 } 639 /** 640 * @attribute syn 641 * @aspect ConstantExpression 642 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:208 643 */ 644 public Constant div(Constant c1, Constant c2) { 645 ASTNode$State state = state(); 646 try { return Constant.create(c1.doubleValue() / c2.doubleValue()); } 647 finally { 648 } 649 } 650 /** 651 * @attribute syn 652 * @aspect ConstantExpression 653 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:217 654 */ 655 public Constant mod(Constant c1, Constant c2) { 656 ASTNode$State state = state(); 657 try { return Constant.create(c1.doubleValue() % c2.doubleValue()); } 658 finally { 659 } 660 } 661 /** 662 * @attribute syn 663 * @aspect ConstantExpression 664 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:226 665 */ 666 public Constant add(Constant c1, Constant c2) { 667 ASTNode$State state = state(); 668 try { return Constant.create(c1.doubleValue() + c2.doubleValue()); } 669 finally { 670 } 671 } 672 /** 673 * @attribute syn 674 * @aspect ConstantExpression 675 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:236 676 */ 677 public Constant sub(Constant c1, Constant c2) { 678 ASTNode$State state = state(); 679 try { return Constant.create(c1.doubleValue() - c2.doubleValue()); } 680 finally { 681 } 682 } 683 /** 684 * @attribute syn 685 * @aspect ConstantExpression 686 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:290 687 */ 688 public Constant questionColon(Constant cond, Constant c1, Constant c2) { 689 ASTNode$State state = state(); 690 try { return Constant.create(cond.booleanValue() ? c1.doubleValue() : c2.doubleValue()); } 691 finally { 692 } 693 } 694 /** 695 * @attribute syn 696 * @aspect ConstantExpression 697 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:394 698 */ 699 public boolean eqIsTrue(Expr left, Expr right) { 700 ASTNode$State state = state(); 701 try { return left.constant().doubleValue() == right.constant().doubleValue(); } 702 finally { 703 } 704 } 705 /** 706 * @attribute syn 707 * @aspect ConstantExpression 708 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:405 709 */ 710 public boolean ltIsTrue(Expr left, Expr right) { 711 ASTNode$State state = state(); 712 try { return left.constant().doubleValue() < right.constant().doubleValue(); } 713 finally { 714 } 715 } 716 /** 717 * @attribute syn 718 * @aspect ConstantExpression 719 * @declaredat /home/jesper/svn/JastAddJ/Java7Frontend/ConstantExpression.jrag:411 720 */ 721 public boolean leIsTrue(Expr left, Expr right) { 722 ASTNode$State state = state(); 723 try { return left.constant().doubleValue() <= right.constant().doubleValue(); } 724 finally { 725 } 726 } 727 /** 728 * @attribute syn 729 * @aspect TypeAnalysis 730 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Frontend/TypeAnalysis.jrag:199 731 */ 732 public boolean isDouble() { 733 ASTNode$State state = state(); 734 try { return true; } 735 finally { 736 } 737 } 738 /** 739 * @attribute syn 740 * @aspect CodeGeneration 741 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:621 742 */ 743 public byte arrayLoad() { 744 ASTNode$State state = state(); 745 try { return Bytecode.DALOAD; } 746 finally { 747 } 748 } 749 /** 750 * @attribute syn 751 * @aspect CodeGeneration 752 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CodeGeneration.jrag:723 753 */ 754 public byte arrayStore() { 755 ASTNode$State state = state(); 756 try { return Bytecode.DASTORE; } 757 finally { 758 } 759 } 760 /** 761 * @apilevel internal 762 */ 763 protected boolean typeDescriptor_computed = false; 764 /** 765 * @apilevel internal 766 */ 767 protected String typeDescriptor_value; 768 /** 769 * @attribute syn 770 * @aspect ConstantPoolNames 771 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/ConstantPoolNames.jrag:24 772 */ 773 @SuppressWarnings({"unchecked", "cast"}) 774 public String typeDescriptor() { 775 if(typeDescriptor_computed) { 776 return typeDescriptor_value; 777 } 778 ASTNode$State state = state(); 779 int num = state.boundariesCrossed; 780 boolean isFinal = this.is$Final(); 781 typeDescriptor_value = typeDescriptor_compute(); 782 if(isFinal && num == state().boundariesCrossed){ typeDescriptor_computed = true; } 783 return typeDescriptor_value; 784 } 785 /** 786 * @apilevel internal 787 */ 788 private String typeDescriptor_compute() { return "D"; } 789 /** 790 * @attribute syn 791 * @aspect CreateBCode 792 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/CreateBCode.jrag:825 793 */ 794 public int arrayPrimitiveTypeDescriptor() { 795 ASTNode$State state = state(); 796 try { return 7; } 797 finally { 798 } 799 } 800 /** 801 * @apilevel internal 802 */ 803 protected boolean jvmName_computed = false; 804 /** 805 * @apilevel internal 806 */ 807 protected String jvmName_value; 808 /** 809 * @attribute syn 810 * @aspect Java2Rewrites 811 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:41 812 */ 813 @SuppressWarnings({"unchecked", "cast"}) 814 public String jvmName() { 815 if(jvmName_computed) { 816 return jvmName_value; 817 } 818 ASTNode$State state = state(); 819 int num = state.boundariesCrossed; 820 boolean isFinal = this.is$Final(); 821 jvmName_value = jvmName_compute(); 822 if(isFinal && num == state().boundariesCrossed){ jvmName_computed = true; } 823 return jvmName_value; 824 } 825 /** 826 * @apilevel internal 827 */ 828 private String jvmName_compute() { return "D"; } 829 /** 830 * @attribute syn 831 * @aspect Java2Rewrites 832 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/Java2Rewrites.jrag:44 833 */ 834 public String primitiveClassName() { 835 ASTNode$State state = state(); 836 try { return "Double"; } 837 finally { 838 } 839 } 840 /** 841 * @attribute syn 842 * @aspect LocalNum 843 * @declaredat /home/jesper/svn/JastAddJ/Java1.4Backend/LocalNum.jrag:124 844 */ 845 public int variableSize() { 846 ASTNode$State state = state(); 847 try { return 2; } 848 finally { 849 } 850 } 851 /** 852 * @apilevel internal 853 */ 854 protected boolean boxed_computed = false; 855 /** 856 * @apilevel internal 857 */ 858 protected TypeDecl boxed_value; 859 /** 860 * @attribute syn 861 * @aspect AutoBoxing 862 * @declaredat /home/jesper/svn/JastAddJ/Java1.5Frontend/AutoBoxing.jrag:43 863 */ 864 @SuppressWarnings({"unchecked", "cast"}) 865 public TypeDecl boxed() { 866 if(boxed_computed) { 867 return boxed_value; 868 } 869 ASTNode$State state = state(); 870 int num = state.boundariesCrossed; 871 boolean isFinal = this.is$Final(); 872 boxed_value = boxed_compute(); 873 if(isFinal && num == state().boundariesCrossed){ boxed_computed = true; } 874 return boxed_value; 875 } 876 /** 877 * @apilevel internal 878 */ 879 private TypeDecl boxed_compute() { return lookupType("java.lang", "Double"); } 880 /** 881 * @apilevel internal 882 */ 883 public ASTNode rewriteTo() { 884 return super.rewriteTo(); 885 } 886 }