Revision f230a1cf deps/v8/src/isolate.h

View differences:

deps/v8/src/isolate.h
75 75
class InlineRuntimeFunctionsTable;
76 76
class NoAllocationStringAllocator;
77 77
class InnerPointerToCodeCache;
78
class MarkingThread;
79 78
class PreallocatedMemoryThread;
80 79
class RandomNumberGenerator;
81 80
class RegExpStack;
......
274 273
  Address handler_;   // try-blocks are chained through the stack
275 274

  
276 275
#ifdef USE_SIMULATOR
277
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
278 276
  Simulator* simulator_;
279 277
#endif
280
#endif  // USE_SIMULATOR
281 278

  
282 279
  Address js_entry_sp_;  // the stack pointer of the bottom JS entry frame
283 280
  // the external callback we're currently in
......
308 305
  enum ParallelSystemComponent {
309 306
    PARALLEL_SWEEPING,
310 307
    CONCURRENT_SWEEPING,
311
    PARALLEL_MARKING,
312 308
    PARALLEL_RECOMPILATION
313 309
  };
314 310

  
......
497 493

  
498 494
  bool IsDefaultIsolate() const { return this == default_isolate_; }
499 495

  
496
  static void SetCrashIfDefaultIsolateInitialized();
500 497
  // Ensures that process-wide resources and the default isolate have been
501 498
  // allocated. It is only necessary to call this method in rare cases, for
502 499
  // example if you are using V8 from within the body of a static initializer.
......
753 750
  // Returns if the top context may access the given global object. If
754 751
  // the result is false, the pending exception is guaranteed to be
755 752
  // set.
753

  
754
  // TODO(yangguo): temporary wrappers
755
  bool MayNamedAccessWrapper(Handle<JSObject> receiver,
756
                             Handle<Object> key,
757
                             v8::AccessType type) {
758
    return MayNamedAccess(*receiver, *key, type);
759
  }
760
  bool MayIndexedAccessWrapper(Handle<JSObject> receiver,
761
                               uint32_t index,
762
                               v8::AccessType type) {
763
    return MayIndexedAccess(*receiver, index, type);
764
  }
765

  
756 766
  bool MayNamedAccess(JSObject* receiver,
757 767
                      Object* key,
758 768
                      v8::AccessType type);
......
984 994
  void PreallocatedStorageDelete(void* p);
985 995
  void PreallocatedStorageInit(size_t size);
986 996

  
997
  inline bool IsCodePreAgingActive();
998

  
987 999
#ifdef ENABLE_DEBUGGER_SUPPORT
988 1000
  Debugger* debugger() {
989 1001
    if (!NoBarrier_Load(&debugger_initialized_)) InitializeDebugger();
......
1098 1110
#endif  // DEBUG
1099 1111

  
1100 1112
  OptimizingCompilerThread* optimizing_compiler_thread() {
1101
    return &optimizing_compiler_thread_;
1113
    return optimizing_compiler_thread_;
1102 1114
  }
1103 1115

  
1104 1116
  // PreInits and returns a default isolate. Needed when a new thread tries
......
1106 1118
  // TODO(svenpanne) This method is on death row...
1107 1119
  static v8::Isolate* GetDefaultIsolateForLocking();
1108 1120

  
1109
  MarkingThread** marking_threads() {
1110
    return marking_thread_;
1111
  }
1112

  
1113 1121
  SweeperThread** sweeper_threads() {
1114 1122
    return sweeper_thread_;
1115 1123
  }
......
1131 1139
  // Given an address occupied by a live code object, return that object.
1132 1140
  Object* FindCodeObject(Address a);
1133 1141

  
1134
  bool is_memory_constrained() const {
1135
    return is_memory_constrained_;
1136
  }
1137
  void set_is_memory_constrained(bool value) {
1138
    is_memory_constrained_ = value;
1139
  }
1140

  
1141 1142
 private:
1142 1143
  Isolate();
1143 1144

  
......
1310 1311
  unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
1311 1312
  CodeStubInterfaceDescriptor* code_stub_interface_descriptors_;
1312 1313
  RandomNumberGenerator* random_number_generator_;
1313
  bool is_memory_constrained_;
1314 1314

  
1315 1315
  // True if fatal error has been signaled for this isolate.
1316 1316
  bool has_fatal_error_;
......
1368 1368
#endif
1369 1369

  
1370 1370
  DeferredHandles* deferred_handles_head_;
1371
  OptimizingCompilerThread optimizing_compiler_thread_;
1372
  MarkingThread** marking_thread_;
1371
  OptimizingCompilerThread* optimizing_compiler_thread_;
1373 1372
  SweeperThread** sweeper_thread_;
1374 1373

  
1375 1374
  // Counts deopt points if deopt_every_n_times is enabled.
......
1378 1377
  friend class ExecutionAccess;
1379 1378
  friend class HandleScopeImplementer;
1380 1379
  friend class IsolateInitializer;
1381
  friend class MarkingThread;
1382 1380
  friend class OptimizingCompilerThread;
1383 1381
  friend class SweeperThread;
1384 1382
  friend class ThreadManager;
......
1426 1424
class AssertNoContextChange BASE_EMBEDDED {
1427 1425
#ifdef DEBUG
1428 1426
 public:
1429
  AssertNoContextChange()
1430
    : isolate_(Isolate::Current()),
1431
      context_(isolate_->context()) { }
1427
  explicit AssertNoContextChange(Isolate* isolate)
1428
    : isolate_(isolate),
1429
      context_(isolate->context(), isolate) { }
1432 1430
  ~AssertNoContextChange() {
1433 1431
    ASSERT(isolate_->context() == *context_);
1434 1432
  }
......
1438 1436
  Handle<Context> context_;
1439 1437
#else
1440 1438
 public:
1441
  AssertNoContextChange() { }
1442
#endif
1443
};
1444

  
1445

  
1446
// TODO(mstarzinger): Depracate as soon as everything is handlified.
1447
class AssertNoContextChangeWithHandleScope BASE_EMBEDDED {
1448
#ifdef DEBUG
1449
 public:
1450
  AssertNoContextChangeWithHandleScope() :
1451
      isolate_(Isolate::Current()),
1452
      scope_(isolate_),
1453
      context_(isolate_->context(), isolate_) {
1454
  }
1455

  
1456
  ~AssertNoContextChangeWithHandleScope() {
1457
    ASSERT(isolate_->context() == *context_);
1458
  }
1459

  
1460
 private:
1461
  Isolate* isolate_;
1462
  HandleScope scope_;
1463
  Handle<Context> context_;
1464
#else
1465
 public:
1466
  AssertNoContextChangeWithHandleScope() { }
1439
  explicit AssertNoContextChange(Isolate* isolate) { }
1467 1440
#endif
1468 1441
};
1469 1442

  

Also available in: Unified diff