зеркало из https://github.com/mozilla/pjs.git
use gc_allocator<T> everywhere, addGlobalProperty -> defineGlobalProperty
This commit is contained in:
Родитель
2930dfd621
Коммит
8ef180ab04
|
@ -14,7 +14,7 @@
|
|||
//
|
||||
// The Initial Developer of the Original Code is Netscape
|
||||
// Communications Corporation. Portions created by Netscape are
|
||||
// Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
// Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
// Rights Reserved.
|
||||
|
||||
#ifndef interpreter_h
|
||||
|
@ -22,13 +22,7 @@
|
|||
|
||||
#include "icodegenerator.h"
|
||||
|
||||
#ifdef XP_MAC
|
||||
#include "gc_allocator.h"
|
||||
#else
|
||||
// for platforms w/o a working gc_allocator.
|
||||
#include <memory>
|
||||
#define gc_allocator std::allocator
|
||||
#endif
|
||||
|
||||
namespace JavaScript {
|
||||
/**
|
||||
|
@ -58,7 +52,7 @@ namespace JavaScript {
|
|||
JSValue() : f64(0.0) {}
|
||||
|
||||
explicit JSValue(float64 f64) : f64(f64) {}
|
||||
JSValue(ICodeModule *fn) : icm(fn) {}
|
||||
explicit JSValue(ICodeModule *fn) : icm(fn) {}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -68,7 +62,7 @@ namespace JavaScript {
|
|||
|
||||
JSValue interpret(ICodeModule* iCode, const JSValues& args);
|
||||
|
||||
void addGlobalProperty(String name, JSValue value);
|
||||
JSValue& defineGlobalProperty(const String& name, const JSValue& value);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
//
|
||||
// The Initial Developer of the Original Code is Netscape
|
||||
// Communications Corporation. Portions created by Netscape are
|
||||
// Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
// Copyright (C) 2000 Netscape Communications Corporation. All
|
||||
// Rights Reserved.
|
||||
|
||||
#ifndef interpreter_h
|
||||
|
@ -22,13 +22,7 @@
|
|||
|
||||
#include "icodegenerator.h"
|
||||
|
||||
#ifdef XP_MAC
|
||||
#include "gc_allocator.h"
|
||||
#else
|
||||
// for platforms w/o a working gc_allocator.
|
||||
#include <memory>
|
||||
#define gc_allocator std::allocator
|
||||
#endif
|
||||
|
||||
namespace JavaScript {
|
||||
/**
|
||||
|
@ -58,7 +52,7 @@ namespace JavaScript {
|
|||
JSValue() : f64(0.0) {}
|
||||
|
||||
explicit JSValue(float64 f64) : f64(f64) {}
|
||||
JSValue(ICodeModule *fn) : icm(fn) {}
|
||||
explicit JSValue(ICodeModule *fn) : icm(fn) {}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -68,7 +62,7 @@ namespace JavaScript {
|
|||
|
||||
JSValue interpret(ICodeModule* iCode, const JSValues& args);
|
||||
|
||||
void addGlobalProperty(String name, JSValue value);
|
||||
JSValue& defineGlobalProperty(const String& name, const JSValue& value);
|
||||
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче