Sha256: e64015732a8b7e39e838bab9f1f0ab9687ba0cf04e181e71870d78e0337bf6f8

Contents?: true

Size: 460 Bytes

Versions: 15

Compression:

Stored size: 460 Bytes

Contents

class V8::Conversion
  module Method
    include V8::Conversion::Code

    def to_v8
      template = @@method_cache[self] ||= to_template
      template.GetFunction()
    end

    class MethodCache
      def initialize
        @map = Ref::WeakValueMap.new
      end

      def [](method)
        @map[method.to_s]
      end

      def []=(method, template)
        @map[method.to_s] = template
      end
    end

    @@method_cache = MethodCache.new
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
therubyracer-0.11.0beta7-x86_64-linux lib/v8/conversion/method.rb
therubyracer-0.11.0beta7-x86-linux lib/v8/conversion/method.rb
therubyracer-0.11.0beta7-x86_64-darwin-10 lib/v8/conversion/method.rb
therubyracer-0.11.0beta7 lib/v8/conversion/method.rb
therubyracer-0.11.0beta6-x86-linux lib/v8/conversion/method.rb
therubyracer-0.11.0beta6-x86_64-linux lib/v8/conversion/method.rb
therubyracer-0.11.0beta6 lib/v8/conversion/method.rb
therubyracer-0.11.0beta5-x86-linux lib/v8/conversion/method.rb
therubyracer-0.11.0beta5 lib/v8/conversion/method.rb
therubyracer-0.11.0beta5-x86_64-linux lib/v8/conversion/method.rb
therubyracer-0.11.0beta4 lib/v8/conversion/method.rb
therubyracer-0.11.0beta3 lib/v8/conversion/method.rb
therubyracer-0.11.0beta2-x86_64-linux lib/v8/conversion/method.rb
therubyracer-0.11.0beta2 lib/v8/conversion/method.rb
therubyracer-0.11.0beta1 lib/v8/conversion/method.rb