Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 5bb0764742ce79c94d675b96e5ebe1efea53331d..1f1173414dcd3a4911ed540da12a800daa675fdf 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -5457,10 +5457,10 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedMonomorphic( |
} |
// Handle a load of a constant known function. |
- if (lookup.IsConstantFunction()) { |
+ if (lookup.IsConstant()) { |
AddCheckMap(object, map); |
- Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*map)); |
- return new(zone()) HConstant(function); |
+ Handle<Object> constant(lookup.GetConstantFromMap(*map), isolate()); |
+ return new(zone()) HConstant(constant); |
} |
// Handle a load from a known field somewhere in the prototype chain. |
@@ -5478,14 +5478,14 @@ HInstruction* HOptimizedGraphBuilder::BuildLoadNamedMonomorphic( |
} |
// Handle a load of a constant function somewhere in the prototype chain. |
- if (lookup.IsConstantFunction()) { |
+ if (lookup.IsConstant()) { |
Handle<JSObject> prototype(JSObject::cast(map->prototype())); |
Handle<JSObject> holder(lookup.holder()); |
Handle<Map> holder_map(holder->map()); |
AddCheckMap(object, map); |
Add<HCheckPrototypeMaps>(prototype, holder, zone(), top_info()); |
- Handle<JSFunction> function(lookup.GetConstantFunctionFromMap(*holder_map)); |
- return new(zone()) HConstant(function); |
+ Handle<Object> constant(lookup.GetConstantFromMap(*holder_map), isolate()); |
+ return new(zone()) HConstant(constant); |
} |
// No luck, do a generic load. |