Giter Site home page Giter Site logo

zpao / v8monkey Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rnewman/services-central-old

130.0 9.0 23.0 229.17 MB

In which we put a v8 API on top of spidermonkey without futzing with a separate build system. Prep work for spidernode. (from an autoupdated unofficial mozilla-central clone)

License: Other

C++ 41.17% C 26.21% Objective-C 1.28% JavaScript 23.85% CSS 0.87% Shell 0.82% Python 1.39% Perl 0.34% Java 2.28% XSLT 0.01% Scilab 0.01% Awk 0.01% Assembly 1.71% Ragel in Ruby Host 0.01% D 0.01% Ruby 0.05% Pascal 0.01% Scala 0.01% Ada 0.01% Racket 0.01%

v8monkey's Issues

[dummy] Compile Node with SpiderMonkey

Github's milestones are lame and once you fix all the issues for it, it's closed and can never get a new issue. Fun times! This issue is a dummy issue to keep a milestone open.

node.cc:1738: error: conversion from ‘v8::Local<v8::String>’ to non-scalar type ‘v8::Local<v8::Value>’ requested

Hitting a new error. This issue is to track

node.cc:1738: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested

The relevant line of code is:

Local argv[1] = { uncaught_exception_symbol_l  };
[52/74] cxx: src/node.cc -> build/default/src/node_3.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -I/Users/jhford/node/include/js ../src/node.cc -c -o default/src/node_3.o
In file included from ../src/node.cc:70:
../src/node_string.h:35: error: expected class-name before ‘{’ token
../src/node.cc: In function ‘v8::Local node::Encode(const void*, size_t, node::encoding)’:
../src/node.cc:1124: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc:1135: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc:1140: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc: In function ‘void node::FatalException(v8::TryCatch&)’:
../src/node.cc:1738: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc:1759: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc: In function ‘void node::EmitExit(v8::Handle)’:
../src/node.cc:2411: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
Waf: Leaving directory `/Users/jhford/software/spidernode/build'
Build failed:  -> task failed (err #1): 
    {task: cxx node.cc -> node_3.o}
make: *** [program] Error 1

edit: removed output related to #48 and #49

Ensure that we are using a fatal allocator

We are currently writing code that assumes that we have a fatal allocator (like all calls to new, all uses of jshashtable). We should make sure that that holds true.

Compile error using g++4.2

It fails with this...
../js/src/v8api/object.cpp: In member function ‘int v8::Object::GetIdentityHash()’:
../js/src/v8api/object.cpp:388: error: cast from ‘JSObject*’ to ‘int’ loses precision

This is sort of blocking me right now :(

Implement FunctionTemplate::SetHiddenPrototype

The v8 header says this:

/**
 * Determines whether the __proto__ accessor ignores instances of
 * the function template.  If instances of the function template are
 * ignored, __proto__ skips all instances and instead returns the
 * next object in the prototype chain.
 *
 * Call with a value of true to make the __proto__ accessor ignore
 * instances of the function template.  Call with a value of false
 * to make the __proto__ accessor not ignore instances of the
 * function template.  By default, instances of a function template
 * are not ignored.
 */

It is not clear to me, at this time, if the JS API gives us anything to do this with.

Fix test_api.cpp's test_ObjectProtoToString failures

Calling an unimplemented API: void v8::FunctionTemplate::SetClassName(v8::Handle<v8::String>)
Calling an unimplemented API: v8::Local<v8::Function> v8::FunctionTemplate::GetFunction()

And then it segfaults.

standard format for unimplemented tests

When parsing through the logs, it is useful to find how many tests are unimplemented (TODO). It is easier to count the number of TODO tests if there is an obvious, universal string for each test that is unimplemented

cxx: src/node.cc -> build/default/src/node_3.o : ../src/node_string.h:35: error: expected class-name before ‘{’ token

I am currently running the node configure and make, using

./configure \
    --shared-v8 \
    --shared-v8-libname=mozjs \
    --shared-v8-includes=/Users/jhford/node/include/js \
    --shared-v8-libpath=/Users/jhford/node/lib

make

Because I am not getting past compiling, i don't know if libname and libpath are correct. My v8monkey was built using a slightly modified buildbot build.sh script

[52/74] cxx: src/node.cc -> build/default/src/node_3.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -I/Users/jhford/node/include/js ../src/node.cc -c -o default/src/node_3.o
In file included from ../src/node.cc:70:
../src/node_string.h:35: error: expected class-name before ‘{’ token
../src/node.cc: In function ‘void node::Tick()’:
../src/node.cc:233: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc: In function ‘v8::Local node::ErrnoException(int, const char*, const char*, const char*)’:
../src/node.cc:1027: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1035: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1037: error: ‘Concat’ is not a member of ‘v8::String’
../src/node.cc:1037: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1038: error: ‘Concat’ is not a member of ‘v8::String’
../src/node.cc:1041: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1042: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1043: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1044: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1048: error: ‘Concat’ is not a member of ‘v8::String’
../src/node.cc:1048: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1049: error: ‘Concat’ is not a member of ‘v8::String’
../src/node.cc:1050: error: ‘Concat’ is not a member of ‘v8::String’
../src/node.cc:1050: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1061: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc: In function ‘v8::Handle node::FromConstructorTemplate(v8::Persistent&, const v8::Arguments&)’:
../src/node.cc:1081: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Local node::Encode(const void*, size_t, node::encoding)’:
../src/node.cc:1124: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc:1124: error: ‘Empty’ is not a member of ‘v8::String’
../src/node.cc:1133: error: no matching function for call to ‘v8::String::New(uint16_t*&, size_t&)’
/Users/jhford/node/include/js/v8.h:592: note: candidates are: static v8::Local v8::String::New(const char*, int)
../src/node.cc:1135: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc:1140: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Local node::ExecuteString(v8::Handle, v8::Handle)’:
../src/node.cc:1311: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::Chdir(const v8::Arguments&)’:
../src/node.cc:1319: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1327: error: ‘ThrowException’ was not declared in this scope
../src/node.cc: In function ‘v8::Handle node::Cwd(const v8::Arguments&)’:
../src/node.cc:1339: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1345: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::Umask(const v8::Arguments&)’:
../src/node.cc:1361: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1376: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1385: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::GetUid(const v8::Arguments&)’:
../src/node.cc:1393: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::GetGid(const v8::Arguments&)’:
../src/node.cc:1400: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::SetGid(const v8::Arguments&)’:
../src/node.cc:1409: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1425: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1427: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1433: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1438: error: ‘ThrowException’ was not declared in this scope
../src/node.cc: In function ‘v8::Handle node::SetUid(const v8::Arguments&)’:
../src/node.cc:1448: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1464: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1466: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1472: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1477: error: ‘ThrowException’ was not declared in this scope
../src/node.cc: In function ‘v8::Handle node::Uptime(const v8::Arguments&)’:
../src/node.cc:1527: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::MemoryUsage(const v8::Arguments&)’:
../src/node.cc:1539: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1545: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1546: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1547: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1548: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1562: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::Kill(const v8::Arguments&)’:
../src/node.cc:1572: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1579: error: ‘ThrowException’ was not declared in this scope
../src/node.cc: In function ‘v8::Handle node::DLOpen(const v8::Arguments&)’:
../src/node.cc:1606: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1644: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1653: error: ‘ThrowException’ was not declared in this scope
../src/node.cc: In function ‘v8::Handle node::Compile(const v8::Arguments&)’:
../src/node.cc:1674: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1703: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘void node::FatalException(v8::TryCatch&)’:
../src/node.cc:1727: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1728: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1729: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1738: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc:1759: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc: In function ‘v8::Handle node::Binding(const v8::Arguments&)’:
../src/node.cc:1838: error: ‘ThrowException’ was not declared in this scope
../src/node.cc:1841: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::ProcessTitleGetter(v8::Local, const v8::AccessorInfo&)’:
../src/node.cc:1850: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc:1850: error: ‘Empty’ is not a member of ‘v8::String’
../src/node.cc: In function ‘v8::Handle node::EnvGetter(v8::Local, const v8::AccessorInfo&)’:
../src/node.cc:1869: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::EnvQuery(v8::Local, const v8::AccessorInfo&)’:
../src/node.cc:1905: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::EnvEnumerator(const v8::AccessorInfo&)’:
../src/node.cc:1941: error: ‘struct v8::HandleScope’ has no member named ‘Close’
../src/node.cc: In function ‘v8::Handle node::SetupProcessObject(int, char**)’:
../src/node.cc:1961: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1964: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1968: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1970: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1971: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1972: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1974: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1988: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1995: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2005: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2006: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2017: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2029: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2031: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2035: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2042: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2044: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2049: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2050: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2051: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2052: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2053: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2056: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2057: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2059: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2060: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2062: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2063: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2064: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2067: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2068: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2070: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:2073: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc: In function ‘void node::EmitExit(v8::Handle)’:
../src/node.cc:2411: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
Waf: Leaving directory `/Users/jhford/software/spidernode/build'
Build failed:  -> task failed (err #1): 
    {task: cxx node.cc -> node_3.o}
make: *** [program] Error 1

Fix test_api.cpp's test_HiddenProperties failures

Failures looks like

TEST-INFO | (../../../js/src/v8api/test/test_api.cpp) | Running test_HiddenProperties.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010016fec7 in v8::Object::operator JSObject* () at ../js/src/v8api/object.cpp:167
167   if (JS_DeleteProperty2(cx(), *this, *k, &val)) {
(gdb) bt
#0  0x000000010016fec7 in v8::Object::operator JSObject* () at ../js/src/v8api/object.cpp:167
#1  0x000000010016fec7 in JSVAL_TO_OBJECT_IMPL [inlined] () at /Users/pao/Code/v8monkey/js/src/jsapi.h:167
#2  0x000000010016fec7 in JSVAL_TO_OBJECT [inlined] () at ../js/src/v8api/object.cpp:213
#3  0x000000010016fec7 in v8::Object::DeleteHiddenValue (this=<value temporarily unavailable, due to optimizations>, key=<value temporarily unavailable, due to optimizations>) at ../js/src/v8api/object.cpp:426
#4  0xfffa80010149e080 in ?? ()

Implement Value::ToInteger

Only 1 test from test-api even uses it and that happens to be the test I'm trying to implement!

I think it should be pretty straightforward. [good first bug]?

Implement ObjectTemplate::New

It calls ObjectTemplate::New, which is unimplemented.

test_api.cpp's test_SimplePropertyRead is disabled because of this

Fix test_api.cpp's test_Boolean failures

TEST-UNEXPECTED-FAIL | c:/Code/v8monkey/js/src/v8api/test/test_api.cpp | Expected true, got false at line 288
TEST-UNEXPECTED-FAIL | c:/Code/v8monkey/js/src/v8api/test/test_api.cpp | Expected true, got false at line 290

They fail on buildbot in opt builds and all windows builds. I can't get visual studio (express edition) to break for me given source code, and my normal trick (http://msdn.microsoft.com/en-us/library/a329t4ed%28VS.71%29.aspx) doesn't seem to work either.

Implement Handle inline casting

V8 does inline reinterpret_casting for different handle types, but we haven't implemented that yet.

For example, that allows this method in the tests to "just work" (note the return type is not Local<Number> as is returned from Number::New):

static inline v8::Local<v8::Value> v8_num(double x) {
  return v8::Number::New(x);
}

Not sure how vital it's going to be to SpiderNode, but I'm working around this by doing the cast in the method above for now.

I tried to implement this correctly by adding to the Handle template but just ended up with lots of errors.

template <class S>
inline Handle(Handle<S> that) : mVal(reinterpret_cast<T*>(*that)) {
  // XXX V8 does type checking since this should fail between incompatible types
  //     For example: Handle<String> --> Handle<Number>
}

Implement FunctionTemplate::SetCallHandler

v8's header says this about it:
Set the call-handler callback for a FunctionTemplate. This callback is called whenever the function created from this FunctionTemplate is called.
This is how you map a native function to JS in the v8 API, so we will certainly need this.

Fix test_api.cpp's test_DateAccess failures

Requires implementing Date::NumberValue

Currently fails as:

TEST-UNEXPECTED-FAIL | ../../../js/src/v8api/test/test_api.cpp | Expected '1.22474e+12', got '0' at line 1975

js/v8.h:142: error: ‘v8::Local<T> v8::HandleScope::Close(v8::Handle<T>) [with T = v8::Number]’ is private

Hitting a new error. This issue is to track

js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Number]’ is private

Filing a separate issue for the other errors

[52/74] cxx: src/node.cc -> build/default/src/node_3.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -I/Users/jhford/node/include/js ../src/node.cc -c -o default/src/node_3.o
In file included from ../src/node.cc:70:
../src/node_string.h:35: error: expected class-name before ‘{’ token
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::FromConstructorTemplate(v8::Persistent&, const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Object]’ is private
../src/node.cc:1081: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Local node::Encode(const void*, size_t, node::encoding)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1124: error: within this context
../src/node.cc:1124: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1135: error: within this context
../src/node.cc:1135: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1140: error: within this context
../src/node.cc:1140: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h: In function ‘v8::Local node::ExecuteString(v8::Handle, v8::Handle)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Value]’ is private
../src/node.cc:1311: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Cwd(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1345: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Umask(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1385: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::GetUid(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1393: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::GetGid(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1400: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Uptime(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Number]’ is private
../src/node.cc:1527: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::MemoryUsage(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Object]’ is private
../src/node.cc:1562: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Compile(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Value]’ is private
../src/node.cc:1703: error: within this context
../src/node.cc: In function ‘void node::FatalException(v8::TryCatch&)’:
../src/node.cc:1738: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc:1759: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Binding(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Object]’ is private
../src/node.cc:1841: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::ProcessTitleGetter(v8::Local, const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1850: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::EnvGetter(v8::Local, const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1869: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::EnvQuery(v8::Local, const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1905: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::EnvEnumerator(const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Array]’ is private
../src/node.cc:1941: error: within this context
../src/node.cc: In function ‘void node::EmitExit(v8::Handle)’:
../src/node.cc:2411: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
Waf: Leaving directory `/Users/jhford/software/spidernode/build'
Build failed:  -> task failed (err #1): 
    {task: cxx node.cc -> node_3.o}
make: *** [program] Error 1

js/v8.h:142: error: ‘v8::Local<T> v8::HandleScope::Close(v8::Handle<T>) [with T = v8::Value]’ is private

Hitting a new error. This issue is to track

js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Value]’ is private

Filing a separate issue for the other errors

[52/74] cxx: src/node.cc -> build/default/src/node_3.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -I/Users/jhford/node/include/js ../src/node.cc -c -o default/src/node_3.o
In file included from ../src/node.cc:70:
../src/node_string.h:35: error: expected class-name before ‘{’ token
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::FromConstructorTemplate(v8::Persistent&, const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Object]’ is private
../src/node.cc:1081: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Local node::Encode(const void*, size_t, node::encoding)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1124: error: within this context
../src/node.cc:1124: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1135: error: within this context
../src/node.cc:1135: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1140: error: within this context
../src/node.cc:1140: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h: In function ‘v8::Local node::ExecuteString(v8::Handle, v8::Handle)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Value]’ is private
../src/node.cc:1311: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Cwd(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1345: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Umask(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1385: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::GetUid(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1393: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::GetGid(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1400: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Uptime(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Number]’ is private
../src/node.cc:1527: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::MemoryUsage(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Object]’ is private
../src/node.cc:1562: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Compile(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Value]’ is private
../src/node.cc:1703: error: within this context
../src/node.cc: In function ‘void node::FatalException(v8::TryCatch&)’:
../src/node.cc:1738: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
../src/node.cc:1759: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::Binding(const v8::Arguments&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Object]’ is private
../src/node.cc:1841: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::ProcessTitleGetter(v8::Local, const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1850: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::EnvGetter(v8::Local, const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::String]’ is private
../src/node.cc:1869: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::EnvQuery(v8::Local, const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Integer]’ is private
../src/node.cc:1905: error: within this context
/Users/jhford/node/include/js/v8.h: In function ‘v8::Handle node::EnvEnumerator(const v8::AccessorInfo&)’:
/Users/jhford/node/include/js/v8.h:142: error: ‘v8::Local v8::HandleScope::Close(v8::Handle) [with T = v8::Array]’ is private
../src/node.cc:1941: error: within this context
../src/node.cc: In function ‘void node::EmitExit(v8::Handle)’:
../src/node.cc:2411: error: conversion from ‘v8::Local’ to non-scalar type ‘v8::Local’ requested
Waf: Leaving directory `/Users/jhford/software/spidernode/build'
Build failed:  -> task failed (err #1): 
    {task: cxx node.cc -> node_3.o}
make: *** [program] Error 1

Implement FunctionTemplate::GetFunction

The v8 header says this about the method:
Returns the unique function instance in the current execution context.
Why you would ever want this, I don't know. I haven't actually checked that Node needs this yet, so we may be able to drop this.

Fix test_api.cpp's test_MultiRun failures

This segfaults - not sure if we ever allowed the same script to be run multiple times

TEST-INFO | (../../../js/src/v8api/test/test_api.cpp) | Running test_MultiRun.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00000001001e19fc in v8::TryCatch::CheckForException () at ../js/src/v8api/v8.cpp:44
44    TryCatch *current = gExnChain->catcher;
(gdb) bt
#0  0x00000001001e19fc in v8::TryCatch::CheckForException () at ../js/src/v8api/v8.cpp:44
#1  0x00000001001e1b81 in v8::Script::Run (this=0x100863650) at ../js/src/v8api/v8.cpp:520
#2  0x0000000100007d7d in test_MultiRun () at ../../../js/src/v8api/test/test_api.cpp:1130
#3  0x000000010000831a in main (aArgc=1, aArgv=0x7fff5fbff5f0) at v8api_test_harness_tail.h:60

Actually write V8::IdleNotification

I'm just returning true right now to indicate that we're "done" GCing and callers can stop calling it. It's a lie but it'll do for now.

test_IdleNotification will always pass because of this, so it's currently disabled and pointing here.

v8-debug.h not in v8monkey

Looks like spidernode wants v8-debug.h. We don't have it.

[52/74] cxx: src/node.cc -> build/default/src/node_3.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -I/Users/jhford/node/include/js ../src/node.cc -c -o default/src/node_3.o
../src/node.cc:24:22: error: v8-debug.h: No such file or directory
In file included from ../src/node.cc:70:
../src/node_string.h:35: error: expected class-name before ‘{’ token
../src/node.cc: In function ‘void node::Tick()’:
../src/node.cc:233: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc: In function ‘v8::Local node::ErrnoException(int, const char*, const char*, const char*)’:
../src/node.cc:1027: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1035: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1037: error: ‘Concat’ is not a member of ‘v8::String’
../src/node.cc:1037: error: ‘NewSymbol’ is not a member of ‘v8::String’
../src/node.cc:1038: error: ‘Concat’ is not a member of ‘v8::String’
.....

Implement FunctionTemplate::PrototypeTemplate

The v8 header says this:
A PrototypeTemplate is the template used to create the prototype object of the function created by this template.

In JavaScript code, it'd be the FunctionName.prototype. We actually want FunctionTemplate to be considered as an ObjectTemplate for this to work (I think).

Fix test_api.cpp's test_PropertyEnumeration failures

Failures looks like:

TEST-UNEXPECTED-FAIL | ../../../js/src/v8api/test/test_api.cpp | Expected '4', got '2' at line 90
TEST-UNEXPECTED-FAIL | ../../../js/src/v8api/test/test_api.cpp | Expected 'x', got 'undefined?' at line 93
TEST-UNEXPECTED-FAIL | ../../../js/src/v8api/test/test_api.cpp | Expected 'y', got 'undefined?' at line 93

error: incomplete type ‘v8::Signature’ used in nested name specifier

Woo! node.cc compiles!

[53/74] cxx: src/node_buffer.cc -> build/default/src/node_buffer_3.o
/usr/bin/g++ -pthread -arch x86_64 -g -O3 -DHAVE_OPENSSL=1 -DHAVE_MONOTONIC_CLOCK=0 -DEV_FORK_ENABLE=0 -DEV_EMBED_ENABLE=0 -DEV_MULTIPLICITY=0 -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DEV_MULTIPLICITY=0 -DHAVE_FDATASYNC=0 -DPLATFORM="darwin" -D__POSIX__=1 -Wno-unused-parameter -D_FORTIFY_SOURCE=2 -DNDEBUG -Idefault/src -I../src -Idefault/deps/libeio -I../deps/libeio -Idefault/deps/http_parser -I../deps/http_parser -Idefault/deps/libev -I../deps/libev -Idefault/deps/c-ares -I../deps/c-ares -Idefault/deps/c-ares/darwin-x64 -I../deps/c-ares/darwin-x64 -I/Users/jhford/node/include/js ../src/node_buffer.cc -c -o default/src/node_buffer_3.o
../src/node_buffer.cc: In static member function ‘static void node::Buffer::Initialize(v8::Handle)’:
../src/node_buffer.cc:720: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:721: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:722: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:723: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:726: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:728: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:729: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:730: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:731: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:732: error: incomplete type ‘v8::Signature’ used in nested name specifier
../src/node_buffer.cc:733: error: incomplete type ‘v8::Signature’ used in nested name specifier
/Users/jhford/node/include/js/v8.h: In constructor ‘v8::Handle::Handle(v8::Handle) [with S = v8::FunctionTemplate, T = v8::Value]’:
../src/node_buffer.cc:720:   instantiated from here
/Users/jhford/node/include/js/v8.h:178: error: cannot convert ‘v8::FunctionTemplate*’ to ‘v8::Value* volatile’ in assignment
Waf: Leaving directory `/Users/jhford/software/spidernode/build'
Build failed:  -> task failed (err #1): 
    {task: cxx node_buffer.cc -> node_buffer_3.o}
make: *** [program] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.