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

Unified Diff: src/compiler/typer.cc

Issue 1197703002: Use big-boy Types to annotate interface descriptor parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Latest Created 5 years, 6 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/typer.h ('k') | src/hydrogen-instructions.h » ('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 955fc754399f53c7fb0897bcf01f49551b41fc43..56a440c8d99f2509d322ab2c50c8f7ca79c900db 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -176,9 +176,11 @@ class Typer::Decorator final : public GraphDecorator {
};
-Typer::Typer(Isolate* isolate, Graph* graph, MaybeHandle<Context> context)
+Typer::Typer(Isolate* isolate, Graph* graph, Type::FunctionType* function_type,
+ MaybeHandle<Context> context)
: isolate_(isolate),
graph_(graph),
+ function_type_(function_type),
context_(context),
decorator_(NULL),
cache_(new (graph->zone()) LazyTypeCache(isolate, graph->zone())) {
@@ -634,6 +636,12 @@ Bounds Typer::Visitor::TypeIfException(Node* node) {
Bounds Typer::Visitor::TypeParameter(Node* node) {
+ int param = OpParameter<int>(node);
+ Type::FunctionType* function_type = typer_->function_type();
+ if (function_type != nullptr && param >= 0 &&
+ param < static_cast<int>(function_type->Arity())) {
+ return Bounds(Type::None(), function_type->Parameter(param));
+ }
return Bounds::Unbounded(zone());
}
« no previous file with comments | « src/compiler/typer.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698