Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: src/compiler/typer.cc

Issue 1124813005: WIP Atomics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AtomicsLoad type in typer.cc Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index dafd3c95a128f317d0033d1d0b6aeb2e0441f0a2..dff8b179fa7579ed41a9a879d7cb346dfc6a9c6a 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -31,6 +31,7 @@ enum LazyCachedType {
kNumberFunc2,
kImulFunc,
kClz32Func,
+ kAtomicsLoadFunc,
kArrayBufferFunc,
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
k##Type, k##Type##Array, k##Type##ArrayFunc,
@@ -90,6 +91,10 @@ class LazyTypeCache final : public ZoneObject {
Type::Integral32(), zone());
case kClz32Func:
return Type::Function(CreateRange(0, 32), Type::Number(), zone());
+ case kAtomicsLoadFunc:
+ return Type::Function(
+ Type::Union(Type::Number(), Type::Undefined(), zone()),
+ Type::Object(zone()), Type::Unsigned32(), zone());
case kArrayBufferFunc:
return Type::Function(Type::Object(zone()), Type::Unsigned32(), zone());
#define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
@@ -1814,6 +1819,11 @@ Bounds Typer::Visitor::TypeLoadElement(Node* node) {
}
+Bounds Typer::Visitor::TypeLoadElementAtomic(Node* node) {
+ return Bounds(ElementAccessOf(node->op()).type);
+}
+
+
Bounds Typer::Visitor::TypeStoreField(Node* node) {
UNREACHABLE();
return Bounds();
@@ -1849,6 +1859,11 @@ Bounds Typer::Visitor::TypeLoad(Node* node) {
}
+Bounds Typer::Visitor::TypeLoadAtomic(Node* node) {
+ return Bounds::Unbounded(zone());
+}
+
+
Bounds Typer::Visitor::TypeStore(Node* node) {
UNREACHABLE();
return Bounds();
@@ -2332,6 +2347,8 @@ Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
return typer_->cache_->Get(kImulFunc);
case kMathClz32:
return typer_->cache_->Get(kClz32Func);
+ case kAtomicsLoad:
+ return typer_->cache_->Get(kAtomicsLoadFunc);
default:
break;
}
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698