~ubuntu-branches/ubuntu/saucy/libv8/saucy

« back to all changes in this revision

Viewing changes to src/ic.h

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2012-04-07 16:26:13 UTC
  • mfrom: (15.1.27 sid)
  • Revision ID: package-import@ubuntu.com-20120407162613-dqo1m6w9r3fh8tst
Tags: 3.8.9.16-3
* mipsel build fixes :
  + v8_use_mips_abi_hardfloat=false, this lowers EABI requirements.
  + v8_can_use_fpu_instructions=false, detect if FPU is present.
  + set -Wno-unused-but-set-variable only on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
  // Construct the IC structure with the given number of extra
92
92
  // JavaScript frames on the stack.
93
93
  IC(FrameDepth depth, Isolate* isolate);
 
94
  virtual ~IC() {}
94
95
 
95
96
  // Get the call-site target; used for determining the state.
96
 
  Code* target() { return GetTargetAtAddress(address()); }
97
 
  inline Address address();
 
97
  Code* target() const { return GetTargetAtAddress(address()); }
 
98
  inline Address address() const;
 
99
 
 
100
  virtual bool IsGeneric() const { return false; }
98
101
 
99
102
  // Compute the current IC state based on the target stub, receiver and name.
100
103
  static State StateFrom(Code* target, Object* receiver, Object* name);
139
142
#ifdef ENABLE_DEBUGGER_SUPPORT
140
143
  // Computes the address in the original code when the code running is
141
144
  // containing break points (calls to DebugBreakXXX builtins).
142
 
  Address OriginalCodeAddress();
 
145
  Address OriginalCodeAddress() const;
143
146
#endif
144
147
 
145
148
  // Set the call-site target.
146
149
  void set_target(Code* code) { SetTargetAtAddress(address(), code); }
147
150
 
148
151
#ifdef DEBUG
 
152
  char TransitionMarkFromState(IC::State state);
 
153
 
149
154
  void TraceIC(const char* type,
150
155
               Handle<Object> name,
151
156
               State old_state,
452
457
      bool is_js_array,
453
458
      ElementsKind elements_kind);
454
459
 
 
460
  virtual bool IsGeneric() const {
 
461
    return target() == *generic_stub();
 
462
  }
 
463
 
455
464
 protected:
456
465
  virtual Code::Kind kind() const { return Code::KEYED_LOAD_IC; }
457
466
 
477
486
  Handle<Code> megamorphic_stub() {
478
487
    return isolate()->builtins()->KeyedLoadIC_Generic();
479
488
  }
480
 
  Handle<Code> generic_stub() {
 
489
  Handle<Code> generic_stub() const {
481
490
    return isolate()->builtins()->KeyedLoadIC_Generic();
482
491
  }
483
492
  Handle<Code> pre_monomorphic_stub() {
595
604
      bool is_js_array,
596
605
      ElementsKind elements_kind);
597
606
 
 
607
  virtual bool IsGeneric() const {
 
608
    return target() == *generic_stub() ||
 
609
        target() == *generic_stub_strict();
 
610
  }
 
611
 
598
612
 protected:
599
613
  virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; }
600
614
 
632
646
  Handle<Code> megamorphic_stub_strict() {
633
647
    return isolate()->builtins()->KeyedStoreIC_Generic_Strict();
634
648
  }
635
 
  Handle<Code> generic_stub() {
 
649
  Handle<Code> generic_stub() const {
636
650
    return isolate()->builtins()->KeyedStoreIC_Generic();
637
651
  }
638
 
  Handle<Code> generic_stub_strict() {
 
652
  Handle<Code> generic_stub_strict() const {
639
653
    return isolate()->builtins()->KeyedStoreIC_Generic_Strict();
640
654
  }
641
655
  Handle<Code> non_strict_arguments_stub() {
710
724
    SYMBOLS,
711
725
    STRINGS,
712
726
    OBJECTS,
 
727
    KNOWN_OBJECTS,
713
728
    GENERIC
714
729
  };
715
730