| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/api.h" | 8 #include "src/api.h" |
| 9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 if (!lookup.IsFound()) { | 618 if (!lookup.IsFound()) { |
| 619 if (IsUndeclaredGlobal(object)) { | 619 if (IsUndeclaredGlobal(object)) { |
| 620 return ReferenceError("not_defined", name); | 620 return ReferenceError("not_defined", name); |
| 621 } | 621 } |
| 622 LOG(isolate(), SuspectReadEvent(*name, *object)); | 622 LOG(isolate(), SuspectReadEvent(*name, *object)); |
| 623 } | 623 } |
| 624 | 624 |
| 625 // Update inline cache and stub cache. | 625 // Update inline cache and stub cache. |
| 626 if (use_ic) UpdateCaches(&lookup, object, name); | 626 if (use_ic) UpdateCaches(&lookup, object, name); |
| 627 | 627 |
| 628 PropertyAttributes attr; | |
| 629 // Get the property. | 628 // Get the property. |
| 629 LookupIterator it(object, name); |
| 630 Handle<Object> result; | 630 Handle<Object> result; |
| 631 ASSIGN_RETURN_ON_EXCEPTION( | 631 ASSIGN_RETURN_ON_EXCEPTION( |
| 632 isolate(), | 632 isolate(), result, Object::GetProperty(&it), Object); |
| 633 result, | |
| 634 Object::GetProperty(object, object, &lookup, name, &attr), | |
| 635 Object); | |
| 636 // If the property is not present, check if we need to throw an exception. | 633 // If the property is not present, check if we need to throw an exception. |
| 637 if ((lookup.IsInterceptor() || lookup.IsHandler()) && | 634 if ((lookup.IsInterceptor() || lookup.IsHandler()) && |
| 638 attr == ABSENT && IsUndeclaredGlobal(object)) { | 635 !it.IsFound() && IsUndeclaredGlobal(object)) { |
| 639 return ReferenceError("not_defined", name); | 636 return ReferenceError("not_defined", name); |
| 640 } | 637 } |
| 641 | 638 |
| 642 return result; | 639 return result; |
| 643 } | 640 } |
| 644 | 641 |
| 645 | 642 |
| 646 static bool AddOneReceiverMapIfMissing(MapHandleList* receiver_maps, | 643 static bool AddOneReceiverMapIfMissing(MapHandleList* receiver_maps, |
| 647 Handle<Map> new_receiver_map) { | 644 Handle<Map> new_receiver_map) { |
| 648 ASSERT(!new_receiver_map.is_null()); | 645 ASSERT(!new_receiver_map.is_null()); |
| (...skipping 2434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3083 #undef ADDR | 3080 #undef ADDR |
| 3084 }; | 3081 }; |
| 3085 | 3082 |
| 3086 | 3083 |
| 3087 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3084 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 3088 return IC_utilities[id]; | 3085 return IC_utilities[id]; |
| 3089 } | 3086 } |
| 3090 | 3087 |
| 3091 | 3088 |
| 3092 } } // namespace v8::internal | 3089 } } // namespace v8::internal |
| OLD | NEW |