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

Unified Diff: src/interface.cc

Issue 11093074: Get rid of static module allocation, do it in code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed last comments; added other back-ends Created 8 years, 1 month 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/interface.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interface.cc
diff --git a/src/interface.cc b/src/interface.cc
index 336be82c60f28089ac26d364c6d79771f7a279d1..1634a37113fca9c3266d9ca248354250725b1fb0 100644
--- a/src/interface.cc
+++ b/src/interface.cc
@@ -170,6 +170,8 @@ void Interface::DoUnify(Interface* that, bool* ok, Zone* zone) {
ASSERT(that->forward_ == NULL);
ASSERT(!this->IsValue());
ASSERT(!that->IsValue());
+ ASSERT(this->index_ == -1);
+ ASSERT(that->index_ == -1);
ASSERT(*ok);
#ifdef DEBUG
@@ -194,15 +196,6 @@ void Interface::DoUnify(Interface* that, bool* ok, Zone* zone) {
return;
}
- // Merge instance.
- if (!that->instance_.is_null()) {
- if (!this->instance_.is_null() && *this->instance_ != *that->instance_) {
- *ok = false;
- return;
- }
- this->instance_ = that->instance_;
- }
-
// Merge interfaces.
this->flags_ |= that->flags_;
that->forward_ = this;
@@ -227,7 +220,7 @@ void Interface::Print(int n) {
} else if (IsValue()) {
PrintF("value\n");
} else if (IsModule()) {
- PrintF("module %s{", IsFrozen() ? "" : "(unresolved) ");
+ PrintF("module %d %s{", Index(), IsFrozen() ? "" : "(unresolved) ");
ZoneHashMap* map = Chase()->exports_;
if (map == NULL || map->occupancy() == 0) {
PrintF("}\n");
« no previous file with comments | « src/interface.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698