comparison graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeParser.java @ 8316:c210577168e7

Fixed not specializing nodes were named Null instead of Default.
author Christian Humer <christian.humer@gmail.com>
date Sat, 16 Mar 2013 16:11:40 +0100
parents b1dff27a1da6
children a80bf36c6a1e
comparison
equal deleted inserted replaced
8315:3fbe6772dbf6 8316:c210577168e7
405 } 405 }
406 } 406 }
407 407
408 // reduce id horizontally 408 // reduce id horizontally
409 for (List<String> signature : signatureChunks) { 409 for (List<String> signature : signatureChunks) {
410 if (signature.isEmpty()) {
411 continue;
412 }
410 String prev = null; 413 String prev = null;
411 boolean allSame = true; 414 boolean allSame = true;
412 for (String arg : signature) { 415 for (String arg : signature) {
413 if (prev == null) { 416 if (prev == null) {
414 prev = arg; 417 prev = arg;
428 431
429 // create signatures 432 // create signatures
430 List<String> signatures = new ArrayList<>(); 433 List<String> signatures = new ArrayList<>();
431 for (List<String> signatureChunk : signatureChunks) { 434 for (List<String> signatureChunk : signatureChunks) {
432 StringBuilder b = new StringBuilder(); 435 StringBuilder b = new StringBuilder();
433 for (String s : signatureChunk) { 436 if (signatureChunk.isEmpty()) {
434 b.append(s); 437 b.append("Default");
438 } else {
439 for (String s : signatureChunk) {
440 b.append(s);
441 }
435 } 442 }
436 signatures.add(b.toString()); 443 signatures.add(b.toString());
437 } 444 }
438 445
439 Map<String, Integer> counts = new HashMap<>(); 446 Map<String, Integer> counts = new HashMap<>();