~ubuntu-branches/ubuntu/trusty/libv8/trusty

« back to all changes in this revision

Viewing changes to src/lithium.h

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-02-20 14:08:17 UTC
  • mfrom: (15.1.24 sid)
  • Revision ID: package-import@ubuntu.com-20120220140817-bsvmeoa4sxsj5hbz
Tags: 3.7.12.22-3
Fix mipsel build, allow test debug-step-3 to fail (non-crucial)

Show diffs side-by-side

added added

removed removed

Lines of Context:
407
407
class LPointerMap: public ZoneObject {
408
408
 public:
409
409
  explicit LPointerMap(int position)
410
 
      : pointer_operands_(8), position_(position), lithium_position_(-1) { }
 
410
      : pointer_operands_(8),
 
411
        untagged_operands_(0),
 
412
        position_(position),
 
413
        lithium_position_(-1) { }
411
414
 
412
 
  const ZoneList<LOperand*>* operands() const { return &pointer_operands_; }
 
415
  const ZoneList<LOperand*>* GetNormalizedOperands() {
 
416
    for (int i = 0; i < untagged_operands_.length(); ++i) {
 
417
      RemovePointer(untagged_operands_[i]);
 
418
    }
 
419
    untagged_operands_.Clear();
 
420
    return &pointer_operands_;
 
421
  }
413
422
  int position() const { return position_; }
414
423
  int lithium_position() const { return lithium_position_; }
415
424
 
419
428
  }
420
429
 
421
430
  void RecordPointer(LOperand* op);
 
431
  void RemovePointer(LOperand* op);
 
432
  void RecordUntagged(LOperand* op);
422
433
  void PrintTo(StringStream* stream);
423
434
 
424
435
 private:
425
436
  ZoneList<LOperand*> pointer_operands_;
 
437
  ZoneList<LOperand*> untagged_operands_;
426
438
  int position_;
427
439
  int lithium_position_;
428
440
};
442
454
        translation_index_(-1),
443
455
        ast_id_(ast_id),
444
456
        parameter_count_(parameter_count),
 
457
        pc_offset_(-1),
445
458
        values_(value_count),
446
459
        representations_(value_count),
447
460
        spilled_registers_(NULL),
455
468
  int translation_index() const { return translation_index_; }
456
469
  int ast_id() const { return ast_id_; }
457
470
  int parameter_count() const { return parameter_count_; }
 
471
  int pc_offset() const { return pc_offset_; }
458
472
  LOperand** spilled_registers() const { return spilled_registers_; }
459
473
  LOperand** spilled_double_registers() const {
460
474
    return spilled_double_registers_;
471
485
    return representations_[index].IsTagged();
472
486
  }
473
487
 
474
 
  void Register(int deoptimization_index, int translation_index) {
 
488
  void Register(int deoptimization_index,
 
489
                int translation_index,
 
490
                int pc_offset) {
475
491
    ASSERT(!HasBeenRegistered());
476
492
    deoptimization_index_ = deoptimization_index;
477
493
    translation_index_ = translation_index;
 
494
    pc_offset_ = pc_offset;
478
495
  }
479
496
  bool HasBeenRegistered() const {
480
497
    return deoptimization_index_ != Safepoint::kNoDeoptimizationIndex;
495
512
  int translation_index_;
496
513
  int ast_id_;
497
514
  int parameter_count_;
 
515
  int pc_offset_;
498
516
  ZoneList<LOperand*> values_;
499
517
  ZoneList<Representation> representations_;
500
518