diff options
Diffstat (limited to 'deps/v8/src/isolate.h')
-rw-r--r-- | deps/v8/src/isolate.h | 73 |
1 files changed, 39 insertions, 34 deletions
diff --git a/deps/v8/src/isolate.h b/deps/v8/src/isolate.h index 8d0d3b478f..87bc45bb51 100644 --- a/deps/v8/src/isolate.h +++ b/deps/v8/src/isolate.h @@ -33,6 +33,8 @@ class RandomNumberGenerator; namespace internal { +class AccessCompilerData; +class AddressToIndexHashMap; class BasicBlockProfiler; class Bootstrapper; class CancelableTaskManager; @@ -44,6 +46,7 @@ class CodeRange; class CodeStubDescriptor; class CodeTracer; class CompilationCache; +class CompilerDispatcherTracer; class CompilationStatistics; class ContextSlotCache; class Counters; @@ -57,12 +60,12 @@ class ExternalCallbackScope; class ExternalReferenceTable; class Factory; class HandleScopeImplementer; +class HeapObjectToIndexHashMap; class HeapProfiler; class HStatistics; class HTracer; class InlineRuntimeFunctionsTable; class InnerPointerToCodeCache; -class KeyedLookupCache; class Logger; class MaterializedObjectStore; class OptimizingCompileDispatcher; @@ -116,16 +119,6 @@ class Interpreter; #define RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, T) \ RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, MaybeHandle<T>()) -#define RETURN_RESULT(isolate, call, T) \ - do { \ - Handle<T> __result__; \ - if (!(call).ToHandle(&__result__)) { \ - DCHECK((isolate)->has_pending_exception()); \ - return MaybeHandle<T>(); \ - } \ - return __result__; \ - } while (false) - #define RETURN_RESULT_OR_FAILURE(isolate, call) \ do { \ Handle<Object> __result__; \ @@ -409,9 +402,12 @@ typedef List<HeapObject*> DebugObjectCache; V(Object*, string_stream_current_security_token, nullptr) \ V(ExternalReferenceTable*, external_reference_table, nullptr) \ V(intptr_t*, api_external_references, nullptr) \ - V(base::HashMap*, external_reference_map, nullptr) \ - V(base::HashMap*, root_index_map, nullptr) \ + V(AddressToIndexHashMap*, external_reference_map, nullptr) \ + V(HeapObjectToIndexHashMap*, root_index_map, nullptr) \ + V(v8::DeserializeInternalFieldsCallback, \ + deserialize_internal_fields_callback, nullptr) \ V(int, pending_microtask_count, 0) \ + V(int, debug_microtask_count, 0) \ V(HStatistics*, hstatistics, nullptr) \ V(CompilationStatistics*, turbo_statistics, nullptr) \ V(HTracer*, htracer, nullptr) \ @@ -723,7 +719,7 @@ class Isolate { void ReportFailedAccessCheck(Handle<JSObject> receiver); // Exception throwing support. The caller should use the result - // of Throw() as its return vaue. + // of Throw() as its return value. Object* Throw(Object* exception, MessageLocation* location = NULL); Object* ThrowIllegalOperation(); @@ -868,10 +864,6 @@ class Isolate { return materialized_object_store_; } - KeyedLookupCache* keyed_lookup_cache() { - return keyed_lookup_cache_; - } - ContextSlotCache* context_slot_cache() { return context_slot_cache_; } @@ -886,7 +878,6 @@ class Isolate { DCHECK(handle_scope_implementer_); return handle_scope_implementer_; } - Zone* runtime_zone() { return runtime_zone_; } UnicodeCache* unicode_cache() { return unicode_cache_; @@ -927,6 +918,8 @@ class Isolate { RegExpStack* regexp_stack() { return regexp_stack_; } + List<int>* regexp_indices() { return ®exp_indices_; } + unibrow::Mapping<unibrow::Ecma262Canonicalize>* interp_canonicalize_mapping() { return ®exp_macro_assembler_canonicalize_; @@ -994,8 +987,8 @@ class Isolate { Map* get_initial_js_array_map(ElementsKind kind); - static const int kArrayProtectorValid = 1; - static const int kArrayProtectorInvalid = 0; + static const int kProtectorValid = 1; + static const int kProtectorInvalid = 0; bool IsFastArrayConstructorPrototypeChainIntact(); inline bool IsArraySpeciesLookupChainIntact(); @@ -1003,6 +996,10 @@ class Isolate { bool IsIsConcatSpreadableLookupChainIntact(); bool IsIsConcatSpreadableLookupChainIntact(JSReceiver* receiver); inline bool IsStringLengthOverflowIntact(); + inline bool IsArrayIteratorLookupChainIntact(); + + // Avoid deopt loops if fast Array Iterators migrate to slow Array Iterators. + inline bool IsFastArrayIterationIntact(); // On intent to set an element in object, make sure that appropriate // notifications occur if the set is on the elements of the array or @@ -1022,12 +1019,15 @@ class Isolate { void InvalidateHasInstanceProtector(); void InvalidateIsConcatSpreadableProtector(); void InvalidateStringLengthOverflowProtector(); + void InvalidateArrayIteratorProtector(); // Returns true if array is the initial array prototype in any native context. bool IsAnyInitialArrayPrototype(Handle<JSArray> array); CallInterfaceDescriptorData* call_descriptor_data(int index); + AccessCompilerData* access_compiler_data() { return access_compiler_data_; } + void IterateDeferredHandles(ObjectVisitor* visitor); void LinkDeferredHandles(DeferredHandles* deferred_handles); void UnlinkDeferredHandles(DeferredHandles* deferred_handles); @@ -1063,7 +1063,11 @@ class Isolate { void* stress_deopt_count_address() { return &stress_deopt_count_; } - base::RandomNumberGenerator* random_number_generator(); + V8_EXPORT_PRIVATE base::RandomNumberGenerator* random_number_generator(); + + // Generates a random number that is non-zero when masked + // with the provided mask. + int GenerateIdentityHash(uint32_t mask); // Given an address occupied by a live code object, return that object. Object* FindCodeObject(Address a); @@ -1076,12 +1080,6 @@ class Isolate { return id; } - void IncrementJsCallsFromApiCounter() { ++js_calls_from_api_counter_; } - - unsigned int js_calls_from_api_counter() { - return js_calls_from_api_counter_; - } - // Get (and lazily initialize) the registry for per-isolate symbols. Handle<JSObject> GetSymbolRegistry(); @@ -1101,12 +1099,16 @@ class Isolate { void ReportPromiseReject(Handle<JSObject> promise, Handle<Object> value, v8::PromiseRejectEvent event); - void PromiseResolveThenableJob(Handle<PromiseContainer> container, + void PromiseReactionJob(Handle<PromiseReactionJobInfo> info, + MaybeHandle<Object>* result, + MaybeHandle<Object>* maybe_exception); + void PromiseResolveThenableJob(Handle<PromiseResolveThenableJobInfo> info, MaybeHandle<Object>* result, MaybeHandle<Object>* maybe_exception); void EnqueueMicrotask(Handle<Object> microtask); void RunMicrotasks(); bool IsRunningMicrotasks() const { return is_running_microtasks_; } + int GetNextDebugMicrotaskId() { return debug_microtask_count_++; } void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback); void CountUsage(v8::Isolate::UseCounterFeature feature); @@ -1151,6 +1153,10 @@ class Isolate { AccountingAllocator* allocator() { return allocator_; } + CompilerDispatcherTracer* compiler_dispatcher_tracer() const { + return compiler_dispatcher_tracer_; + } + bool IsInAnyContext(Object* object, uint32_t index); void SetRAILMode(RAILMode rail_mode); @@ -1319,14 +1325,12 @@ class Isolate { bool capture_stack_trace_for_uncaught_exceptions_; int stack_trace_for_uncaught_exceptions_frame_limit_; StackTrace::StackTraceOptions stack_trace_for_uncaught_exceptions_options_; - KeyedLookupCache* keyed_lookup_cache_; ContextSlotCache* context_slot_cache_; DescriptorLookupCache* descriptor_lookup_cache_; HandleScopeData handle_scope_data_; HandleScopeImplementer* handle_scope_implementer_; UnicodeCache* unicode_cache_; AccountingAllocator* allocator_; - Zone* runtime_zone_; InnerPointerToCodeCache* inner_pointer_to_code_cache_; GlobalHandles* global_handles_; EternalHandles* eternal_handles_; @@ -1339,8 +1343,10 @@ class Isolate { unibrow::Mapping<unibrow::Ecma262Canonicalize> regexp_macro_assembler_canonicalize_; RegExpStack* regexp_stack_; + List<int> regexp_indices_; DateCache* date_cache_; CallInterfaceDescriptorData* call_descriptor_data_; + AccessCompilerData* access_compiler_data_; base::RandomNumberGenerator* random_number_generator_; base::AtomicValue<RAILMode> rail_mode_; @@ -1377,6 +1383,8 @@ class Isolate { interpreter::Interpreter* interpreter_; + CompilerDispatcherTracer* compiler_dispatcher_tracer_; + typedef std::pair<InterruptCallback, void*> InterruptEntry; std::queue<InterruptEntry> api_interrupts_queue_; @@ -1409,9 +1417,6 @@ class Isolate { int next_optimization_id_; - // Counts javascript calls from the API. Wraps around on overflow. - unsigned int js_calls_from_api_counter_; - #if TRACE_MAPS int next_unique_sfi_id_; #endif |