Fix win32 build by moving template function definition.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
1370cae14b
commit
0fedb6fcc0
@ -744,28 +744,6 @@ void Proxy::ProxyVerify() {
|
||||
ASSERT(IsProxy());
|
||||
}
|
||||
|
||||
template<typename Shape, typename Key>
|
||||
void Dictionary<Shape, Key>::Print() {
|
||||
int capacity = HashTable<Shape, Key>::Capacity();
|
||||
for (int i = 0; i < capacity; i++) {
|
||||
Object* k = HashTable<Shape, Key>::KeyAt(i);
|
||||
if (HashTable<Shape, Key>::IsKey(k)) {
|
||||
PrintF(" ");
|
||||
if (k->IsString()) {
|
||||
String::cast(k)->StringPrint();
|
||||
} else {
|
||||
k->ShortPrint();
|
||||
}
|
||||
PrintF(": ");
|
||||
ValueAt(i)->ShortPrint();
|
||||
PrintF("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Template instantiations.
|
||||
template void Dictionary<NumberDictionaryShape, uint32_t>::Print();
|
||||
template void Dictionary<StringDictionaryShape, String*>::Print();
|
||||
|
||||
void AccessorInfo::AccessorInfoVerify() {
|
||||
CHECK(IsAccessorInfo());
|
||||
|
@ -5747,6 +5747,34 @@ bool JSObject::ShouldConvertToFastElements() {
|
||||
(length / (2 * NumberDictionary::kEntrySize));
|
||||
}
|
||||
|
||||
|
||||
// Certain compilers request function template instantiation when they
|
||||
// see the definition of the other template functions in the
|
||||
// class. This requires us to have the template functions put
|
||||
// together, so even though this function belongs in objects-debug.cc,
|
||||
// we keep it here instead to satisfy certain compilers.
|
||||
#ifdef DEBUG
|
||||
template<typename Shape, typename Key>
|
||||
void Dictionary<Shape, Key>::Print() {
|
||||
int capacity = HashTable<Shape, Key>::Capacity();
|
||||
for (int i = 0; i < capacity; i++) {
|
||||
Object* k = HashTable<Shape, Key>::KeyAt(i);
|
||||
if (HashTable<Shape, Key>::IsKey(k)) {
|
||||
PrintF(" ");
|
||||
if (k->IsString()) {
|
||||
String::cast(k)->StringPrint();
|
||||
} else {
|
||||
k->ShortPrint();
|
||||
}
|
||||
PrintF(": ");
|
||||
ValueAt(i)->ShortPrint();
|
||||
PrintF("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
template<typename Shape, typename Key>
|
||||
void Dictionary<Shape, Key>::CopyValuesTo(FixedArray* elements) {
|
||||
int pos = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user