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

Side by Side Diff: src/ic.cc

Issue 225673003: Return MaybeHandle from GetProperty. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/api.cc ('k') | src/json-stringifier.h » ('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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 return ReferenceError("not_defined", name); 591 return ReferenceError("not_defined", name);
592 } 592 }
593 LOG(isolate(), SuspectReadEvent(*name, *object)); 593 LOG(isolate(), SuspectReadEvent(*name, *object));
594 } 594 }
595 595
596 // Update inline cache and stub cache. 596 // Update inline cache and stub cache.
597 if (use_ic) UpdateCaches(&lookup, object, name); 597 if (use_ic) UpdateCaches(&lookup, object, name);
598 598
599 PropertyAttributes attr; 599 PropertyAttributes attr;
600 // Get the property. 600 // Get the property.
601 Handle<Object> result = 601 Handle<Object> result;
602 Object::GetProperty(object, object, &lookup, name, &attr); 602 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
603 RETURN_IF_EMPTY_HANDLE(isolate(), result); 603 isolate(), result,
604 // If the property is not present, check if we need to throw an 604 Object::GetProperty(object, object, &lookup, name, &attr));
605 // exception. 605 // If the property is not present, check if we need to throw an exception.
606 if ((lookup.IsInterceptor() || lookup.IsHandler()) && 606 if ((lookup.IsInterceptor() || lookup.IsHandler()) &&
607 attr == ABSENT && IsUndeclaredGlobal(object)) { 607 attr == ABSENT && IsUndeclaredGlobal(object)) {
608 return ReferenceError("not_defined", name); 608 return ReferenceError("not_defined", name);
609 } 609 }
610 610
611 return *result; 611 return *result;
612 } 612 }
613 613
614 614
615 static bool AddOneReceiverMapIfMissing(MapHandleList* receiver_maps, 615 static bool AddOneReceiverMapIfMissing(MapHandleList* receiver_maps,
(...skipping 2221 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 #undef ADDR 2837 #undef ADDR
2838 }; 2838 };
2839 2839
2840 2840
2841 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2841 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2842 return IC_utilities[id]; 2842 return IC_utilities[id];
2843 } 2843 }
2844 2844
2845 2845
2846 } } // namespace v8::internal 2846 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698