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

Unified Diff: src/ic.cc

Issue 228263005: Implement structural function and array types (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Eps Created 6 years, 8 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/ia32/stub-cache-ia32.cc ('k') | src/objects-inl.h » ('j') | src/types.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index a00df8537c0724e5c1726d127f76641989809850..fe69717db28a07fc7bf495f2a5b77567a7c65103 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -640,7 +640,8 @@ bool IC::UpdatePolymorphicIC(Handle<HeapType> type,
for (int i = 0; i < number_of_types; i++) {
Handle<HeapType> current_type = types.at(i);
- if (current_type->IsClass() && current_type->AsClass()->is_deprecated()) {
+ if (current_type->IsClass() &&
+ current_type->AsClass()->Map()->is_deprecated()) {
// Filter out deprecated maps to ensure their instances get migrated.
++deprecated_types;
} else if (type->NowIs(current_type)) {
@@ -651,8 +652,8 @@ bool IC::UpdatePolymorphicIC(Handle<HeapType> type,
} else if (handler_to_overwrite == -1 &&
current_type->IsClass() &&
type->IsClass() &&
- IsTransitionOfMonomorphicTarget(*current_type->AsClass(),
- *type->AsClass())) {
+ IsTransitionOfMonomorphicTarget(*current_type->AsClass()->Map(),
+ *type->AsClass()->Map())) {
handler_to_overwrite = i;
}
}
@@ -694,10 +695,11 @@ Handle<Map> IC::TypeToMap(HeapType* type, Isolate* isolate) {
return isolate->factory()->heap_number_map();
if (type->Is(HeapType::Boolean())) return isolate->factory()->boolean_map();
if (type->IsConstant()) {
- return handle(Handle<JSGlobalObject>::cast(type->AsConstant())->map());
+ return handle(
+ Handle<JSGlobalObject>::cast(type->AsConstant()->Value())->map());
}
ASSERT(type->IsClass());
- return type->AsClass();
+ return type->AsClass()->Map();
}
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/objects-inl.h » ('j') | src/types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698