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

Unified Diff: src/scopeinfo.cc

Issue 12210083: Renamed "symbols" to "internalized strings" throughout the code base, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments 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/runtime.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopeinfo.cc
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc
index c0b2c4c8e6cf4799ccf7a5257cea87ba989f1c31..373a16989d6c85dac26f58bdae6923ae336eeb8d 100644
--- a/src/scopeinfo.cc
+++ b/src/scopeinfo.cc
@@ -280,7 +280,7 @@ InitializationFlag ScopeInfo::ContextLocalInitFlag(int var) {
int ScopeInfo::StackSlotIndex(String* name) {
- ASSERT(name->IsSymbol());
+ ASSERT(name->IsInternalizedString());
if (length() > 0) {
int start = StackLocalEntriesIndex();
int end = StackLocalEntriesIndex() + StackLocalCount();
@@ -297,7 +297,7 @@ int ScopeInfo::StackSlotIndex(String* name) {
int ScopeInfo::ContextSlotIndex(String* name,
VariableMode* mode,
InitializationFlag* init_flag) {
- ASSERT(name->IsSymbol());
+ ASSERT(name->IsInternalizedString());
ASSERT(mode != NULL);
ASSERT(init_flag != NULL);
if (length() > 0) {
@@ -329,7 +329,7 @@ int ScopeInfo::ContextSlotIndex(String* name,
int ScopeInfo::ParameterIndex(String* name) {
- ASSERT(name->IsSymbol());
+ ASSERT(name->IsInternalizedString());
if (length() > 0) {
// We must read parameters from the end since for
// multiply declared parameters the value of the
@@ -349,7 +349,7 @@ int ScopeInfo::ParameterIndex(String* name) {
int ScopeInfo::FunctionContextSlotIndex(String* name, VariableMode* mode) {
- ASSERT(name->IsSymbol());
+ ASSERT(name->IsInternalizedString());
ASSERT(mode != NULL);
if (length() > 0) {
if (FunctionVariableField::decode(Flags()) == CONTEXT &&
@@ -417,13 +417,13 @@ void ContextSlotCache::Update(Object* data,
VariableMode mode,
InitializationFlag init_flag,
int slot_index) {
- String* symbol;
+ String* internalized_name;
ASSERT(slot_index > kNotFound);
- if (HEAP->LookupSymbolIfExists(name, &symbol)) {
- int index = Hash(data, symbol);
+ if (HEAP->InternalizeStringIfExists(name, &internalized_name)) {
+ int index = Hash(data, internalized_name);
Key& key = keys_[index];
key.data = data;
- key.name = symbol;
+ key.name = internalized_name;
// Please note value only takes a uint as index.
values_[index] = Value(mode, init_flag, slot_index - kNotFound).raw();
#ifdef DEBUG
@@ -445,8 +445,8 @@ void ContextSlotCache::ValidateEntry(Object* data,
VariableMode mode,
InitializationFlag init_flag,
int slot_index) {
- String* symbol;
- if (HEAP->LookupSymbolIfExists(name, &symbol)) {
+ String* internalized_name;
+ if (HEAP->InternalizeStringIfExists(name, &internalized_name)) {
int index = Hash(data, name);
Key& key = keys_[index];
ASSERT(key.data == data);
« no previous file with comments | « src/runtime.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698