From 5f57ebe222591b1734200eedead8c21f5776ce00 Mon Sep 17 00:00:00 2001 From: mstarzinger Date: Tue, 1 Sep 2015 02:25:19 -0700 Subject: [PATCH] Make isolate.h usable without objects-inl.h header. This CL us a pure refactoring that makes an empty compilation unit including just "isolate.h" or "contexts.h" but not "objects-inl.h" compile without warnings or errors. This is needed to further reduce the header dependency tangle. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1322883002 Cr-Commit-Position: refs/heads/master@{#30500} --- BUILD.gn | 2 + src/accessors.cc | 2 +- src/api-natives.cc | 2 +- src/api.cc | 1 + src/arm64/cpu-arm64.cc | 1 - src/bootstrapper.cc | 1 + src/builtins.cc | 1 + src/cancelable-task.cc | 1 - src/compiler.cc | 1 + src/compiler/common-node-cache.cc | 1 - src/compiler/source-position.cc | 1 - src/contexts-inl.h | 148 +++++++++++++++++++++ src/contexts.cc | 1 + src/contexts.h | 110 ++++----------- src/debug/debug-evaluate.cc | 2 +- src/debug/debug-scopes.cc | 1 + src/debug/debug.cc | 1 + src/debug/liveedit.cc | 1 + src/execution.cc | 1 + src/extensions/free-buffer-extension.cc | 1 - src/extensions/statistics-extension.cc | 1 - src/factory.cc | 17 +++ src/factory.h | 26 ++-- src/flags.cc | 2 +- src/full-codegen/full-codegen.cc | 4 +- src/heap/gc-tracer.cc | 3 +- src/heap/heap-inl.h | 2 +- src/heap/memory-reducer.cc | 3 +- src/hydrogen.cc | 1 + src/ic/arm/handler-compiler-arm.cc | 1 + src/ic/arm64/handler-compiler-arm64.cc | 1 + src/ic/handler-compiler.cc | 1 + src/ic/ia32/handler-compiler-ia32.cc | 1 + src/ic/ic.cc | 1 + src/ic/mips/handler-compiler-mips.cc | 1 + src/ic/mips64/handler-compiler-mips64.cc | 1 + src/ic/ppc/handler-compiler-ppc.cc | 1 + src/ic/x64/handler-compiler-x64.cc | 1 + src/ic/x87/handler-compiler-x87.cc | 1 + src/isolate-inl.h | 104 +++++++++++++++ src/isolate.cc | 13 ++ src/isolate.h | 85 +++--------- src/lookup.cc | 1 + src/messages.cc | 1 + src/objects-inl.h | 2 +- src/objects.cc | 1 + src/regexp/jsregexp.cc | 1 + src/regexp/regexp-macro-assembler.cc | 1 + src/regexp/regexp-stack.cc | 1 - src/runtime/runtime-array.cc | 1 + src/runtime/runtime-classes.cc | 1 + src/runtime/runtime-compiler.cc | 1 + src/runtime/runtime-date.cc | 1 + src/runtime/runtime-debug.cc | 1 + src/runtime/runtime-function.cc | 1 + src/runtime/runtime-i18n.cc | 1 + src/runtime/runtime-internal.cc | 1 + src/runtime/runtime-json.cc | 1 + src/runtime/runtime-literals.cc | 1 + src/runtime/runtime-liveedit.cc | 1 + src/runtime/runtime-object.cc | 1 + src/runtime/runtime-observe.cc | 1 + src/runtime/runtime-regexp.cc | 1 + src/runtime/runtime-scopes.cc | 1 + src/runtime/runtime-strings.cc | 1 + src/runtime/runtime-uri.cc | 1 + src/string-builder.cc | 1 + src/v8threads.cc | 1 + test/cctest/cctest.h | 1 + .../compiler/js-builtin-reducer-unittest.cc | 1 + .../compiler/js-typed-lowering-unittest.cc | 1 + tools/gyp/v8.gyp | 2 + 72 files changed, 401 insertions(+), 182 deletions(-) create mode 100644 src/contexts-inl.h create mode 100644 src/isolate-inl.h diff --git a/BUILD.gn b/BUILD.gn index 445c0c8..6d07d77 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -860,6 +860,7 @@ source_set("v8_base") { "src/compiler.h", "src/context-measure.cc", "src/context-measure.h", + "src/contexts-inl.h", "src/contexts.cc", "src/contexts.h", "src/conversions-inl.h", @@ -1053,6 +1054,7 @@ source_set("v8_base") { "src/interpreter/bytecode-generator.h", "src/interpreter/interpreter.cc", "src/interpreter/interpreter.h", + "src/isolate-inl.h", "src/isolate.cc", "src/isolate.h", "src/json-parser.h", diff --git a/src/accessors.cc b/src/accessors.cc index c1951b9..6544e71 100644 --- a/src/accessors.cc +++ b/src/accessors.cc @@ -10,7 +10,7 @@ #include "src/execution.h" #include "src/factory.h" #include "src/frames-inl.h" -#include "src/isolate.h" +#include "src/isolate-inl.h" #include "src/list-inl.h" #include "src/messages.h" #include "src/property-details.h" diff --git a/src/api-natives.cc b/src/api-natives.cc index 5993859..6f179b9 100644 --- a/src/api-natives.cc +++ b/src/api-natives.cc @@ -5,7 +5,7 @@ #include "src/api-natives.h" #include "src/api.h" -#include "src/isolate.h" +#include "src/isolate-inl.h" #include "src/lookup.h" #include "src/messages.h" diff --git a/src/api.cc b/src/api.cc index d2ad306..b703b0b 100644 --- a/src/api.cc +++ b/src/api.cc @@ -35,6 +35,7 @@ #include "src/heap-profiler.h" #include "src/heap-snapshot-generator-inl.h" #include "src/icu_util.h" +#include "src/isolate-inl.h" #include "src/json-parser.h" #include "src/messages.h" #include "src/parser.h" diff --git a/src/arm64/cpu-arm64.cc b/src/arm64/cpu-arm64.cc index bde3e4a..57180b5 100644 --- a/src/arm64/cpu-arm64.cc +++ b/src/arm64/cpu-arm64.cc @@ -8,7 +8,6 @@ #include "src/arm64/utils-arm64.h" #include "src/assembler.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 0cd2779..d7b4cec 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -14,6 +14,7 @@ #include "src/extensions/statistics-extension.h" #include "src/extensions/trigger-failure-extension.h" #include "src/heap/heap.h" +#include "src/isolate-inl.h" #include "src/snapshot/natives.h" #include "src/snapshot/snapshot.h" #include "third_party/fdlibm/fdlibm.h" diff --git a/src/builtins.cc b/src/builtins.cc index 37286c6..8908852 100644 --- a/src/builtins.cc +++ b/src/builtins.cc @@ -16,6 +16,7 @@ #include "src/heap-profiler.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/prototype.h" #include "src/vm-state-inl.h" diff --git a/src/cancelable-task.cc b/src/cancelable-task.cc index 969b342..5927c22 100644 --- a/src/cancelable-task.cc +++ b/src/cancelable-task.cc @@ -6,7 +6,6 @@ #include "src/base/platform/platform.h" #include "src/isolate.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/compiler.cc b/src/compiler.cc index 008bcfe..3a833c5 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -19,6 +19,7 @@ #include "src/gdb-jit.h" #include "src/hydrogen.h" #include "src/interpreter/interpreter.h" +#include "src/isolate-inl.h" #include "src/lithium.h" #include "src/log-inl.h" #include "src/messages.h" diff --git a/src/compiler/common-node-cache.cc b/src/compiler/common-node-cache.cc index b005c95..e7f7436 100644 --- a/src/compiler/common-node-cache.cc +++ b/src/compiler/common-node-cache.cc @@ -6,7 +6,6 @@ #include "src/assembler.h" #include "src/compiler/node.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/compiler/source-position.cc b/src/compiler/source-position.cc index aba77b3..48361ec 100644 --- a/src/compiler/source-position.cc +++ b/src/compiler/source-position.cc @@ -5,7 +5,6 @@ #include "src/compiler/source-position.h" #include "src/compiler/graph.h" #include "src/compiler/node-aux-data.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/contexts-inl.h b/src/contexts-inl.h new file mode 100644 index 0000000..e88cd33 --- /dev/null +++ b/src/contexts-inl.h @@ -0,0 +1,148 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_CONTEXTS_INL_H_ +#define V8_CONTEXTS_INL_H_ + +#include "src/contexts.h" +#include "src/objects-inl.h" + +namespace v8 { +namespace internal { + + +// static +ScriptContextTable* ScriptContextTable::cast(Object* context) { + DCHECK(context->IsScriptContextTable()); + return reinterpret_cast(context); +} + + +int ScriptContextTable::used() const { + return Smi::cast(get(kUsedSlot))->value(); +} + + +void ScriptContextTable::set_used(int used) { + set(kUsedSlot, Smi::FromInt(used)); +} + + +// static +Handle ScriptContextTable::GetContext(Handle table, + int i) { + DCHECK(i < table->used()); + return Handle::cast(FixedArray::get(table, i + kFirstContextSlot)); +} + + +// static +Context* Context::cast(Object* context) { + DCHECK(context->IsContext()); + return reinterpret_cast(context); +} + + +JSFunction* Context::closure() { return JSFunction::cast(get(CLOSURE_INDEX)); } +void Context::set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); } + + +Context* Context::previous() { + Object* result = get(PREVIOUS_INDEX); + DCHECK(IsBootstrappingOrValidParentContext(result, this)); + return reinterpret_cast(result); +} +void Context::set_previous(Context* context) { set(PREVIOUS_INDEX, context); } + + +bool Context::has_extension() { return extension() != nullptr; } +Object* Context::extension() { return get(EXTENSION_INDEX); } +void Context::set_extension(Object* object) { set(EXTENSION_INDEX, object); } + + +JSModule* Context::module() { return JSModule::cast(get(EXTENSION_INDEX)); } +void Context::set_module(JSModule* module) { set(EXTENSION_INDEX, module); } + + +GlobalObject* Context::global_object() { + Object* result = get(GLOBAL_OBJECT_INDEX); + DCHECK(IsBootstrappingOrGlobalObject(this->GetIsolate(), result)); + return reinterpret_cast(result); +} + + +void Context::set_global_object(GlobalObject* object) { + set(GLOBAL_OBJECT_INDEX, object); +} + + +bool Context::IsNativeContext() { + Map* map = this->map(); + return map == map->GetHeap()->native_context_map(); +} + + +bool Context::IsFunctionContext() { + Map* map = this->map(); + return map == map->GetHeap()->function_context_map(); +} + + +bool Context::IsCatchContext() { + Map* map = this->map(); + return map == map->GetHeap()->catch_context_map(); +} + + +bool Context::IsWithContext() { + Map* map = this->map(); + return map == map->GetHeap()->with_context_map(); +} + + +bool Context::IsBlockContext() { + Map* map = this->map(); + return map == map->GetHeap()->block_context_map(); +} + + +bool Context::IsModuleContext() { + Map* map = this->map(); + return map == map->GetHeap()->module_context_map(); +} + + +bool Context::IsScriptContext() { + Map* map = this->map(); + return map == map->GetHeap()->script_context_map(); +} + + +bool Context::HasSameSecurityTokenAs(Context* that) { + return this->global_object()->native_context()->security_token() == + that->global_object()->native_context()->security_token(); +} + + +#define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \ + void Context::set_##name(type* value) { \ + DCHECK(IsNativeContext()); \ + set(index, value); \ + } \ + bool Context::is_##name(type* value) { \ + DCHECK(IsNativeContext()); \ + return type::cast(get(index)) == value; \ + } \ + type* Context::name() { \ + DCHECK(IsNativeContext()); \ + return type::cast(get(index)); \ + } +NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) +#undef NATIVE_CONTEXT_FIELD_ACCESSORS + + +} // namespace internal +} // namespace v8 + +#endif // V8_CONTEXTS_INL_H_ diff --git a/src/contexts.cc b/src/contexts.cc index d66a330..ade019a 100644 --- a/src/contexts.cc +++ b/src/contexts.cc @@ -6,6 +6,7 @@ #include "src/bootstrapper.h" #include "src/debug/debug.h" +#include "src/isolate-inl.h" #include "src/scopeinfo.h" namespace v8 { diff --git a/src/contexts.h b/src/contexts.h index 4e4dd2c..8d85667 100644 --- a/src/contexts.h +++ b/src/contexts.h @@ -299,10 +299,7 @@ enum BindingFlags { class ScriptContextTable : public FixedArray { public: // Conversions. - static ScriptContextTable* cast(Object* context) { - DCHECK(context->IsScriptContextTable()); - return reinterpret_cast(context); - } + static inline ScriptContextTable* cast(Object* context); struct LookupResult { int context_index; @@ -313,13 +310,11 @@ class ScriptContextTable : public FixedArray { MaybeAssignedFlag maybe_assigned_flag; }; - int used() const { return Smi::cast(get(kUsedSlot))->value(); } - void set_used(int used) { set(kUsedSlot, Smi::FromInt(used)); } + inline int used() const; + inline void set_used(int used); - static Handle GetContext(Handle table, int i) { - DCHECK(i < table->used()); - return Handle::cast(FixedArray::get(table, i + kFirstContextSlot)); - } + static inline Handle GetContext(Handle table, + int i); // Lookup a variable `name` in a ScriptContextTable. // If it returns true, the variable is found and `result` contains @@ -399,10 +394,7 @@ class ScriptContextTable : public FixedArray { class Context: public FixedArray { public: // Conversions. - static Context* cast(Object* context) { - DCHECK(context->IsContext()); - return reinterpret_cast(context); - } + static inline Context* cast(Object* context); // The default context slot layout; indices are FixedArray slot indices. enum { @@ -438,40 +430,30 @@ class Context: public FixedArray { }; // Direct slot access. - JSFunction* closure() { return JSFunction::cast(get(CLOSURE_INDEX)); } - void set_closure(JSFunction* closure) { set(CLOSURE_INDEX, closure); } + inline JSFunction* closure(); + inline void set_closure(JSFunction* closure); - Context* previous() { - Object* result = unchecked_previous(); - DCHECK(IsBootstrappingOrValidParentContext(result, this)); - return reinterpret_cast(result); - } - void set_previous(Context* context) { set(PREVIOUS_INDEX, context); } + inline Context* previous(); + inline void set_previous(Context* context); - bool has_extension() { return extension() != nullptr; } - Object* extension() { return get(EXTENSION_INDEX); } - void set_extension(Object* object) { set(EXTENSION_INDEX, object); } + inline bool has_extension(); + inline Object* extension(); + inline void set_extension(Object* object); JSObject* extension_object(); JSReceiver* extension_receiver(); ScopeInfo* scope_info(); String* catch_name(); - JSModule* module() { return JSModule::cast(get(EXTENSION_INDEX)); } - void set_module(JSModule* module) { set(EXTENSION_INDEX, module); } + inline JSModule* module(); + inline void set_module(JSModule* module); // Get the context where var declarations will be hoisted to, which // may be the context itself. Context* declaration_context(); bool is_declaration_context(); - GlobalObject* global_object() { - Object* result = get(GLOBAL_OBJECT_INDEX); - DCHECK(IsBootstrappingOrGlobalObject(this->GetIsolate(), result)); - return reinterpret_cast(result); - } - void set_global_object(GlobalObject* object) { - set(GLOBAL_OBJECT_INDEX, object); - } + inline GlobalObject* global_object(); + inline void set_global_object(GlobalObject* object); // Returns a JSGlobalProxy object or null. JSObject* global_proxy(); @@ -489,39 +471,15 @@ class Context: public FixedArray { // Predicates for context types. IsNativeContext is also defined on Object // because we frequently have to know if arbitrary objects are natives // contexts. - bool IsNativeContext() { - Map* map = this->map(); - return map == map->GetHeap()->native_context_map(); - } - bool IsFunctionContext() { - Map* map = this->map(); - return map == map->GetHeap()->function_context_map(); - } - bool IsCatchContext() { - Map* map = this->map(); - return map == map->GetHeap()->catch_context_map(); - } - bool IsWithContext() { - Map* map = this->map(); - return map == map->GetHeap()->with_context_map(); - } - bool IsBlockContext() { - Map* map = this->map(); - return map == map->GetHeap()->block_context_map(); - } - bool IsModuleContext() { - Map* map = this->map(); - return map == map->GetHeap()->module_context_map(); - } - bool IsScriptContext() { - Map* map = this->map(); - return map == map->GetHeap()->script_context_map(); - } + inline bool IsNativeContext(); + inline bool IsFunctionContext(); + inline bool IsCatchContext(); + inline bool IsWithContext(); + inline bool IsBlockContext(); + inline bool IsModuleContext(); + inline bool IsScriptContext(); - bool HasSameSecurityTokenAs(Context* that) { - return this->global_object()->native_context()->security_token() == - that->global_object()->native_context()->security_token(); - } + inline bool HasSameSecurityTokenAs(Context* that); // Initializes global variable bindings in given script context. void InitializeGlobalSlots(); @@ -549,18 +507,9 @@ class Context: public FixedArray { Handle function); #define NATIVE_CONTEXT_FIELD_ACCESSORS(index, type, name) \ - void set_##name(type* value) { \ - DCHECK(IsNativeContext()); \ - set(index, value); \ - } \ - bool is_##name(type* value) { \ - DCHECK(IsNativeContext()); \ - return type::cast(get(index)) == value; \ - } \ - type* name() { \ - DCHECK(IsNativeContext()); \ - return type::cast(get(index)); \ - } + inline void set_##name(type* value); \ + inline bool is_##name(type* value); \ + inline type* name(); NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSORS) #undef NATIVE_CONTEXT_FIELD_ACCESSORS @@ -630,9 +579,6 @@ class Context: public FixedArray { kSize> MarkCompactBodyDescriptor; private: - // Unchecked access to the slots. - Object* unchecked_previous() { return get(PREVIOUS_INDEX); } - #ifdef DEBUG // Bootstrapping-aware type checks. static bool IsBootstrappingOrValidParentContext(Object* object, Context* kid); diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc index 323da73..10bc754 100644 --- a/src/debug/debug-evaluate.cc +++ b/src/debug/debug-evaluate.cc @@ -10,7 +10,7 @@ #include "src/debug/debug-frames.h" #include "src/debug/debug-scopes.h" #include "src/frames-inl.h" -#include "src/isolate.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/debug/debug-scopes.cc b/src/debug/debug-scopes.cc index 8502c48..8252154 100644 --- a/src/debug/debug-scopes.cc +++ b/src/debug/debug-scopes.cc @@ -7,6 +7,7 @@ #include "src/debug/debug.h" #include "src/frames-inl.h" #include "src/globals.h" +#include "src/isolate-inl.h" #include "src/parser.h" #include "src/scopes.h" diff --git a/src/debug/debug.cc b/src/debug/debug.cc index 297156f..aea0b37 100644 --- a/src/debug/debug.cc +++ b/src/debug/debug.cc @@ -16,6 +16,7 @@ #include "src/frames-inl.h" #include "src/full-codegen/full-codegen.h" #include "src/global-handles.h" +#include "src/isolate-inl.h" #include "src/list.h" #include "src/log.h" #include "src/messages.h" diff --git a/src/debug/liveedit.cc b/src/debug/liveedit.cc index 8312dd3..e0419f4 100644 --- a/src/debug/liveedit.cc +++ b/src/debug/liveedit.cc @@ -11,6 +11,7 @@ #include "src/deoptimizer.h" #include "src/frames-inl.h" #include "src/global-handles.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/parser.h" #include "src/scopeinfo.h" diff --git a/src/execution.cc b/src/execution.cc index 64e5e39..377210e 100644 --- a/src/execution.cc +++ b/src/execution.cc @@ -7,6 +7,7 @@ #include "src/bootstrapper.h" #include "src/codegen.h" #include "src/deoptimizer.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/vm-state-inl.h" diff --git a/src/extensions/free-buffer-extension.cc b/src/extensions/free-buffer-extension.cc index 946d4d7..5bd5631 100644 --- a/src/extensions/free-buffer-extension.cc +++ b/src/extensions/free-buffer-extension.cc @@ -6,7 +6,6 @@ #include "src/base/platform/platform.h" #include "src/isolate.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/extensions/statistics-extension.cc b/src/extensions/statistics-extension.cc index 5612259..76dcd43 100644 --- a/src/extensions/statistics-extension.cc +++ b/src/extensions/statistics-extension.cc @@ -7,7 +7,6 @@ #include "src/counters.h" #include "src/heap/heap-inl.h" #include "src/isolate.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/factory.cc b/src/factory.cc index 4f45be0..e934f18 100644 --- a/src/factory.cc +++ b/src/factory.cc @@ -8,6 +8,7 @@ #include "src/base/bits.h" #include "src/bootstrapper.h" #include "src/conversions.h" +#include "src/isolate-inl.h" #include "src/macro-assembler.h" namespace v8 { @@ -1136,6 +1137,22 @@ Handle Factory::NewError(Handle constructor, } +#define DEFINE_ERROR(NAME, name) \ + Handle Factory::New##NAME(MessageTemplate::Template template_index, \ + Handle arg0, Handle arg1, \ + Handle arg2) { \ + return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ + arg2); \ + } +DEFINE_ERROR(Error, error) +DEFINE_ERROR(EvalError, eval_error) +DEFINE_ERROR(RangeError, range_error) +DEFINE_ERROR(ReferenceError, reference_error) +DEFINE_ERROR(SyntaxError, syntax_error) +DEFINE_ERROR(TypeError, type_error) +#undef DEFINE_ERROR + + void Factory::InitializeFunction(Handle function, Handle info, Handle context) { diff --git a/src/factory.h b/src/factory.h index 6e8f950..375c0bd 100644 --- a/src/factory.h +++ b/src/factory.h @@ -557,21 +557,17 @@ class Factory final { Handle arg1 = Handle(), Handle arg2 = Handle()); -#define DEFINE_ERROR(NAME, name) \ - Handle New##NAME(MessageTemplate::Template template_index, \ - Handle arg0 = Handle(), \ - Handle arg1 = Handle(), \ - Handle arg2 = Handle()) { \ - return NewError(isolate()->name##_function(), template_index, arg0, arg1, \ - arg2); \ - } - - DEFINE_ERROR(Error, error) - DEFINE_ERROR(EvalError, eval_error) - DEFINE_ERROR(RangeError, range_error) - DEFINE_ERROR(ReferenceError, reference_error) - DEFINE_ERROR(SyntaxError, syntax_error) - DEFINE_ERROR(TypeError, type_error) +#define DECLARE_ERROR(NAME) \ + Handle New##NAME(MessageTemplate::Template template_index, \ + Handle arg0 = Handle(), \ + Handle arg1 = Handle(), \ + Handle arg2 = Handle()); + DECLARE_ERROR(Error) + DECLARE_ERROR(EvalError) + DECLARE_ERROR(RangeError) + DECLARE_ERROR(ReferenceError) + DECLARE_ERROR(SyntaxError) + DECLARE_ERROR(TypeError) #undef DEFINE_ERROR Handle NumberToString(Handle number, diff --git a/src/flags.cc b/src/flags.cc index 1899d7e..6d9ca58 100644 --- a/src/flags.cc +++ b/src/flags.cc @@ -12,7 +12,7 @@ #include "src/assembler.h" #include "src/base/functional.h" #include "src/base/platform/platform.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! +#include "src/list-inl.h" #include "src/ostreams.h" #include "src/utils.h" diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc index de312a9..fa2f921 100644 --- a/src/full-codegen/full-codegen.cc +++ b/src/full-codegen/full-codegen.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/full-codegen/full-codegen.h" + #include "src/ast.h" #include "src/ast-numbering.h" #include "src/code-factory.h" @@ -9,7 +11,7 @@ #include "src/compiler.h" #include "src/debug/debug.h" #include "src/debug/liveedit.h" -#include "src/full-codegen/full-codegen.h" +#include "src/isolate-inl.h" #include "src/macro-assembler.h" #include "src/prettyprinter.h" #include "src/scopeinfo.h" diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc index 06a894a..7c9dbdc 100644 --- a/src/heap/gc-tracer.cc +++ b/src/heap/gc-tracer.cc @@ -5,9 +5,8 @@ #include "src/heap/gc-tracer.h" #include "src/counters.h" -#include "src/heap/heap.h" +#include "src/heap/heap-inl.h" #include "src/isolate.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h index e5e4981..29ba854 100644 --- a/src/heap/heap-inl.h +++ b/src/heap/heap-inl.h @@ -19,7 +19,7 @@ #include "src/list-inl.h" #include "src/log.h" #include "src/msan.h" -#include "src/objects.h" +#include "src/objects-inl.h" namespace v8 { namespace internal { diff --git a/src/heap/memory-reducer.cc b/src/heap/memory-reducer.cc index 4cf8bc2..44088f2 100644 --- a/src/heap/memory-reducer.cc +++ b/src/heap/memory-reducer.cc @@ -6,8 +6,7 @@ #include "src/flags.h" #include "src/heap/gc-tracer.h" -#include "src/heap/heap.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! +#include "src/heap/heap-inl.h" #include "src/utils.h" #include "src/v8.h" diff --git a/src/hydrogen.cc b/src/hydrogen.cc index 9cc715c..fadf6e9 100644 --- a/src/hydrogen.cc +++ b/src/hydrogen.cc @@ -35,6 +35,7 @@ #include "src/ic/ic.h" // GetRootConstructor #include "src/ic/ic-inl.h" +#include "src/isolate-inl.h" #include "src/lithium-allocator.h" #include "src/parser.h" #include "src/runtime/runtime.h" diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc index 6f4ddcf..1760a89 100644 --- a/src/ic/arm/handler-compiler-arm.cc +++ b/src/ic/arm/handler-compiler-arm.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/arm64/handler-compiler-arm64.cc b/src/ic/arm64/handler-compiler-arm64.cc index 71c70da..5de4364 100644 --- a/src/ic/arm64/handler-compiler-arm64.cc +++ b/src/ic/arm64/handler-compiler-arm64.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc index 98b30aa..7e242d3 100644 --- a/src/ic/handler-compiler.cc +++ b/src/ic/handler-compiler.cc @@ -8,6 +8,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/ic.h" #include "src/ic/ic-inl.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc index c45821f..5845abf 100644 --- a/src/ic/ia32/handler-compiler-ia32.cc +++ b/src/ic/ia32/handler-compiler-ia32.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/ic.cc b/src/ic/ic.cc index 50fc1ad..644df52 100644 --- a/src/ic/ic.cc +++ b/src/ic/ic.cc @@ -17,6 +17,7 @@ #include "src/ic/ic-inl.h" #include "src/ic/ic-compiler.h" #include "src/ic/stub-cache.h" +#include "src/isolate-inl.h" #include "src/macro-assembler.h" #include "src/prototype.h" #include "src/runtime/runtime.h" diff --git a/src/ic/mips/handler-compiler-mips.cc b/src/ic/mips/handler-compiler-mips.cc index e3d4ae3..7f10a8e 100644 --- a/src/ic/mips/handler-compiler-mips.cc +++ b/src/ic/mips/handler-compiler-mips.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/mips64/handler-compiler-mips64.cc b/src/ic/mips64/handler-compiler-mips64.cc index 49e9265..6b59a99 100644 --- a/src/ic/mips64/handler-compiler-mips64.cc +++ b/src/ic/mips64/handler-compiler-mips64.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/ppc/handler-compiler-ppc.cc b/src/ic/ppc/handler-compiler-ppc.cc index 9ec2f5f..d4b2314 100644 --- a/src/ic/ppc/handler-compiler-ppc.cc +++ b/src/ic/ppc/handler-compiler-ppc.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc index 920d06c..fe6d168 100644 --- a/src/ic/x64/handler-compiler-x64.cc +++ b/src/ic/x64/handler-compiler-x64.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/ic/x87/handler-compiler-x87.cc b/src/ic/x87/handler-compiler-x87.cc index c0d5fd8..2cc1489 100644 --- a/src/ic/x87/handler-compiler-x87.cc +++ b/src/ic/x87/handler-compiler-x87.cc @@ -7,6 +7,7 @@ #include "src/ic/call-optimization.h" #include "src/ic/handler-compiler.h" #include "src/ic/ic.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/isolate-inl.h b/src/isolate-inl.h new file mode 100644 index 0000000..c281c24 --- /dev/null +++ b/src/isolate-inl.h @@ -0,0 +1,104 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef V8_ISOLATE_INL_H_ +#define V8_ISOLATE_INL_H_ + +#include "src/isolate.h" +#include "src/objects-inl.h" + +namespace v8 { +namespace internal { + + +void Isolate::set_context(Context* context) { + DCHECK(context == NULL || context->IsContext()); + thread_local_top_.context_ = context; +} + + +Object* Isolate::pending_exception() { + DCHECK(has_pending_exception()); + DCHECK(!thread_local_top_.pending_exception_->IsException()); + return thread_local_top_.pending_exception_; +} + + +void Isolate::set_pending_exception(Object* exception_obj) { + DCHECK(!exception_obj->IsException()); + thread_local_top_.pending_exception_ = exception_obj; +} + + +void Isolate::clear_pending_exception() { + DCHECK(!thread_local_top_.pending_exception_->IsException()); + thread_local_top_.pending_exception_ = heap_.the_hole_value(); +} + + +bool Isolate::has_pending_exception() { + DCHECK(!thread_local_top_.pending_exception_->IsException()); + return !thread_local_top_.pending_exception_->IsTheHole(); +} + + +void Isolate::clear_pending_message() { + thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); +} + + +Object* Isolate::scheduled_exception() { + DCHECK(has_scheduled_exception()); + DCHECK(!thread_local_top_.scheduled_exception_->IsException()); + return thread_local_top_.scheduled_exception_; +} + + +bool Isolate::has_scheduled_exception() { + DCHECK(!thread_local_top_.scheduled_exception_->IsException()); + return thread_local_top_.scheduled_exception_ != heap_.the_hole_value(); +} + + +void Isolate::clear_scheduled_exception() { + DCHECK(!thread_local_top_.scheduled_exception_->IsException()); + thread_local_top_.scheduled_exception_ = heap_.the_hole_value(); +} + + +bool Isolate::is_catchable_by_javascript(Object* exception) { + return exception != heap()->termination_exception(); +} + + +Handle Isolate::global_object() { + return Handle(context()->global_object()); +} + + +Isolate::ExceptionScope::ExceptionScope(Isolate* isolate) + : isolate_(isolate), + pending_exception_(isolate_->pending_exception(), isolate_) {} + + +Isolate::ExceptionScope::~ExceptionScope() { + isolate_->set_pending_exception(*pending_exception_); +} + + +#define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ + Handle Isolate::name() { \ + return Handle(native_context()->name(), this); \ + } \ + bool Isolate::is_##name(type* value) { \ + return native_context()->is_##name(value); \ + } +NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) +#undef NATIVE_CONTEXT_FIELD_ACCESSOR + + +} // namespace internal +} // namespace v8 + +#endif // V8_ISOLATE_INL_H_ diff --git a/src/isolate.cc b/src/isolate.cc index 73c7bf1..d60a481 100644 --- a/src/isolate.cc +++ b/src/isolate.cc @@ -26,6 +26,7 @@ #include "src/hydrogen.h" #include "src/ic/stub-cache.h" #include "src/interpreter/interpreter.h" +#include "src/isolate-inl.h" #include "src/lithium-allocator.h" #include "src/log.h" #include "src/messages.h" @@ -2798,6 +2799,18 @@ SaveContext::SaveContext(Isolate* isolate) } +SaveContext::~SaveContext() { + isolate_->set_context(context_.is_null() ? NULL : *context_); + isolate_->set_save_context(prev_); +} + + +#ifdef DEBUG +AssertNoContextChange::AssertNoContextChange(Isolate* isolate) + : isolate_(isolate), context_(isolate->context(), isolate) {} +#endif // DEBUG + + bool PostponeInterruptsScope::Intercept(StackGuard::InterruptFlag flag) { // First check whether the previous scope intercepts. if (prev_ && prev_->Intercept(flag)) return true; diff --git a/src/isolate.h b/src/isolate.h index d416fba..b9ee070 100644 --- a/src/isolate.h +++ b/src/isolate.h @@ -544,10 +544,7 @@ class Isolate { // Access to top context (where the current function object was created). Context* context() { return thread_local_top_.context_; } - void set_context(Context* context) { - DCHECK(context == NULL || context->IsContext()); - thread_local_top_.context_ = context; - } + inline void set_context(Context* context); Context** context_address() { return &thread_local_top_.context_; } THREAD_LOCAL_TOP_ACCESSOR(SaveContext*, save_context) @@ -556,28 +553,13 @@ class Isolate { THREAD_LOCAL_TOP_ACCESSOR(ThreadId, thread_id) // Interface to pending exception. - Object* pending_exception() { - DCHECK(has_pending_exception()); - DCHECK(!thread_local_top_.pending_exception_->IsException()); - return thread_local_top_.pending_exception_; - } - - void set_pending_exception(Object* exception_obj) { - DCHECK(!exception_obj->IsException()); - thread_local_top_.pending_exception_ = exception_obj; - } - - void clear_pending_exception() { - DCHECK(!thread_local_top_.pending_exception_->IsException()); - thread_local_top_.pending_exception_ = heap_.the_hole_value(); - } + inline Object* pending_exception(); + inline void set_pending_exception(Object* exception_obj); + inline void clear_pending_exception(); THREAD_LOCAL_TOP_ADDRESS(Object*, pending_exception) - bool has_pending_exception() { - DCHECK(!thread_local_top_.pending_exception_->IsException()); - return !thread_local_top_.pending_exception_->IsTheHole(); - } + inline bool has_pending_exception(); THREAD_LOCAL_TOP_ADDRESS(Context*, pending_handler_context) THREAD_LOCAL_TOP_ADDRESS(Code*, pending_handler_code) @@ -587,9 +569,6 @@ class Isolate { THREAD_LOCAL_TOP_ACCESSOR(bool, external_caught_exception) - void clear_pending_message() { - thread_local_top_.pending_message_obj_ = heap_.the_hole_value(); - } v8::TryCatch* try_catch_handler() { return thread_local_top_.try_catch_handler(); } @@ -599,30 +578,19 @@ class Isolate { THREAD_LOCAL_TOP_ADDRESS(Object*, scheduled_exception) + inline void clear_pending_message(); Address pending_message_obj_address() { return reinterpret_cast
(&thread_local_top_.pending_message_obj_); } - Object* scheduled_exception() { - DCHECK(has_scheduled_exception()); - DCHECK(!thread_local_top_.scheduled_exception_->IsException()); - return thread_local_top_.scheduled_exception_; - } - bool has_scheduled_exception() { - DCHECK(!thread_local_top_.scheduled_exception_->IsException()); - return thread_local_top_.scheduled_exception_ != heap_.the_hole_value(); - } - void clear_scheduled_exception() { - DCHECK(!thread_local_top_.scheduled_exception_->IsException()); - thread_local_top_.scheduled_exception_ = heap_.the_hole_value(); - } + inline Object* scheduled_exception(); + inline bool has_scheduled_exception(); + inline void clear_scheduled_exception(); bool IsJavaScriptHandlerOnTop(Object* exception); bool IsExternalHandlerOnTop(Object* exception); - bool is_catchable_by_javascript(Object* exception) { - return exception != heap()->termination_exception(); - } + inline bool is_catchable_by_javascript(Object* exception); // JS execution stack (see frames.h). static Address c_entry_fp(ThreadLocalTop* thread) { @@ -649,9 +617,7 @@ class Isolate { // Returns the global object of the current context. It could be // a builtin object, or a JS global object. - Handle global_object() { - return Handle(context()->global_object()); - } + inline Handle global_object(); // Returns the global proxy object of the current context. JSObject* global_proxy() { @@ -676,13 +642,8 @@ class Isolate { public: // Scope currently can only be used for regular exceptions, // not termination exception. - explicit ExceptionScope(Isolate* isolate) - : isolate_(isolate), - pending_exception_(isolate_->pending_exception(), isolate_) {} - - ~ExceptionScope() { - isolate_->set_pending_exception(*pending_exception_); - } + inline explicit ExceptionScope(Isolate* isolate); + inline ~ExceptionScope(); private: Isolate* isolate_; @@ -830,13 +791,9 @@ class Isolate { ISOLATE_INIT_ARRAY_LIST(GLOBAL_ARRAY_ACCESSOR) #undef GLOBAL_ARRAY_ACCESSOR -#define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ - Handle name() { \ - return Handle(native_context()->name(), this); \ - } \ - bool is_##name(type* value) { \ - return native_context()->is_##name(value); \ - } +#define NATIVE_CONTEXT_FIELD_ACCESSOR(index, type, name) \ + inline Handle name(); \ + inline bool is_##name(type* value); NATIVE_CONTEXT_FIELDS(NATIVE_CONTEXT_FIELD_ACCESSOR) #undef NATIVE_CONTEXT_FIELD_ACCESSOR @@ -1407,11 +1364,7 @@ class PromiseOnStack { class SaveContext BASE_EMBEDDED { public: explicit SaveContext(Isolate* isolate); - - ~SaveContext() { - isolate_->set_context(context_.is_null() ? NULL : *context_); - isolate_->set_save_context(prev_); - } + ~SaveContext(); Handle context() { return context_; } SaveContext* prev() { return prev_; } @@ -1432,9 +1385,7 @@ class SaveContext BASE_EMBEDDED { class AssertNoContextChange BASE_EMBEDDED { #ifdef DEBUG public: - explicit AssertNoContextChange(Isolate* isolate) - : isolate_(isolate), - context_(isolate->context(), isolate) { } + explicit AssertNoContextChange(Isolate* isolate); ~AssertNoContextChange() { DCHECK(isolate_->context() == *context_); } diff --git a/src/lookup.cc b/src/lookup.cc index 71be9a8..013d074 100644 --- a/src/lookup.cc +++ b/src/lookup.cc @@ -6,6 +6,7 @@ #include "src/bootstrapper.h" #include "src/deoptimizer.h" +#include "src/isolate-inl.h" #include "src/lookup-inl.h" namespace v8 { diff --git a/src/messages.cc b/src/messages.cc index 4dcac50..eee8bea 100644 --- a/src/messages.cc +++ b/src/messages.cc @@ -6,6 +6,7 @@ #include "src/api.h" #include "src/execution.h" +#include "src/isolate-inl.h" #include "src/string-builder.h" namespace v8 { diff --git a/src/objects-inl.h b/src/objects-inl.h index a37fcd5..5b3c38e 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -14,7 +14,7 @@ #include "src/base/atomicops.h" #include "src/base/bits.h" -#include "src/contexts.h" +#include "src/contexts-inl.h" #include "src/conversions-inl.h" #include "src/factory.h" #include "src/field-index-inl.h" diff --git a/src/objects.cc b/src/objects.cc index 8d57271..0a5b3d8 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -30,6 +30,7 @@ #include "src/hydrogen.h" #include "src/ic/ic.h" #include "src/interpreter/bytecodes.h" +#include "src/isolate-inl.h" #include "src/log.h" #include "src/lookup.h" #include "src/macro-assembler.h" diff --git a/src/regexp/jsregexp.cc b/src/regexp/jsregexp.cc index 61d8792..438d1b1 100644 --- a/src/regexp/jsregexp.cc +++ b/src/regexp/jsregexp.cc @@ -10,6 +10,7 @@ #include "src/compiler.h" #include "src/execution.h" #include "src/factory.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/ostreams.h" #include "src/parser.h" diff --git a/src/regexp/regexp-macro-assembler.cc b/src/regexp/regexp-macro-assembler.cc index 20105c0..9916d5f 100644 --- a/src/regexp/regexp-macro-assembler.cc +++ b/src/regexp/regexp-macro-assembler.cc @@ -6,6 +6,7 @@ #include "src/assembler.h" #include "src/ast.h" +#include "src/isolate-inl.h" #include "src/regexp/regexp-stack.h" #include "src/simulator.h" diff --git a/src/regexp/regexp-stack.cc b/src/regexp/regexp-stack.cc index 348e684..34f9127 100644 --- a/src/regexp/regexp-stack.cc +++ b/src/regexp/regexp-stack.cc @@ -5,7 +5,6 @@ #include "src/regexp/regexp-stack.h" #include "src/isolate.h" -#include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! namespace v8 { namespace internal { diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc index fa0d91b..c93f442 100644 --- a/src/runtime/runtime-array.cc +++ b/src/runtime/runtime-array.cc @@ -8,6 +8,7 @@ #include "src/conversions-inl.h" #include "src/elements.h" #include "src/factory.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/prototype.h" diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc index 9766111..bc273ee 100644 --- a/src/runtime/runtime-classes.cc +++ b/src/runtime/runtime-classes.cc @@ -10,6 +10,7 @@ #include "src/arguments.h" #include "src/debug/debug.h" #include "src/frames-inl.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/runtime/runtime.h" diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc index e7f567f..872cd8b 100644 --- a/src/runtime/runtime-compiler.cc +++ b/src/runtime/runtime-compiler.cc @@ -9,6 +9,7 @@ #include "src/deoptimizer.h" #include "src/frames-inl.h" #include "src/full-codegen/full-codegen.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/v8threads.h" #include "src/vm-state-inl.h" diff --git a/src/runtime/runtime-date.cc b/src/runtime/runtime-date.cc index 4231d82..4d238b4 100644 --- a/src/runtime/runtime-date.cc +++ b/src/runtime/runtime-date.cc @@ -9,6 +9,7 @@ #include "src/date.h" #include "src/dateparser-inl.h" #include "src/factory.h" +#include "src/isolate-inl.h" #include "src/messages.h" namespace v8 { diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc index 18f987c..02d6cf9 100644 --- a/src/runtime/runtime-debug.cc +++ b/src/runtime/runtime-debug.cc @@ -10,6 +10,7 @@ #include "src/debug/debug-frames.h" #include "src/debug/debug-scopes.h" #include "src/frames-inl.h" +#include "src/isolate-inl.h" #include "src/runtime/runtime.h" namespace v8 { diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc index 31cda72..d92d13e 100644 --- a/src/runtime/runtime-function.cc +++ b/src/runtime/runtime-function.cc @@ -10,6 +10,7 @@ #include "src/cpu-profiler.h" #include "src/deoptimizer.h" #include "src/frames-inl.h" +#include "src/isolate-inl.h" #include "src/messages.h" namespace v8 { diff --git a/src/runtime/runtime-i18n.cc b/src/runtime/runtime-i18n.cc index 290c228..8eefca9 100644 --- a/src/runtime/runtime-i18n.cc +++ b/src/runtime/runtime-i18n.cc @@ -11,6 +11,7 @@ #include "src/arguments.h" #include "src/factory.h" #include "src/i18n.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "unicode/brkiter.h" diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc index d5d57a0..b578c25 100644 --- a/src/runtime/runtime-internal.cc +++ b/src/runtime/runtime-internal.cc @@ -9,6 +9,7 @@ #include "src/conversions.h" #include "src/debug/debug.h" #include "src/frames-inl.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/parser.h" #include "src/prettyprinter.h" diff --git a/src/runtime/runtime-json.cc b/src/runtime/runtime-json.cc index 64a42bf..07ccb99 100644 --- a/src/runtime/runtime-json.cc +++ b/src/runtime/runtime-json.cc @@ -6,6 +6,7 @@ #include "src/arguments.h" #include "src/char-predicates-inl.h" +#include "src/isolate-inl.h" #include "src/json-parser.h" #include "src/json-stringifier.h" #include "src/objects-inl.h" diff --git a/src/runtime/runtime-literals.cc b/src/runtime/runtime-literals.cc index f434747..9b1b2b2 100644 --- a/src/runtime/runtime-literals.cc +++ b/src/runtime/runtime-literals.cc @@ -7,6 +7,7 @@ #include "src/allocation-site-scopes.h" #include "src/arguments.h" #include "src/ast.h" +#include "src/isolate-inl.h" #include "src/parser.h" #include "src/runtime/runtime.h" diff --git a/src/runtime/runtime-liveedit.cc b/src/runtime/runtime-liveedit.cc index 3b8dad9..947ef2c 100644 --- a/src/runtime/runtime-liveedit.cc +++ b/src/runtime/runtime-liveedit.cc @@ -9,6 +9,7 @@ #include "src/debug/debug-frames.h" #include "src/debug/liveedit.h" #include "src/frames-inl.h" +#include "src/isolate-inl.h" #include "src/runtime/runtime.h" namespace v8 { diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc index 7acffc9..e53aef6 100644 --- a/src/runtime/runtime-object.cc +++ b/src/runtime/runtime-object.cc @@ -7,6 +7,7 @@ #include "src/arguments.h" #include "src/bootstrapper.h" #include "src/debug/debug.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/runtime/runtime.h" diff --git a/src/runtime/runtime-observe.cc b/src/runtime/runtime-observe.cc index e4ce23f..df0b2a3 100644 --- a/src/runtime/runtime-observe.cc +++ b/src/runtime/runtime-observe.cc @@ -6,6 +6,7 @@ #include "src/arguments.h" #include "src/debug/debug.h" +#include "src/isolate-inl.h" namespace v8 { namespace internal { diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc index de671f5..c987e7b 100644 --- a/src/runtime/runtime-regexp.cc +++ b/src/runtime/runtime-regexp.cc @@ -6,6 +6,7 @@ #include "src/arguments.h" #include "src/conversions-inl.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/regexp/jsregexp-inl.h" #include "src/regexp/jsregexp.h" diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc index 3839a27..1bfd323 100644 --- a/src/runtime/runtime-scopes.cc +++ b/src/runtime/runtime-scopes.cc @@ -7,6 +7,7 @@ #include "src/accessors.h" #include "src/arguments.h" #include "src/frames-inl.h" +#include "src/isolate-inl.h" #include "src/messages.h" #include "src/scopeinfo.h" #include "src/scopes.h" diff --git a/src/runtime/runtime-strings.cc b/src/runtime/runtime-strings.cc index bb4207f..33625a1 100644 --- a/src/runtime/runtime-strings.cc +++ b/src/runtime/runtime-strings.cc @@ -6,6 +6,7 @@ #include "src/arguments.h" #include "src/conversions-inl.h" +#include "src/isolate-inl.h" #include "src/regexp/jsregexp-inl.h" #include "src/regexp/jsregexp.h" #include "src/string-builder.h" diff --git a/src/runtime/runtime-uri.cc b/src/runtime/runtime-uri.cc index 4f77af8..d4e62ce 100644 --- a/src/runtime/runtime-uri.cc +++ b/src/runtime/runtime-uri.cc @@ -6,6 +6,7 @@ #include "src/arguments.h" #include "src/conversions.h" +#include "src/isolate-inl.h" #include "src/objects-inl.h" #include "src/string-search.h" #include "src/utils.h" diff --git a/src/string-builder.cc b/src/string-builder.cc index 30c64b3..e24def6 100644 --- a/src/string-builder.cc +++ b/src/string-builder.cc @@ -4,6 +4,7 @@ #include "src/string-builder.h" +#include "src/isolate-inl.h" #include "src/objects-inl.h" namespace v8 { diff --git a/src/v8threads.cc b/src/v8threads.cc index b533a90..34d26ec 100644 --- a/src/v8threads.cc +++ b/src/v8threads.cc @@ -8,6 +8,7 @@ #include "src/bootstrapper.h" #include "src/debug/debug.h" #include "src/execution.h" +#include "src/isolate-inl.h" #include "src/regexp/regexp-stack.h" namespace v8 { diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h index b012686..8f4e958 100644 --- a/test/cctest/cctest.h +++ b/test/cctest/cctest.h @@ -29,6 +29,7 @@ #define CCTEST_H_ #include "include/libplatform/libplatform.h" +#include "src/isolate-inl.h" // TODO(everyone): Make cctest IWYU. #include "src/objects-inl.h" // TODO(everyone): Make cctest IWYU. #include "src/v8.h" diff --git a/test/unittests/compiler/js-builtin-reducer-unittest.cc b/test/unittests/compiler/js-builtin-reducer-unittest.cc index 13e282b..9e0cee0 100644 --- a/test/unittests/compiler/js-builtin-reducer-unittest.cc +++ b/test/unittests/compiler/js-builtin-reducer-unittest.cc @@ -6,6 +6,7 @@ #include "src/compiler/js-graph.h" #include "src/compiler/node-properties.h" #include "src/compiler/typer.h" +#include "src/isolate-inl.h" #include "test/unittests/compiler/graph-unittest.h" #include "test/unittests/compiler/node-test-utils.h" #include "testing/gmock-support.h" diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc index e9a6b97..6236855 100644 --- a/test/unittests/compiler/js-typed-lowering-unittest.cc +++ b/test/unittests/compiler/js-typed-lowering-unittest.cc @@ -10,6 +10,7 @@ #include "src/compiler/machine-operator.h" #include "src/compiler/node-properties.h" #include "src/compiler/operator-properties.h" +#include "src/isolate-inl.h" #include "test/unittests/compiler/compiler-test-utils.h" #include "test/unittests/compiler/graph-unittest.h" #include "test/unittests/compiler/node-test-utils.h" diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp index 5d50ec8..c00311e 100644 --- a/tools/gyp/v8.gyp +++ b/tools/gyp/v8.gyp @@ -618,6 +618,7 @@ '../../src/compiler.h', '../../src/context-measure.cc', '../../src/context-measure.h', + '../../src/contexts-inl.h', '../../src/contexts.cc', '../../src/contexts.h', '../../src/conversions-inl.h', @@ -810,6 +811,7 @@ '../../src/interpreter/bytecode-array-builder.h', '../../src/interpreter/interpreter.cc', '../../src/interpreter/interpreter.h', + '../../src/isolate-inl.h', '../../src/isolate.cc', '../../src/isolate.h', '../../src/json-parser.h', -- 2.7.4