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

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: 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
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index bf55f7ca66e3eb65845a852d565769716950c53a..664abf8c9c8515528a044e3f8522b90b6384d583 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 = iter.GetCurrent<JSObject>();
Jakob Kummerow 2015/09/09 14:29:55 I think you need to keep the '*' -- when a Prototy
Camillo Bruni 2015/09/09 17:24:07 PrototypeIterator::GetCurrent and ->/.GetCurrent a
Camillo Bruni 2015/09/10 10:53:59 reverted
iter.Advance();
}
DCHECK(holder && holder->IsJSObject());
@@ -7880,15 +7880,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') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698