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

Unified Diff: src/compiler/typer.cc

Issue 1221683006: [turbofan] Remove unused constructor function matching from typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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') | test/cctest/compiler/test-changes-lowering.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 5d8b423290b05887fd62943af4831ae29a17416a..2a802c5be44dd7c6715b044ee1e541d70d5589f4 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -65,12 +65,9 @@ class TyperCache final {
Type::Integral32(), zone());
Type* const kClz32Func =
Type::Function(CreateRange(0, 32), Type::Number(), zone());
- Type* const kArrayBufferFunc =
- Type::Function(Type::Object(zone()), Type::Unsigned32(), zone());
#define TYPED_ARRAY(TypeName, type_name, TYPE_NAME, ctype, size) \
- Type* const k##TypeName##Array = CreateArray(k##TypeName); \
- Type* const k##TypeName##ArrayFunc = CreateArrayFunction(k##TypeName##Array);
+ Type* const k##TypeName##Array = CreateArray(k##TypeName);
TYPED_ARRAYS(TYPED_ARRAY)
#undef TYPED_ARRAY
@@ -119,12 +116,10 @@ class Typer::Decorator final : public GraphDecorator {
};
-Typer::Typer(Isolate* isolate, Graph* graph, Type::FunctionType* function_type,
- MaybeHandle<Context> context)
+Typer::Typer(Isolate* isolate, Graph* graph, Type::FunctionType* function_type)
: isolate_(isolate),
graph_(graph),
function_type_(function_type),
- context_(context),
decorator_(nullptr),
cache_(kCache.Get()) {
Zone* zone = this->zone();
@@ -261,7 +256,6 @@ class Typer::Visitor : public Reducer {
private:
Typer* typer_;
- MaybeHandle<Context> context_;
ZoneSet<NodeId> weakened_nodes_;
#define DECLARE_METHOD(x) inline Bounds Type##x(Node* node);
@@ -286,7 +280,6 @@ class Typer::Visitor : public Reducer {
Zone* zone() { return typer_->zone(); }
Isolate* isolate() { return typer_->isolate(); }
Graph* graph() { return typer_->graph(); }
- MaybeHandle<Context> context() { return typer_->context(); }
void SetWeakened(NodeId node_id) { weakened_nodes_.insert(node_id); }
bool IsWeakened(NodeId node_id) {
@@ -2337,28 +2330,6 @@ Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
default:
break;
}
- } else if (JSFunction::cast(*value)->IsBuiltin() && !context().is_null()) {
- Handle<Context> native =
- handle(context().ToHandleChecked()->native_context(), isolate());
- if (*value == native->array_buffer_fun()) {
- return typer_->cache_.kArrayBufferFunc;
- } else if (*value == native->int8_array_fun()) {
- return typer_->cache_.kInt8ArrayFunc;
- } else if (*value == native->int16_array_fun()) {
- return typer_->cache_.kInt16ArrayFunc;
- } else if (*value == native->int32_array_fun()) {
- return typer_->cache_.kInt32ArrayFunc;
- } else if (*value == native->uint8_array_fun()) {
- return typer_->cache_.kUint8ArrayFunc;
- } else if (*value == native->uint16_array_fun()) {
- return typer_->cache_.kUint16ArrayFunc;
- } else if (*value == native->uint32_array_fun()) {
- return typer_->cache_.kUint32ArrayFunc;
- } else if (*value == native->float32_array_fun()) {
- return typer_->cache_.kFloat32ArrayFunc;
- } else if (*value == native->float64_array_fun()) {
- return typer_->cache_.kFloat64ArrayFunc;
- }
}
int const arity =
JSFunction::cast(*value)->shared()->internal_formal_parameter_count();
« no previous file with comments | « src/compiler/typer.h ('k') | test/cctest/compiler/test-changes-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698