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

Side by Side Diff: src/json-stringifier.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 LookupResult lookup(isolate_); 267 LookupResult lookup(isolate_);
268 object->LocalLookupRealNamedProperty(*key, &lookup); 268 object->LocalLookupRealNamedProperty(*key, &lookup);
269 if (!lookup.IsProperty()) return factory_->undefined_value(); 269 if (!lookup.IsProperty()) return factory_->undefined_value();
270 switch (lookup.type()) { 270 switch (lookup.type()) {
271 case NORMAL: { 271 case NORMAL: {
272 Object* value = lookup.holder()->GetNormalizedProperty(&lookup); 272 Object* value = lookup.holder()->GetNormalizedProperty(&lookup);
273 ASSERT(!value->IsTheHole()); 273 ASSERT(!value->IsTheHole());
274 return Handle<Object>(value, isolate_); 274 return Handle<Object>(value, isolate_);
275 } 275 }
276 case FIELD: { 276 case FIELD: {
277 Object* value = lookup.holder()->FastPropertyAt(lookup.GetFieldIndex()); 277 Object* value = lookup.holder()->FastPropertyAt(
278 lookup.GetFieldIndex().FieldIndex());
278 ASSERT(!value->IsTheHole()); 279 ASSERT(!value->IsTheHole());
279 return Handle<Object>(value, isolate_); 280 return Handle<Object>(value, isolate_);
280 } 281 }
281 case CONSTANT_FUNCTION: 282 case CONSTANT_FUNCTION:
282 return Handle<Object>(lookup.GetConstantFunction(), isolate_); 283 return Handle<Object>(lookup.GetConstantFunction(), isolate_);
283 default: { 284 default: {
284 PropertyAttributes attr; 285 PropertyAttributes attr;
285 return Object::GetProperty(object, object, &lookup, key, &attr); 286 return Object::GetProperty(object, object, &lookup, key, &attr);
286 } 287 }
287 } 288 }
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 SerializeString_<false, char>(flat.ToAsciiVector(), object); 792 SerializeString_<false, char>(flat.ToAsciiVector(), object);
792 } else { 793 } else {
793 SerializeString_<false, uc16>(flat.ToUC16Vector(), object); 794 SerializeString_<false, uc16>(flat.ToUC16Vector(), object);
794 } 795 }
795 } 796 }
796 } 797 }
797 798
798 } } // namespace v8::internal 799 } } // namespace v8::internal
799 800
800 #endif // V8_JSON_STRINGIFIER_H_ 801 #endif // V8_JSON_STRINGIFIER_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | src/property.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698