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 504183002: Remove dead code from LookupResult (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Install the LoadFastElementStub descriptor and addressed comments Created 6 years, 3 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/mirror-debugger.js ('k') | src/objects-printer.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 2757 matching lines...) Expand 10 before | Expand all | Expand 10 after
2768 break; 2768 break;
2769 2769
2770 case CONSTANT: 2770 case CONSTANT:
2771 case CALLBACKS: 2771 case CALLBACKS:
2772 if (old_type != new_type || old_value != new_value) { 2772 if (old_type != new_type || old_value != new_value) {
2773 return MaybeHandle<Map>(); 2773 return MaybeHandle<Map>();
2774 } 2774 }
2775 break; 2775 break;
2776 2776
2777 case NORMAL: 2777 case NORMAL:
2778 case HANDLER:
2779 case INTERCEPTOR:
2780 UNREACHABLE(); 2778 UNREACHABLE();
2781 } 2779 }
2782 } 2780 }
2783 if (new_map->NumberOfOwnDescriptors() != old_nof) return MaybeHandle<Map>(); 2781 if (new_map->NumberOfOwnDescriptors() != old_nof) return MaybeHandle<Map>();
2784 return handle(new_map); 2782 return handle(new_map);
2785 } 2783 }
2786 2784
2787 2785
2788 MaybeHandle<Object> JSObject::SetPropertyWithInterceptor(LookupIterator* it, 2786 MaybeHandle<Object> JSObject::SetPropertyWithInterceptor(LookupIterator* it,
2789 Handle<Object> value) { 2787 Handle<Object> value) {
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
4223 break; 4221 break;
4224 } 4222 }
4225 case CALLBACKS: { 4223 case CALLBACKS: {
4226 Handle<Name> key(descs->GetKey(i)); 4224 Handle<Name> key(descs->GetKey(i));
4227 Handle<Object> value(descs->GetCallbacksObject(i), isolate); 4225 Handle<Object> value(descs->GetCallbacksObject(i), isolate);
4228 PropertyDetails d = PropertyDetails( 4226 PropertyDetails d = PropertyDetails(
4229 details.attributes(), CALLBACKS, i + 1); 4227 details.attributes(), CALLBACKS, i + 1);
4230 dictionary = NameDictionary::Add(dictionary, key, value, d); 4228 dictionary = NameDictionary::Add(dictionary, key, value, d);
4231 break; 4229 break;
4232 } 4230 }
4233 case INTERCEPTOR:
4234 break;
4235 case HANDLER:
4236 case NORMAL: 4231 case NORMAL:
4237 UNREACHABLE(); 4232 UNREACHABLE();
4238 break; 4233 break;
4239 } 4234 }
4240 } 4235 }
4241 4236
4242 // Copy the next enumeration index from instance descriptor. 4237 // Copy the next enumeration index from instance descriptor.
4243 dictionary->SetNextEnumerationIndex(real_size + 1); 4238 dictionary->SetNextEnumerationIndex(real_size + 1);
4244 4239
4245 // From here on we cannot fail and we shouldn't GC anymore. 4240 // From here on we cannot fail and we shouldn't GC anymore.
(...skipping 2484 matching lines...) Expand 10 before | Expand all | Expand 10 after
6730 6725
6731 case CONSTANT: 6726 case CONSTANT:
6732 DCHECK(GetConstant(descriptor) != value || 6727 DCHECK(GetConstant(descriptor) != value ||
6733 value->FitsRepresentation(details.representation())); 6728 value->FitsRepresentation(details.representation()));
6734 return GetConstant(descriptor) == value; 6729 return GetConstant(descriptor) == value;
6735 6730
6736 case CALLBACKS: 6731 case CALLBACKS:
6737 return false; 6732 return false;
6738 6733
6739 case NORMAL: 6734 case NORMAL:
6740 case INTERCEPTOR: 6735 UNREACHABLE();
6741 case HANDLER:
6742 break; 6736 break;
6743 } 6737 }
6744 6738
6745 UNREACHABLE(); 6739 UNREACHABLE();
6746 return false; 6740 return false;
6747 } 6741 }
6748 6742
6749 6743
6750 Handle<Map> Map::PrepareForDataProperty(Handle<Map> map, int descriptor, 6744 Handle<Map> Map::PrepareForDataProperty(Handle<Map> map, int descriptor,
6751 Handle<Object> value) { 6745 Handle<Object> value) {
(...skipping 9676 matching lines...) Expand 10 before | Expand all | Expand 10 after
16428 #define ERROR_MESSAGES_TEXTS(C, T) T, 16422 #define ERROR_MESSAGES_TEXTS(C, T) T,
16429 static const char* error_messages_[] = { 16423 static const char* error_messages_[] = {
16430 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16424 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16431 }; 16425 };
16432 #undef ERROR_MESSAGES_TEXTS 16426 #undef ERROR_MESSAGES_TEXTS
16433 return error_messages_[reason]; 16427 return error_messages_[reason];
16434 } 16428 }
16435 16429
16436 16430
16437 } } // namespace v8::internal 16431 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mirror-debugger.js ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698