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

Unified Diff: src/heap.h

Issue 12330012: ES6 symbols: Allow symbols as property names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Platform ports Created 7 years, 10 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/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 9d92d673e6b044dd1397fced1cd6c5d09033f0a1..aedd475facfbcbe06c637fe569e4cc121c578687 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -160,7 +160,7 @@ namespace internal {
V(Object, last_script_id, LastScriptId) \
V(Script, empty_script, EmptyScript) \
V(Smi, real_stack_limit, RealStackLimit) \
- V(StringDictionary, intrinsic_function_names, IntrinsicFunctionNames) \
+ V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \
V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \
V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \
V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \
@@ -2459,10 +2459,10 @@ class HeapIterator BASE_EMBEDDED {
class KeyedLookupCache {
public:
// Lookup field offset for (map, name). If absent, -1 is returned.
- int Lookup(Map* map, String* name);
+ int Lookup(Map* map, Name* name);
// Update an element in the cache.
- void Update(Map* map, String* name, int field_offset);
+ void Update(Map* map, Name* name, int field_offset);
// Clear the cache.
void Clear();
@@ -2487,7 +2487,7 @@ class KeyedLookupCache {
}
}
- static inline int Hash(Map* map, String* name);
+ static inline int Hash(Map* map, Name* name);
// Get the address of the keys and field_offsets arrays. Used in
// generated code to perform cache lookups.
@@ -2501,7 +2501,7 @@ class KeyedLookupCache {
struct Key {
Map* map;
- String* name;
+ Name* name;
};
Key keys_[kLength];
@@ -2521,8 +2521,8 @@ class DescriptorLookupCache {
public:
// Lookup descriptor index for (map, name).
// If absent, kAbsent is returned.
- int Lookup(Map* source, String* name) {
- if (!StringShape(name).IsInternalized()) return kAbsent;
+ int Lookup(Map* source, Name* name) {
+ if (!name->IsUniqueName()) return kAbsent;
int index = Hash(source, name);
Key& key = keys_[index];
if ((key.source == source) && (key.name == name)) return results_[index];
@@ -2530,9 +2530,9 @@ class DescriptorLookupCache {
}
// Update an element in the cache.
- void Update(Map* source, String* name, int result) {
+ void Update(Map* source, Name* name, int result) {
ASSERT(result != kAbsent);
- if (StringShape(name).IsInternalized()) {
+ if (name->IsUniqueName()) {
int index = Hash(source, name);
Key& key = keys_[index];
key.source = source;
@@ -2555,7 +2555,7 @@ class DescriptorLookupCache {
}
}
- static int Hash(Object* source, String* name) {
+ static int Hash(Object* source, Name* name) {
// Uses only lower 32 bits if pointers are larger.
uint32_t source_hash =
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(source))
@@ -2569,7 +2569,7 @@ class DescriptorLookupCache {
static const int kLength = 64;
struct Key {
Map* source;
- String* name;
+ Name* name;
};
Key keys_[kLength];
« no previous file with comments | « src/handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698