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

Unified Diff: src/hydrogen.cc

Issue 1330153003: Adding template parameter to PrototypeIterator GetCurrent for casting (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: simplifications Created 5 years, 3 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/debug/debug-evaluate.cc ('k') | src/ic/handler-compiler.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 902e507258c6c722c829c244df0c1e17be632620..1bdc5aa71ccd18b8ad4fc855d5c52816e3cc07bf 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7351,7 +7351,7 @@ HInstruction* HOptimizedGraphBuilder::BuildMonomorphicElementAccess(
PrototypeIterator iter(map);
JSObject* holder = NULL;
while (!iter.IsAtEnd()) {
- holder = JSObject::cast(*PrototypeIterator::GetCurrent(iter));
+ holder = *PrototypeIterator::GetCurrent<JSObject>(iter);
iter.Advance();
}
DCHECK(holder && holder->IsJSObject());
@@ -7915,15 +7915,13 @@ HInstruction* HGraphBuilder::BuildCheckPrototypeMaps(Handle<JSObject> prototype,
PrototypeIterator::START_AT_RECEIVER);
while (holder.is_null() ||
!PrototypeIterator::GetCurrent(iter).is_identical_to(holder)) {
- BuildConstantMapCheck(
- Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)));
+ BuildConstantMapCheck(PrototypeIterator::GetCurrent<JSObject>(iter));
iter.Advance();
if (iter.IsAtEnd()) {
return NULL;
}
}
- return BuildConstantMapCheck(
- Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)));
+ return BuildConstantMapCheck(PrototypeIterator::GetCurrent<JSObject>(iter));
}
« no previous file with comments | « src/debug/debug-evaluate.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698