Skip to content

Commit

Permalink
[jumbo] #undef TRACE at the end of source files
Browse files Browse the repository at this point in the history
This macro is defined all over the place, and often causes macro
redefinition errors in jumbo builds.  Let's make sure all such
instances created in source files are #undef'ed.

Candidate files found with:
  grep -wL '#undef TRACE' $(git grep -wl '#define TRACE' -- '*.cc')

While we're at it, let's undef all macros defined in these files.

Bug: chromium:746958
Change-Id: I639ca2b141f908457d1b2601cd6d5827dee0ead0
Reviewed-on: https://chromium-review.googlesource.com/652476
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#47859}
  • Loading branch information
mostynb authored and Commit Bot committed Sep 6, 2017
1 parent 40c98da commit b91b8de
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/js-inlining-heuristic.cc
Expand Up @@ -394,6 +394,8 @@ SimplifiedOperatorBuilder* JSInliningHeuristic::simplified() const {
return jsgraph()->simplified();
}

#undef TRACE

} // namespace compiler
} // namespace internal
} // namespace v8
8 changes: 8 additions & 0 deletions src/compiler/mips/instruction-selector-mips.cc
Expand Up @@ -2369,6 +2369,14 @@ InstructionSelector::AlignmentRequirements() {
}
}

#undef SIMD_BINOP_LIST
#undef SIMD_SHIFT_OP_LIST
#undef SIMD_UNOP_LIST
#undef SIMD_TYPE_LIST
#undef SIMD_FORMAT_LIST
#undef TRACE_UNIMPL
#undef TRACE

} // namespace compiler
} // namespace internal
} // namespace v8
9 changes: 9 additions & 0 deletions src/compiler/mips64/instruction-selector-mips64.cc
Expand Up @@ -2756,6 +2756,7 @@ void InstructionSelector::VisitInt64AbsWithOverflow(Node* node) {
V(I16x8) \
V(I8x16)

// TODO(mostynb@opera.com): this is never used, remove it?
#define SIMD_FORMAT_LIST(V) \
V(32x4) \
V(16x8) \
Expand Down Expand Up @@ -3064,6 +3065,14 @@ InstructionSelector::AlignmentRequirements() {
}
}

#undef SIMD_BINOP_LIST
#undef SIMD_SHIFT_OP_LIST
#undef SIMD_UNOP_LIST
#undef SIMD_FORMAT_LIST
#undef SIMD_TYPE_LIST
#undef TRACE_UNIMPL
#undef TRACE

} // namespace compiler
} // namespace internal
} // namespace v8
4 changes: 4 additions & 0 deletions src/wasm/wasm-module.cc
Expand Up @@ -1151,6 +1151,10 @@ const char* ExternalKindName(WasmExternalKind kind) {
return "unknown";
}

#undef TRACE
#undef TRACE_CHAIN
#undef TRACE_COMPILE

} // namespace wasm
} // namespace internal
} // namespace v8
12 changes: 12 additions & 0 deletions src/wasm/wasm-objects.cc
Expand Up @@ -22,6 +22,7 @@
if (FLAG_trace_wasm_instances) PrintF(__VA_ARGS__); \
} while (false)

// TODO(mostynb@opera.com): this is never used, remove it?
#define TRACE_CHAIN(instance) \
do { \
instance->PrintInstancesChain(); \
Expand Down Expand Up @@ -1147,7 +1148,15 @@ bool WasmCompiledModule::IsWasmCompiledModule(Object* obj) {
#define WCM_CHECK_LARGE_NUMBER(TYPE, NAME) \
WCM_CHECK_TYPE(NAME, obj->IsUndefined(isolate) || obj->IsMutableHeapNumber())
WCM_PROPERTY_TABLE(WCM_CHECK)
#undef WCM_CHECK_TYPE
#undef WCM_CHECK_OBJECT
#undef WCM_CHECK_CONST_OBJECT
#undef WCM_CHECK_WASM_OBJECT
#undef WCM_CHECK_WEAK_LINK
#undef WCM_CHECK_SMALL_NUMBER
#undef WCM_CHECK
#undef WCM_CHECK_SMALL_CONST_NUMBER
#undef WCM_CHECK_LARGE_NUMBER

// All checks passed.
return true;
Expand Down Expand Up @@ -1569,5 +1578,8 @@ Handle<Code> WasmCompiledModule::CompileLazy(
patch_caller);
}

#undef TRACE
#undef TRACE_CHAIN

} // namespace internal
} // namespace v8

0 comments on commit b91b8de

Please sign in to comment.