use gc_allocator<T> everywhere, addGlobalProperty -> defineGlobalProperty

This commit is contained in:
beard%netscape.com 2000-04-11 03:07:39 +00:00
Родитель 2930dfd621
Коммит 8ef180ab04
2 изменённых файлов: 6 добавлений и 18 удалений

Просмотреть файл

@ -14,7 +14,7 @@
// //
// The Initial Developer of the Original Code is Netscape // The Initial Developer of the Original Code is Netscape
// Communications Corporation. Portions created by Netscape are // Communications Corporation. Portions created by Netscape are
// Copyright (C) 1998 Netscape Communications Corporation. All // Copyright (C) 2000 Netscape Communications Corporation. All
// Rights Reserved. // Rights Reserved.
#ifndef interpreter_h #ifndef interpreter_h
@ -22,13 +22,7 @@
#include "icodegenerator.h" #include "icodegenerator.h"
#ifdef XP_MAC
#include "gc_allocator.h" #include "gc_allocator.h"
#else
// for platforms w/o a working gc_allocator.
#include <memory>
#define gc_allocator std::allocator
#endif
namespace JavaScript { namespace JavaScript {
/** /**
@ -58,7 +52,7 @@ namespace JavaScript {
JSValue() : f64(0.0) {} JSValue() : f64(0.0) {}
explicit JSValue(float64 f64) : f64(f64) {} 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); 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 // The Initial Developer of the Original Code is Netscape
// Communications Corporation. Portions created by Netscape are // Communications Corporation. Portions created by Netscape are
// Copyright (C) 1998 Netscape Communications Corporation. All // Copyright (C) 2000 Netscape Communications Corporation. All
// Rights Reserved. // Rights Reserved.
#ifndef interpreter_h #ifndef interpreter_h
@ -22,13 +22,7 @@
#include "icodegenerator.h" #include "icodegenerator.h"
#ifdef XP_MAC
#include "gc_allocator.h" #include "gc_allocator.h"
#else
// for platforms w/o a working gc_allocator.
#include <memory>
#define gc_allocator std::allocator
#endif
namespace JavaScript { namespace JavaScript {
/** /**
@ -58,7 +52,7 @@ namespace JavaScript {
JSValue() : f64(0.0) {} JSValue() : f64(0.0) {}
explicit JSValue(float64 f64) : f64(f64) {} 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); JSValue interpret(ICodeModule* iCode, const JSValues& args);
void addGlobalProperty(String name, JSValue value); JSValue& defineGlobalProperty(const String& name, const JSValue& value);
} }