Commit db4101ef authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Make TyperCache global and thread safe.

This way we need the common types only once per process and we don't
need to recreate them for every compilation. It uses the same pattern
that we already apply to caching operators. This simplifies the type
cache a lot.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/1209513002

Cr-Commit-Position: refs/heads/master@{#29251}
parent 7a675e0e
This diff is collapsed.
......@@ -13,7 +13,7 @@ namespace internal {
namespace compiler {
// Forward declarations.
class LazyTypeCache;
class TyperCache;
class Typer {
......@@ -41,18 +41,14 @@ class Typer {
Type::FunctionType* function_type_;
MaybeHandle<Context> const context_;
Decorator* decorator_;
TyperCache const& cache_;
Type* singleton_false_;
Type* singleton_true_;
Type* singleton_zero_;
Type* singleton_one_;
Type* zero_or_one_;
Type* zeroish_;
Type* signed32ish_;
Type* unsigned32ish_;
Type* falsish_;
Type* truish_;
LazyTypeCache* const cache_;
DISALLOW_COPY_AND_ASSIGN(Typer);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment