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

Side by Side Diff: src/ic.cc

Issue 7248056: Remove --strict developer flag from V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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/flag-definitions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
949 // the element if so. 949 // the element if so.
950 uint32_t index; 950 uint32_t index;
951 if (name->AsArrayIndex(&index)) return object->GetElement(index); 951 if (name->AsArrayIndex(&index)) return object->GetElement(index);
952 952
953 // Named lookup in the object. 953 // Named lookup in the object.
954 LookupResult lookup; 954 LookupResult lookup;
955 LookupForRead(*object, *name, &lookup); 955 LookupForRead(*object, *name, &lookup);
956 956
957 // If we did not find a property, check if we need to throw an exception. 957 // If we did not find a property, check if we need to throw an exception.
958 if (!lookup.IsProperty()) { 958 if (!lookup.IsProperty()) {
959 if (FLAG_strict || IsContextual(object)) { 959 if (IsContextual(object)) {
960 return ReferenceError("not_defined", name); 960 return ReferenceError("not_defined", name);
961 } 961 }
962 LOG(isolate(), SuspectReadEvent(*name, *object)); 962 LOG(isolate(), SuspectReadEvent(*name, *object));
963 } 963 }
964 964
965 // Update inline cache and stub cache. 965 // Update inline cache and stub cache.
966 if (FLAG_use_ic) { 966 if (FLAG_use_ic) {
967 UpdateCaches(&lookup, state, object, name); 967 UpdateCaches(&lookup, state, object, name);
968 } 968 }
969 969
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 // Rewrite to the generic keyed load stub. 1223 // Rewrite to the generic keyed load stub.
1224 if (FLAG_use_ic) set_target(generic_stub()); 1224 if (FLAG_use_ic) set_target(generic_stub());
1225 return Runtime::GetElementOrCharAt(isolate(), object, index); 1225 return Runtime::GetElementOrCharAt(isolate(), object, index);
1226 } 1226 }
1227 1227
1228 // Named lookup. 1228 // Named lookup.
1229 LookupResult lookup; 1229 LookupResult lookup;
1230 LookupForRead(*object, *name, &lookup); 1230 LookupForRead(*object, *name, &lookup);
1231 1231
1232 // If we did not find a property, check if we need to throw an exception. 1232 // If we did not find a property, check if we need to throw an exception.
1233 if (!lookup.IsProperty()) { 1233 if (!lookup.IsProperty() && IsContextual(object)) {
1234 if (FLAG_strict || IsContextual(object)) { 1234 return ReferenceError("not_defined", name);
1235 return ReferenceError("not_defined", name);
1236 }
1237 } 1235 }
1238 1236
1239 if (FLAG_use_ic) { 1237 if (FLAG_use_ic) {
1240 UpdateCaches(&lookup, state, object, name); 1238 UpdateCaches(&lookup, state, object, name);
1241 } 1239 }
1242 1240
1243 PropertyAttributes attr; 1241 PropertyAttributes attr;
1244 if (lookup.IsProperty() && lookup.type() == INTERCEPTOR) { 1242 if (lookup.IsProperty() && lookup.type() == INTERCEPTOR) {
1245 // Get the property. 1243 // Get the property.
1246 Object* result; 1244 Object* result;
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 #undef ADDR 2559 #undef ADDR
2562 }; 2560 };
2563 2561
2564 2562
2565 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2563 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2566 return IC_utilities[id]; 2564 return IC_utilities[id];
2567 } 2565 }
2568 2566
2569 2567
2570 } } // namespace v8::internal 2568 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698