Revision: 16279
Author: [email protected]
Date: Thu Aug 22 14:22:55 2013 UTC
Log: Make HConstant::InstanceOf less ambiguous.
[email protected]
Review URL: https://codereview.chromium.org/23203002
http://code.google.com/p/v8/source/detail?r=16279
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.cc
/branches/bleeding_edge/src/hydrogen-instructions.h
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Wed Aug 21
14:49:56 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Thu Aug 22
14:22:55 2013 UTC
@@ -2862,7 +2862,7 @@
check_map->Add(map, zone);
if (map->CanOmitMapChecks() &&
value->IsConstant() &&
- HConstant::cast(value)->InstanceOf(map)) {
+ HConstant::cast(value)->HasMap(map)) {
check_map->omit(info);
}
return check_map;
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Wed Aug 21 14:49:56
2013 UTC
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Thu Aug 22 14:22:55
2013 UTC
@@ -2608,6 +2608,7 @@
omit_ = true;
for (int i = 0; i < map_set_.length(); i++) {
Handle<Map> map = map_set_.at(i);
+ if (!map->CanTransition()) continue;
map->AddDependentCompilationInfo(DependentCode::kPrototypeCheckGroup,
info);
}
@@ -3243,10 +3244,10 @@
return handle_;
}
- bool InstanceOf(Handle<Map> map) {
+ bool HasMap(Handle<Map> map) {
Handle<Object> constant_object = handle();
- return constant_object->IsJSObject() &&
- Handle<JSObject>::cast(constant_object)->map() == *map;
+ return constant_object->IsHeapObject() &&
+ Handle<HeapObject>::cast(constant_object)->map() == *map;
}
bool IsSpecialDouble() const {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.