29 #ifndef V8_HANDLES_INL_H_
30 #define V8_HANDLES_INL_H_
41 return Isolate::Current();
66 return *BitCast<T**>(location_);
75 prev_next_ = current->next;
76 prev_limit_ = current->limit;
82 ASSERT(isolate == Isolate::Current());
86 prev_next_ = current->next;
87 prev_limit_ = current->limit;
96 void HandleScope::CloseScope() {
97 ASSERT(isolate_ == Isolate::Current());
100 current->next = prev_next_;
102 if (current->limit != prev_limit_) {
103 current->limit = prev_limit_;
107 ZapRange(prev_next_, prev_limit_);
112 template <
typename T>
114 T* value = *handle_value;
120 ASSERT(current->level > 0);
121 Handle<T> result(CreateHandle<T>(value, isolate_));
124 prev_next_ = current->next;
125 prev_limit_ = current->limit;
131 template <
typename T>
133 ASSERT(isolate == Isolate::Current());
138 if (cur == current->limit) cur = Extend();
141 ASSERT(cur < current->limit);
142 current->next = cur + 1;
144 T** result =
reinterpret_cast<T**
>(cur);
151 inline NoHandleAllocation::NoHandleAllocation() {
153 Isolate::Current()->handle_scope_data();
157 current->limit = current->next;
159 level_ = current->level;
164 inline NoHandleAllocation::~NoHandleAllocation() {
168 Isolate::Current()->handle_scope_data();
170 data->level = level_;
177 #endif // V8_HANDLES_INL_H_
Handle(Handle< S > handle)
v8::HandleScope::Data HandleScopeData
#define ASSERT(condition)
v8::ImplementationUtilities::HandleScopeData * handle_scope_data()
#define T(name, string, precedence)
#define ASSERT_EQ(v1, v2)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL
Isolate * GetIsolateForHandle(Object *obj)
const Address kHandleZapValue
Handle< T > CloseAndEscape(Handle< T > handle_value)
static void DeleteExtensions(Isolate *isolate)
static T ** CreateHandle(T *value, Isolate *isolate)