18a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// Copyright 2010 the V8 project authors. All rights reserved.
28a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// Redistribution and use in source and binary forms, with or without
38a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// modification, are permitted provided that the following conditions are
48a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// met:
58a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//
68a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//     * Redistributions of source code must retain the above copyright
78a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//       notice, this list of conditions and the following disclaimer.
88a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//     * Redistributions in binary form must reproduce the above
98a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//       copyright notice, this list of conditions and the following
108a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//       disclaimer in the documentation and/or other materials provided
118a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//       with the distribution.
128a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//     * Neither the name of Google Inc. nor the names of its
138a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//       contributors may be used to endorse or promote products derived
148a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//       from this software without specific prior written permission.
158a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang//
168a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
178a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
188a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
198a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
208a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
218a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
228a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
238a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
248a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
258a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
268a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
278a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang
288a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang#ifndef V8_EXTENSIONS_GC_EXTENSION_H_
298a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang#define V8_EXTENSIONS_GC_EXTENSION_H_
308a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang
318a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang#include "v8.h"
328a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang
338a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wangnamespace v8 {
348a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wangnamespace internal {
358a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang
368a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wangclass GCExtension : public v8::Extension {
378a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang public:
388a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang  GCExtension() : v8::Extension("v8/gc", kSource) {}
398a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang  virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
408a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang      v8::Handle<v8::String> name);
418a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang  static v8::Handle<v8::Value> GC(const v8::Arguments& args);
428a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang  static void Register();
438a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang private:
448a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang  static const char* const kSource;
458a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang};
468a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang
478a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang} }  // namespace v8::internal
488a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang
498a31eba00023874d4a1dcdc5f411cc4336776874Shimeng (Simon) Wang#endif  // V8_EXTENSIONS_GC_EXTENSION_H_
50