| Index: tools/objects-gen.cc.mustache
|
| diff --git a/src/icu_util.cc b/tools/objects-gen.cc.mustache
|
| similarity index 67%
|
| copy from src/icu_util.cc
|
| copy to tools/objects-gen.cc.mustache
|
| index b9bd65edc69ecb680a9cae4efc96ed3158543285..16614bc01db208f747fc948826116c969ee9fd4c 100644
|
| --- a/src/icu_util.cc
|
| +++ b/tools/objects-gen.cc.mustache
|
| @@ -25,38 +25,47 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#include "icu_util.h"
|
| +// This file is automatically generated from 'objects.layout' and should
|
| +// not be modified by hand. Run 'make objects' instead to update it.
|
|
|
| -#if defined(_WIN32) && defined(V8_I18N_SUPPORT)
|
| -#include <windows.h>
|
| -
|
| -#include "unicode/putil.h"
|
| -#include "unicode/udata.h"
|
| -
|
| -#define ICU_UTIL_DATA_SYMBOL "icudt" U_ICU_VERSION_SHORT "_dat"
|
| -#define ICU_UTIL_DATA_SHARED_MODULE_NAME "icudt.dll"
|
| -#endif
|
| +#include "v8.h"
|
|
|
| namespace v8 {
|
| -
|
| namespace internal {
|
|
|
| -bool InitializeICU() {
|
| -#if defined(_WIN32) && defined(V8_I18N_SUPPORT)
|
| - // We expect to find the ICU data module alongside the current module.
|
| - HMODULE module = LoadLibraryA(ICU_UTIL_DATA_SHARED_MODULE_NAME);
|
| - if (!module) return false;
|
| -
|
| - FARPROC addr = GetProcAddress(module, ICU_UTIL_DATA_SYMBOL);
|
| - if (!addr) return false;
|
| -
|
| - UErrorCode err = U_ZERO_ERROR;
|
| - udata_setCommonData(reinterpret_cast<void*>(addr), &err);
|
| - return err == U_ZERO_ERROR;
|
| -#else
|
| - // Mac/Linux bundle the ICU data in.
|
| - return true;
|
| +{{#types}}
|
| +
|
| +#ifdef OBJECT_PRINT
|
| +void {{name}}::{{name}}Print(FILE* out) {
|
| + HeapObject::PrintHeader(out, "{{name}}");
|
| +{{#fields}}
|
| +{{#is_smi}}
|
| + PrintF(out, "\n - {{field_name_lower}}: %d", {{field_name_lower}}());
|
| +{{/is_smi}}
|
| +{{^is_primitive}}
|
| + PrintF(out, "\n - {{field_name_lower}}: ");
|
| + {{field_name_lower}}()->ShortPrint();
|
| +{{/is_primitive}}
|
| +{{/fields}}
|
| +}
|
| #endif
|
| +
|
| +
|
| +#ifdef VERIFY_HEAP
|
| +void {{name}}::{{name}}Verify() {
|
| + CHECK(Is{{name}}());
|
| + //{{base}}Verify();
|
| +{{#fields}}
|
| +{{#is_smi}}
|
| + VerifySmiField(k{{field_name_pascal}}Offset);
|
| +{{/is_smi}}
|
| +{{^is_primitive}}
|
| + VerifyObjectField(k{{field_name_pascal}}Offset);
|
| +{{/is_primitive}}
|
| +{{/fields}}
|
| }
|
| +#endif
|
| +
|
| +{{/types}}
|
|
|
| } } // namespace v8::internal
|
|
|