~yolanda.robla/ubuntu/trusty/nodejs/add_distribution

« back to all changes in this revision

Viewing changes to deps/v8/src/frames-inl.h

  • Committer: Package Import Robot
  • Author(s): Jérémy Lal
  • Date: 2013-08-14 00:16:46 UTC
  • mfrom: (7.1.40 sid)
  • Revision ID: package-import@ubuntu.com-20130814001646-bzlysfh8sd6mukbo
Tags: 0.10.15~dfsg1-4
* Update 2005 patch, adding a handful of tests that can fail on
  slow platforms.
* Add 1004 patch to fix test failures when writing NaN to buffer
  on mipsel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright 2011 the V8 project authors. All rights reserved.
 
1
// Copyright 2012 the V8 project authors. All rights reserved.
2
2
// Redistribution and use in source and binary forms, with or without
3
3
// modification, are permitted provided that the following conditions are
4
4
// met:
68
68
 
69
69
inline void StackHandler::Iterate(ObjectVisitor* v, Code* holder) const {
70
70
  v->VisitPointer(context_address());
71
 
  StackFrame::IteratePc(v, pc_address(), holder);
 
71
  v->VisitPointer(code_address());
72
72
}
73
73
 
74
74
 
77
77
}
78
78
 
79
79
 
80
 
inline StackHandler::State StackHandler::state() const {
 
80
inline bool StackHandler::is_js_entry() const {
 
81
  return kind() == JS_ENTRY;
 
82
}
 
83
 
 
84
 
 
85
inline bool StackHandler::is_catch() const {
 
86
  return kind() == CATCH;
 
87
}
 
88
 
 
89
 
 
90
inline bool StackHandler::is_finally() const {
 
91
  return kind() == FINALLY;
 
92
}
 
93
 
 
94
 
 
95
inline StackHandler::Kind StackHandler::kind() const {
81
96
  const int offset = StackHandlerConstants::kStateOffset;
82
 
  return static_cast<State>(Memory::int_at(address() + offset));
 
97
  return KindField::decode(Memory::unsigned_at(address() + offset));
83
98
}
84
99
 
85
100
 
89
104
}
90
105
 
91
106
 
92
 
inline Address* StackHandler::pc_address() const {
93
 
  const int offset = StackHandlerConstants::kPCOffset;
94
 
  return reinterpret_cast<Address*>(address() + offset);
 
107
inline Object** StackHandler::code_address() const {
 
108
  const int offset = StackHandlerConstants::kCodeOffset;
 
109
  return reinterpret_cast<Object**>(address() + offset);
95
110
}
96
111
 
97
112
 
105
120
}
106
121
 
107
122
 
 
123
inline Code* StackFrame::LookupCode() const {
 
124
  return GetContainingCode(isolate(), pc());
 
125
}
 
126
 
 
127
 
108
128
inline Code* StackFrame::GetContainingCode(Isolate* isolate, Address pc) {
109
 
  return isolate->pc_to_code_cache()->GetCacheEntry(pc)->code;
 
129
  return isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code;
 
130
}
 
131
 
 
132
 
 
133
inline EntryFrame::EntryFrame(StackFrameIterator* iterator)
 
134
    : StackFrame(iterator) {
 
135
}
 
136
 
 
137
 
 
138
inline EntryConstructFrame::EntryConstructFrame(StackFrameIterator* iterator)
 
139
    : EntryFrame(iterator) {
 
140
}
 
141
 
 
142
 
 
143
inline ExitFrame::ExitFrame(StackFrameIterator* iterator)
 
144
    : StackFrame(iterator) {
 
145
}
 
146
 
 
147
 
 
148
inline StandardFrame::StandardFrame(StackFrameIterator* iterator)
 
149
    : StackFrame(iterator) {
110
150
}
111
151
 
112
152
 
151
191
inline bool StandardFrame::IsConstructFrame(Address fp) {
152
192
  Object* marker =
153
193
      Memory::Object_at(fp + StandardFrameConstants::kMarkerOffset);
154
 
  return marker == Smi::FromInt(CONSTRUCT);
 
194
  return marker == Smi::FromInt(StackFrame::CONSTRUCT);
 
195
}
 
196
 
 
197
 
 
198
inline JavaScriptFrame::JavaScriptFrame(StackFrameIterator* iterator)
 
199
    : StandardFrame(iterator) {
155
200
}
156
201
 
157
202
 
190
235
}
191
236
 
192
237
 
 
238
inline OptimizedFrame::OptimizedFrame(StackFrameIterator* iterator)
 
239
    : JavaScriptFrame(iterator) {
 
240
}
 
241
 
 
242
 
 
243
inline ArgumentsAdaptorFrame::ArgumentsAdaptorFrame(
 
244
    StackFrameIterator* iterator) : JavaScriptFrame(iterator) {
 
245
}
 
246
 
 
247
 
 
248
inline InternalFrame::InternalFrame(StackFrameIterator* iterator)
 
249
    : StandardFrame(iterator) {
 
250
}
 
251
 
 
252
 
 
253
inline ConstructFrame::ConstructFrame(StackFrameIterator* iterator)
 
254
    : InternalFrame(iterator) {
 
255
}
 
256
 
 
257
 
193
258
template<typename Iterator>
194
259
inline JavaScriptFrameIteratorTemp<Iterator>::JavaScriptFrameIteratorTemp(
195
260
    Isolate* isolate)