comparison src/share/vm/adlc/formsopt.hpp @ 628:7bb995fbd3c0

Merge
author trims
date Thu, 12 Mar 2009 18:16:36 -0700
parents dbbe28fc66b5
children c18cbe5936b8
comparison
equal deleted inserted replaced
580:ce2272390558 628:7bb995fbd3c0
1 /* 1 /*
2 * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 1998-2009 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
455 // Insert info into the match-rule 455 // Insert info into the match-rule
456 void add_instruction(int parent, int position, const char *name, int input); 456 void add_instruction(int parent, int position, const char *name, int input);
457 457
458 // Access info about instructions in the peep-match rule 458 // Access info about instructions in the peep-match rule
459 int max_position(); 459 int max_position();
460 const char *instruction_name(intptr_t position); 460 const char *instruction_name(int position);
461 // Iterate through all info on matched instructions 461 // Iterate through all info on matched instructions
462 void reset(); 462 void reset();
463 void next_instruction( intptr_t &parent, intptr_t &position, const char * &name, intptr_t &input ); 463 void next_instruction(int &parent, int &position, const char* &name, int &input);
464 // 'true' if current position in iteration is a placeholder, not matched. 464 // 'true' if current position in iteration is a placeholder, not matched.
465 bool is_placeholder(); 465 bool is_placeholder();
466 466
467 void dump(); 467 void dump();
468 void output(FILE *fp); 468 void output(FILE *fp);
472 class PeepConstraint : public Form { 472 class PeepConstraint : public Form {
473 private: 473 private:
474 PeepConstraint *_next; // Additional constraints ANDed together 474 PeepConstraint *_next; // Additional constraints ANDed together
475 475
476 public: 476 public:
477 const intptr_t _left_inst; 477 const int _left_inst;
478 const char *_left_op; 478 const char* _left_op;
479 const char *_relation; 479 const char* _relation;
480 const intptr_t _right_inst; 480 const int _right_inst;
481 const char *_right_op; 481 const char* _right_op;
482 482
483 public: 483 public:
484 // Public Methods 484 // Public Methods
485 PeepConstraint(intptr_t left_inst, char *left_op, char *relation, 485 PeepConstraint(int left_inst, char* left_op, char* relation,
486 intptr_t right_inst, char *right_op); 486 int right_inst, char* right_op);
487 ~PeepConstraint(); 487 ~PeepConstraint();
488 488
489 // Check if constraints use instruction at position 489 // Check if constraints use instruction at position
490 bool constrains_instruction(intptr_t position); 490 bool constrains_instruction(int position);
491 491
492 // Add another constraint 492 // Add another constraint
493 void append(PeepConstraint *next_peep_constraint); 493 void append(PeepConstraint *next_peep_constraint);
494 // Access the next constraint in the list 494 // Access the next constraint in the list
495 PeepConstraint *next(); 495 PeepConstraint *next();
517 void add_operand( int inst_num, char *inst_operand ); 517 void add_operand( int inst_num, char *inst_operand );
518 518
519 // Access contents of peepreplace 519 // Access contents of peepreplace
520 void reset(); 520 void reset();
521 void next_instruction(const char * &root); 521 void next_instruction(const char * &root);
522 void next_operand( intptr_t &inst_num, const char * &inst_operand ); 522 void next_operand(int &inst_num, const char * &inst_operand );
523 523
524 // Utilities 524 // Utilities
525 void dump(); 525 void dump();
526 void output(FILE *fp); 526 void output(FILE *fp);
527 }; 527 };