Reviewers: Toon Verwaest,

Message:
Hi Toon, a follow-on CL will use these new symbols in maintaining the IC vector
slot. PTAL, thx!
--Michael

Description:
Introduce two new symbols for vector based ICs.

Vector based load ics need a premonomorphic and generic symbol.

[email protected]

Please review this at https://codereview.chromium.org/505763002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+21, -1 lines):
  M include/v8.h
  M src/heap/heap.h
  M src/heap/heap.cc
  M src/objects.h
  M src/objects-inl.h


Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 9407c6ce324419b622d0294904d1e2de33f7098b..113000b4c838b200291f6a50497c42780a353842 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5669,7 +5669,7 @@ class Internals {
   static const int kNullValueRootIndex = 7;
   static const int kTrueValueRootIndex = 8;
   static const int kFalseValueRootIndex = 9;
-  static const int kEmptyStringRootIndex = 162;
+  static const int kEmptyStringRootIndex = 164;

// The external allocation limit should be below 256 MB on all architectures
   // to avoid that resource-constrained embedders run low on memory.
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 119d15008e650a50f7a5434c3f0e97e838f65ae0..a3d653d33b7eefebc64efa3bb48f3b0c2d79aa5a 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2863,6 +2863,8 @@ void Heap::CreateInitialObjects() {
   set_elements_transition_symbol(*factory->NewPrivateSymbol());
   set_frozen_symbol(*factory->NewPrivateSymbol());
   set_megamorphic_symbol(*factory->NewPrivateSymbol());
+  set_premonomorphic_symbol(*factory->NewPrivateSymbol());
+  set_generic_symbol(*factory->NewPrivateSymbol());
   set_nonexistent_symbol(*factory->NewPrivateSymbol());
   set_normal_ic_symbol(*factory->NewPrivateSymbol());
   set_observed_symbol(*factory->NewPrivateSymbol());
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index 1b56f257d49911fd46826ddc5e782fa9d68734c2..c9dbb00d7511c4a80cfe007cdacf31b1ba293dbd 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -183,6 +183,8 @@ namespace internal {
V(Symbol, observed_symbol, ObservedSymbol) \ V(Symbol, uninitialized_symbol, UninitializedSymbol) \ V(Symbol, megamorphic_symbol, MegamorphicSymbol) \ + V(Symbol, premonomorphic_symbol, PremonomorphicSymbol) \ + V(Symbol, generic_symbol, GenericSymbol) \ V(Symbol, stack_trace_symbol, StackTraceSymbol) \ V(Symbol, detailed_stack_trace_symbol, DetailedStackTraceSymbol) \ V(Symbol, normal_ic_symbol, NormalICSymbol) \
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 0ec6feb2805e887b6f52a2bd5c8e4ca26be76f03..9289900675cf1cb89a4457e1f5a9dfe2b145fefb 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -7012,6 +7012,16 @@ Handle<Object> TypeFeedbackInfo::MegamorphicSentinel(Isolate* isolate) {
 }


+Handle<Object> TypeFeedbackInfo::PremonomorphicSentinel(Isolate* isolate) {
+  return isolate->factory()->megamorphic_symbol();
+}
+
+
+Handle<Object> TypeFeedbackInfo::GenericSentinel(Isolate* isolate) {
+  return isolate->factory()->generic_symbol();
+}
+
+
 Handle<Object> TypeFeedbackInfo::MonomorphicArraySentinel(Isolate* isolate,
     ElementsKind elements_kind) {
return Handle<Object>(Smi::FromInt(static_cast<int>(elements_kind)), isolate);
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index a804dc62a6d41dd0fb0abdcf146a16db03981d5f..a08ce227a5e891887cb87298776255b9f394d284 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8410,6 +8410,12 @@ class TypeFeedbackInfo: public Struct {
   // The object that indicates a megamorphic state.
   static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);

+  // The object that indicates a premonomorphic state.
+  static inline Handle<Object> PremonomorphicSentinel(Isolate* isolate);
+
+  // The object that indicates a generic state.
+  static inline Handle<Object> GenericSentinel(Isolate* isolate);
+
   // The object that indicates a monomorphic state of Array with
   // ElementsKind
   static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to