| OLD | NEW |
| 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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 // If we did not find a property, check if we need to throw an exception. | 930 // If we did not find a property, check if we need to throw an exception. |
| 931 if (!lookup.IsFound()) { | 931 if (!lookup.IsFound()) { |
| 932 if (IsUndeclaredGlobal(object)) { | 932 if (IsUndeclaredGlobal(object)) { |
| 933 return ReferenceError("not_defined", name); | 933 return ReferenceError("not_defined", name); |
| 934 } | 934 } |
| 935 LOG(isolate(), SuspectReadEvent(*name, *object)); | 935 LOG(isolate(), SuspectReadEvent(*name, *object)); |
| 936 } | 936 } |
| 937 | 937 |
| 938 // Update inline cache and stub cache. | 938 // Update inline cache and stub cache. |
| 939 if (FLAG_use_ic) { | 939 if (FLAG_use_ic) { |
| 940 UpdateCaches(&lookup, state, object, name); | 940 if (!object->IsJSObject()) { |
| 941 // TODO(jkummerow): It would be nice to support non-JSObjects in |
| 942 // UpdateCaches, then we wouldn't need to go generic here. |
| 943 set_target(*generic_stub()); |
| 944 } else { |
| 945 UpdateCaches(&lookup, state, object, name); |
| 946 } |
| 941 } | 947 } |
| 942 | 948 |
| 943 PropertyAttributes attr; | 949 PropertyAttributes attr; |
| 944 if (lookup.IsInterceptor() || lookup.IsHandler()) { | 950 if (lookup.IsInterceptor() || lookup.IsHandler()) { |
| 945 // Get the property. | 951 // Get the property. |
| 946 Handle<Object> result = | 952 Handle<Object> result = |
| 947 Object::GetProperty(object, object, &lookup, name, &attr); | 953 Object::GetProperty(object, object, &lookup, name, &attr); |
| 948 RETURN_IF_EMPTY_HANDLE(isolate(), result); | 954 RETURN_IF_EMPTY_HANDLE(isolate(), result); |
| 949 // If the property is not present, check if we need to throw an | 955 // If the property is not present, check if we need to throw an |
| 950 // exception. | 956 // exception. |
| (...skipping 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3023 #undef ADDR | 3029 #undef ADDR |
| 3024 }; | 3030 }; |
| 3025 | 3031 |
| 3026 | 3032 |
| 3027 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3033 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 3028 return IC_utilities[id]; | 3034 return IC_utilities[id]; |
| 3029 } | 3035 } |
| 3030 | 3036 |
| 3031 | 3037 |
| 3032 } } // namespace v8::internal | 3038 } } // namespace v8::internal |
| OLD | NEW |