Make HConstant::InstanceOf less ambiguous.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/23203002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 0ecd03ab
...@@ -2862,7 +2862,7 @@ HCheckMaps* HCheckMaps::New(Zone* zone, ...@@ -2862,7 +2862,7 @@ HCheckMaps* HCheckMaps::New(Zone* zone,
check_map->Add(map, zone); check_map->Add(map, zone);
if (map->CanOmitMapChecks() && if (map->CanOmitMapChecks() &&
value->IsConstant() && value->IsConstant() &&
HConstant::cast(value)->InstanceOf(map)) { HConstant::cast(value)->HasMap(map)) {
check_map->omit(info); check_map->omit(info);
} }
return check_map; return check_map;
......
...@@ -2608,6 +2608,7 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { ...@@ -2608,6 +2608,7 @@ class HCheckMaps V8_FINAL : public HTemplateInstruction<2> {
omit_ = true; omit_ = true;
for (int i = 0; i < map_set_.length(); i++) { for (int i = 0; i < map_set_.length(); i++) {
Handle<Map> map = map_set_.at(i); Handle<Map> map = map_set_.at(i);
if (!map->CanTransition()) continue;
map->AddDependentCompilationInfo(DependentCode::kPrototypeCheckGroup, map->AddDependentCompilationInfo(DependentCode::kPrototypeCheckGroup,
info); info);
} }
...@@ -3243,10 +3244,10 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> { ...@@ -3243,10 +3244,10 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> {
return handle_; return handle_;
} }
bool InstanceOf(Handle<Map> map) { bool HasMap(Handle<Map> map) {
Handle<Object> constant_object = handle(); Handle<Object> constant_object = handle();
return constant_object->IsJSObject() && return constant_object->IsHeapObject() &&
Handle<JSObject>::cast(constant_object)->map() == *map; Handle<HeapObject>::cast(constant_object)->map() == *map;
} }
bool IsSpecialDouble() const { bool IsSpecialDouble() const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment