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

Side by Side Diff: src/ic.cc

Issue 9280007: Replaced LookupResult::IsProperty by LookupResult::IsFound where possible. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 2 fixes Created 8 years, 11 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/ia32/stub-cache-ia32.cc ('k') | src/mips/lithium-codegen-mips.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 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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 } 853 }
854 LOG(isolate(), SuspectReadEvent(*name, *object)); 854 LOG(isolate(), SuspectReadEvent(*name, *object));
855 } 855 }
856 856
857 // Update inline cache and stub cache. 857 // Update inline cache and stub cache.
858 if (FLAG_use_ic) { 858 if (FLAG_use_ic) {
859 UpdateCaches(&lookup, state, object, name); 859 UpdateCaches(&lookup, state, object, name);
860 } 860 }
861 861
862 PropertyAttributes attr; 862 PropertyAttributes attr;
863 if (lookup.IsProperty() && 863 if (lookup.IsFound() &&
864 (lookup.type() == INTERCEPTOR || lookup.type() == HANDLER)) { 864 (lookup.type() == INTERCEPTOR || lookup.type() == HANDLER)) {
865 // Get the property. 865 // Get the property.
866 Handle<Object> result = 866 Handle<Object> result =
867 Object::GetProperty(object, object, &lookup, name, &attr); 867 Object::GetProperty(object, object, &lookup, name, &attr);
868 RETURN_IF_EMPTY_HANDLE(isolate(), result); 868 RETURN_IF_EMPTY_HANDLE(isolate(), result);
869 // If the property is not present, check if we need to throw an 869 // If the property is not present, check if we need to throw an
870 // exception. 870 // exception.
871 if (attr == ABSENT && IsContextual(object)) { 871 if (attr == ABSENT && IsContextual(object)) {
872 return ReferenceError("not_defined", name); 872 return ReferenceError("not_defined", name);
873 } 873 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 // If we did not find a property, check if we need to throw an exception. 1076 // If we did not find a property, check if we need to throw an exception.
1077 if (!lookup.IsProperty() && IsContextual(object)) { 1077 if (!lookup.IsProperty() && IsContextual(object)) {
1078 return ReferenceError("not_defined", name); 1078 return ReferenceError("not_defined", name);
1079 } 1079 }
1080 1080
1081 if (FLAG_use_ic) { 1081 if (FLAG_use_ic) {
1082 UpdateCaches(&lookup, state, object, name); 1082 UpdateCaches(&lookup, state, object, name);
1083 } 1083 }
1084 1084
1085 PropertyAttributes attr; 1085 PropertyAttributes attr;
1086 if (lookup.IsProperty() && lookup.type() == INTERCEPTOR) { 1086 if (lookup.IsFound() && lookup.type() == INTERCEPTOR) {
1087 // Get the property. 1087 // Get the property.
1088 Handle<Object> result = 1088 Handle<Object> result =
1089 Object::GetProperty(object, object, &lookup, name, &attr); 1089 Object::GetProperty(object, object, &lookup, name, &attr);
1090 RETURN_IF_EMPTY_HANDLE(isolate(), result); 1090 RETURN_IF_EMPTY_HANDLE(isolate(), result);
1091 // If the property is not present, check if we need to throw an 1091 // If the property is not present, check if we need to throw an
1092 // exception. 1092 // exception.
1093 if (attr == ABSENT && IsContextual(object)) { 1093 if (attr == ABSENT && IsContextual(object)) {
1094 return ReferenceError("not_defined", name); 1094 return ReferenceError("not_defined", name);
1095 } 1095 }
1096 return *result; 1096 return *result;
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 #undef ADDR 2427 #undef ADDR
2428 }; 2428 };
2429 2429
2430 2430
2431 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2431 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2432 return IC_utilities[id]; 2432 return IC_utilities[id];
2433 } 2433 }
2434 2434
2435 2435
2436 } } // namespace v8::internal 2436 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698