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

Unified Diff: src/runtime.cc

Issue 11365221: Allow property indexes to refer to slots inside the object header. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
« src/property.h ('K') | « src/property.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 71c48bc0b1676b3982c993967b4ccdea023f0247..67f324c6328ade42df232c74d5601bc531661d5b 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1679,7 +1679,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeConstGlobal) {
// Strict mode handling not needed (const is disallowed in strict mode).
if (lookup.IsField()) {
FixedArray* properties = global->properties();
- int index = lookup.GetFieldIndex();
+ int index = lookup.GetFieldIndex().FieldIndex();
if (properties->get(index)->IsTheHole() || !lookup.IsReadOnly()) {
properties->set(index, *value);
}
@@ -1769,7 +1769,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_InitializeConstContextSlot) {
if (lookup.IsField()) {
FixedArray* properties = object->properties();
- int index = lookup.GetFieldIndex();
+ int index = lookup.GetFieldIndex().FieldIndex();
if (properties->get(index)->IsTheHole()) {
properties->set(index, *value);
}
@@ -4076,7 +4076,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_KeyedGetProperty) {
LookupResult result(isolate);
receiver->LocalLookup(key, &result);
if (result.IsField()) {
- int offset = result.GetFieldIndex();
+ int offset = result.GetFieldIndex().FieldIndex();
keyed_lookup_cache->Update(receiver_map, key, offset);
return receiver->FastPropertyAt(offset);
}
@@ -4250,7 +4250,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetDataProperty) {
case NORMAL:
return lookup.holder()->GetNormalizedProperty(&lookup);
case FIELD:
- return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex());
+ return lookup.holder()->FastPropertyAt(
+ lookup.GetFieldIndex().FieldIndex());
case CONSTANT_FUNCTION:
return lookup.GetConstantFunction();
case CALLBACKS:
@@ -10010,8 +10011,8 @@ static MaybeObject* DebugLookupResultValue(Heap* heap,
return value;
case FIELD:
value =
- JSObject::cast(
- result->holder())->FastPropertyAt(result->GetFieldIndex());
+ JSObject::cast(result->holder())->FastPropertyAt(
+ result->GetFieldIndex().FieldIndex());
if (value->IsTheHole()) {
return heap->undefined_value();
}
« src/property.h ('K') | « src/property.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698