~ubuntu-branches/ubuntu/precise/nodejs/precise

« back to all changes in this revision

Viewing changes to deps/v8/src/vm-state.h

  • Committer: Bazaar Package Importer
  • Author(s): Jérémy Lal
  • Date: 2010-08-20 11:49:04 UTC
  • mfrom: (7.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100820114904-lz22w6fkth7yh179
Tags: 0.2.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
  // Used for debug asserts.
46
46
  static bool is_outermost_external() {
47
 
    return current_state_ == NULL;
 
47
    return current_state_ == 0;
48
48
  }
49
49
 
50
50
  static StateTag current_state() {
51
 
    return current_state_ ? current_state_->state() : EXTERNAL;
 
51
    VMState* state = reinterpret_cast<VMState*>(current_state_);
 
52
    return state ? state->state() : EXTERNAL;
52
53
  }
53
54
 
54
55
  static Address external_callback() {
55
 
    return current_state_ ? current_state_->external_callback_ : NULL;
 
56
    VMState* state = reinterpret_cast<VMState*>(current_state_);
 
57
    return state ? state->external_callback_ : NULL;
56
58
  }
57
59
 
58
60
 private:
62
64
  Address external_callback_;
63
65
 
64
66
  // A stack of VM states.
65
 
  static VMState* current_state_;
 
67
  static AtomicWord current_state_;
66
68
#else
67
69
 public:
68
70
  explicit VMState(StateTag state) {}