Skip to content

Instantly share code, notes, and snippets.

@kennyluck
Created March 21, 2014 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennyluck/9680991 to your computer and use it in GitHub Desktop.
Save kennyluck/9680991 to your computer and use it in GitHub Desktop.
vector.push_back + V8
In file included from /home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_uninitialized.h:42:0,
from /home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_tempbuf.h:42,
from /home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_algo.c:34,
from /home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_algo.h:737,
from /home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/algorithm:41,
from ../src/utils.h:34,
from ../src/platform.h:51,
from ../src/assert-scope.h:32,
from ../src/v8.h:57,
from ../src/arm/assembler-arm.cc:37:
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h: In function 'void std::_Copy_Construct_aux(_Tp*, const _Tp&, const std::__false_type&) [with _Tp = v8::internal::RelocInfo]':
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h:134:3: instantiated from 'void std::_Copy_Construct(_Tp*, const _Tp&) [with _Tp = v8::internal::RelocInfo]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_vector.h:381:7: instantiated from 'void std::priv::_Impl_vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = v8::internal::RelocInfo, _Alloc = std::allocator<v8::internal::RelocInfo>]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/pointers/_vector.h:173:5: instantiated from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = v8::internal::RelocInfo, _Alloc = std::allocator<v8::internal::RelocInfo>, std::vector<_Tp, _Alloc>::value_type = v8::internal::RelocInfo]'
../src/arm/assembler-arm.cc:3608:27: instantiated from here
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h:119:3: error: no matching function for call to 'v8::internal::RelocInfo::operator new(unsigned int, v8::internal::RelocInfo*&)'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h:119:3: note: candidate is:
../src/allocation.h:63:9: note: static void* v8::internal::Embedded::operator new(size_t)
../src/allocation.h:63:9: note: candidate expects 1 argument, 2 provided
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h: In function 'void std::_Param_Construct_aux(_T1*, const _T2&, const std::__false_type&) [with _T1 = v8::internal::RelocInfo, _T2 = v8::internal::RelocInfo]':
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h:154:3: instantiated from 'void std::_Param_Construct(_T1*, const _T2&) [with _T1 = v8::internal::RelocInfo, _T2 = v8::internal::RelocInfo]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_uninitialized.h:250:7: instantiated from 'void std::priv::__ufill(_ForwardIter, _ForwardIter, const _Tp&, const std::random_access_iterator_tag&, _Distance*) [with _ForwardIter = v8::internal::RelocInfo*, _Tp = v8::internal::RelocInfo, _Distance = int]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_uninitialized.h:315:3: instantiated from '_ForwardIter std::priv::__uninitialized_fill_n(_ForwardIter, _Size, const _Tp&) [with _ForwardIter = v8::internal::RelocInfo*, _Size = unsigned int, _Tp = v8::internal::RelocInfo]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_vector.c:97:7: instantiated from 'void std::priv::_Impl_vector<_Tp, _Alloc>::_M_insert_overflow_aux(std::priv::_Impl_vector<_Tp, _Alloc>::pointer, const _Tp&, const std::__false_type&, std::priv::_Impl_vector<_Tp, _Alloc>::size_type, bool) [with _Tp = v8::internal::RelocInfo, _Alloc = std::allocator<v8::internal::RelocInfo>, std::priv::_Impl_vector<_Tp, _Alloc>::pointer = v8::internal::RelocInfo*, std::priv::_Impl_vector<_Tp, _Alloc>::value_type = v8::internal::RelocInfo, std::priv::_Impl_vector<_Tp, _Alloc>::size_type = unsigned int]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_vector.h:162:5: instantiated from 'void std::priv::_Impl_vector<_Tp, _Alloc>::_M_insert_overflow(std::priv::_Impl_vector<_Tp, _Alloc>::pointer, const _Tp&, const std::__false_type&, std::priv::_Impl_vector<_Tp, _Alloc>::size_type, bool) [with _Tp = v8::internal::RelocInfo, _Alloc = std::allocator<v8::internal::RelocInfo>, std::priv::_Impl_vector<_Tp, _Alloc>::pointer = v8::internal::RelocInfo*, std::priv::_Impl_vector<_Tp, _Alloc>::value_type = v8::internal::RelocInfo, std::priv::_Impl_vector<_Tp, _Alloc>::size_type = unsigned int]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_vector.h:386:7: instantiated from 'void std::priv::_Impl_vector<_Tp, _Alloc>::push_back(const _Tp&) [with _Tp = v8::internal::RelocInfo, _Alloc = std::allocator<v8::internal::RelocInfo>]'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/pointers/_vector.h:173:5: instantiated from 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = v8::internal::RelocInfo, _Alloc = std::allocator<v8::internal::RelocInfo>, std::vector<_Tp, _Alloc>::value_type = v8::internal::RelocInfo]'
../src/arm/assembler-arm.cc:3608:27: instantiated from here
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h:139:3: error: no matching function for call to 'v8::internal::RelocInfo::operator new(unsigned int, v8::internal::RelocInfo*&)'
/home/kennyluck/Projects/chromium/src/third_party/android_tools/ndk/sources/cxx-stl/stlport//stlport/stl/_construct.h:139:3: note: candidate is:
../src/allocation.h:63:9: note: static void* v8::internal::Embedded::operator new(size_t)
../src/allocation.h:63:9: note: candidate expects 1 argument, 2 provided
// A macro is used for defining the base class used for embedded instances.
// The reason is some compilers allocate a minimum of one word for the
// superclass. The macro prevents the use of new & delete in debug mode.
// In release mode we are not willing to pay this overhead.
#ifdef DEBUG
// Superclass for classes with instances allocated inside stack
// activations or inside other objects.
class Embedded {
public:
void* operator new(size_t size);
void operator delete(void* p);
};
#define BASE_EMBEDDED : public Embedded
#else
#define BASE_EMBEDDED
#endif
class RelocInfo BASE_EMBEDDED {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment