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

Unified Diff: src/hydrogen.cc

Issue 19485008: Replace CONSTANT_FUNCTION by CONSTANT (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 5 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/heap-snapshot-generator.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/heap-snapshot-generator.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698