Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: src/i18n.h

Issue 2601833002: [intl] Remove indirection in Intl objects (Closed)
Patch Set: Fix a dcheck Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-symbols.h ('k') | src/i18n.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/i18n.h
diff --git a/src/i18n.h b/src/i18n.h
index 2a4c208601298ac56e8075804079a144b12b5327..a87ac976630aa29c592a0483f13e53a2569d041c 100644
--- a/src/i18n.h
+++ b/src/i18n.h
@@ -7,6 +7,7 @@
#define V8_I18N_H_
#include "src/handles.h"
+#include "src/objects.h"
#include "unicode/uversion.h"
namespace U_ICU_NAMESPACE {
@@ -19,22 +20,6 @@ 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();
-};
-
-
class DateFormat {
public:
// Create a formatter for the specificied locale and options. Returns the
@@ -53,6 +38,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 +65,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 +91,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 +117,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
« no previous file with comments | « src/heap-symbols.h ('k') | src/i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698