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

Side by Side Diff: src/objects.cc

Issue 170073003: Consistent use of const for LookupResult. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 case NONEXISTENT: 680 case NONEXISTENT:
681 UNREACHABLE(); 681 UNREACHABLE();
682 } 682 }
683 } 683 }
684 684
685 GetIsolate()->ReportFailedAccessCheck(this, v8::ACCESS_HAS); 685 GetIsolate()->ReportFailedAccessCheck(this, v8::ACCESS_HAS);
686 return ABSENT; 686 return ABSENT;
687 } 687 }
688 688
689 689
690 Object* JSObject::GetNormalizedProperty(LookupResult* result) { 690 Object* JSObject::GetNormalizedProperty(const LookupResult* result) {
691 ASSERT(!HasFastProperties()); 691 ASSERT(!HasFastProperties());
692 Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry()); 692 Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry());
693 if (IsGlobalObject()) { 693 if (IsGlobalObject()) {
694 value = PropertyCell::cast(value)->value(); 694 value = PropertyCell::cast(value)->value();
695 } 695 }
696 ASSERT(!value->IsPropertyCell() && !value->IsCell()); 696 ASSERT(!value->IsPropertyCell() && !value->IsCell());
697 return value; 697 return value;
698 } 698 }
699 699
700 700
701 void JSObject::SetNormalizedProperty(Handle<JSObject> object, 701 void JSObject::SetNormalizedProperty(Handle<JSObject> object,
702 LookupResult* result, 702 const LookupResult* result,
703 Handle<Object> value) { 703 Handle<Object> value) {
704 ASSERT(!object->HasFastProperties()); 704 ASSERT(!object->HasFastProperties());
705 NameDictionary* property_dictionary = object->property_dictionary(); 705 NameDictionary* property_dictionary = object->property_dictionary();
706 if (object->IsGlobalObject()) { 706 if (object->IsGlobalObject()) {
707 Handle<PropertyCell> cell(PropertyCell::cast( 707 Handle<PropertyCell> cell(PropertyCell::cast(
708 property_dictionary->ValueAt(result->GetDictionaryEntry()))); 708 property_dictionary->ValueAt(result->GetDictionaryEntry())));
709 PropertyCell::SetValueInferType(cell, value); 709 PropertyCell::SetValueInferType(cell, value);
710 } else { 710 } else {
711 property_dictionary->ValueAtPut(result->GetDictionaryEntry(), *value); 711 property_dictionary->ValueAtPut(result->GetDictionaryEntry(), *value);
712 } 712 }
(...skipping 15783 matching lines...) Expand 10 before | Expand all | Expand 10 after
16496 #define ERROR_MESSAGES_TEXTS(C, T) T, 16496 #define ERROR_MESSAGES_TEXTS(C, T) T,
16497 static const char* error_messages_[] = { 16497 static const char* error_messages_[] = {
16498 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16498 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16499 }; 16499 };
16500 #undef ERROR_MESSAGES_TEXTS 16500 #undef ERROR_MESSAGES_TEXTS
16501 return error_messages_[reason]; 16501 return error_messages_[reason];
16502 } 16502 }
16503 16503
16504 16504
16505 } } // namespace v8::internal 16505 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698