1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

get rid of the callable constructors list.

This commit is contained in:
Charles Lowell 2011-04-22 11:10:33 -05:00
parent d405aadf96
commit 963323865f

View file

@ -133,14 +133,7 @@ module V8
when ::Time
C::Date::New(value.to_f * 1000)
when ::Class
@embedded_constructors[value].GetFunction().tap do |f|
f.SetHiddenValue(C::String::NewSymbol("TheRubyRacer::RubyObject"), C::External::New(value))
#set the function's prototype object to the object that will have the named property handlers
prototype = rubytemplate.NewInstance()
#set *that* object's prototype to an empty function so that it will look and behave like a function.
prototype.SetPrototype(C::FunctionTemplate::New() {}.GetFunction())
f.SetPrototype(prototype)
end
callable_js_constructor_for(value)
when nil,Numeric,TrueClass,FalseClass, C::Value
value
else