aboutsummaryrefslogtreecommitdiff
path: root/src/i18n.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/i18n.h')
-rw-r--r--src/i18n.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/i18n.h b/src/i18n.h
index 2a4c2086..f89d005b 100644
--- a/src/i18n.h
+++ b/src/i18n.h
@@ -6,7 +6,7 @@
#ifndef V8_I18N_H_
#define V8_I18N_H_
-#include "src/handles.h"
+#include "src/objects.h"
#include "unicode/uversion.h"
namespace U_ICU_NAMESPACE {
@@ -19,21 +19,8 @@ class SimpleDateFormat;
namespace v8 {
namespace internal {
-// Forward declarations.
-class ObjectTemplateInfo;
-
-class I18N {
- public:
- // Creates an ObjectTemplate with one internal field.
- static Handle<ObjectTemplateInfo> GetTemplate(Isolate* isolate);
-
- // Creates an ObjectTemplate with two internal fields.
- static Handle<ObjectTemplateInfo> GetTemplate2(Isolate* isolate);
-
- private:
- I18N();
-};
-
+template <typename T>
+class Handle;
class DateFormat {
public:
@@ -53,6 +40,10 @@ class DateFormat {
// holds the pointer gets garbage collected.
static void DeleteDateFormat(const v8::WeakCallbackInfo<void>& data);
+ // Layout description.
+ static const int kSimpleDateFormat = JSObject::kHeaderSize;
+ static const int kSize = kSimpleDateFormat + kPointerSize;
+
private:
DateFormat();
};
@@ -76,6 +67,10 @@ class NumberFormat {
// holds the pointer gets garbage collected.
static void DeleteNumberFormat(const v8::WeakCallbackInfo<void>& data);
+ // Layout description.
+ static const int kDecimalFormat = JSObject::kHeaderSize;
+ static const int kSize = kDecimalFormat + kPointerSize;
+
private:
NumberFormat();
};
@@ -98,11 +93,15 @@ class Collator {
// the pointer gets garbage collected.
static void DeleteCollator(const v8::WeakCallbackInfo<void>& data);
+ // Layout description.
+ static const int kCollator = JSObject::kHeaderSize;
+ static const int kSize = kCollator + kPointerSize;
+
private:
Collator();
};
-class BreakIterator {
+class V8BreakIterator {
public:
// Create a BreakIterator for the specificied locale and options. Returns the
// resolved settings for the locale / options.
@@ -120,8 +119,13 @@ class BreakIterator {
// holds the pointer gets garbage collected.
static void DeleteBreakIterator(const v8::WeakCallbackInfo<void>& data);
+ // Layout description.
+ static const int kBreakIterator = JSObject::kHeaderSize;
+ static const int kUnicodeString = kBreakIterator + kPointerSize;
+ static const int kSize = kUnicodeString + kPointerSize;
+
private:
- BreakIterator();
+ V8BreakIterator();
};
} // namespace internal