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

Side by Side Diff: src/ic/ic.cc

Issue 545843002: Fix null-dereference in r23716. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/ic/ic.h ('k') | src/type-info.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 // 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/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2752 case CompareIC::KNOWN_OBJECT: 2752 case CompareIC::KNOWN_OBJECT:
2753 return map.is_null() ? Type::Receiver(zone) : Type::Class(map, zone); 2753 return map.is_null() ? Type::Receiver(zone) : Type::Class(map, zone);
2754 case CompareIC::GENERIC: 2754 case CompareIC::GENERIC:
2755 return Type::Any(zone); 2755 return Type::Any(zone);
2756 } 2756 }
2757 UNREACHABLE(); 2757 UNREACHABLE();
2758 return NULL; 2758 return NULL;
2759 } 2759 }
2760 2760
2761 2761
2762 void CompareIC::StubInfoToType(uint32_t stub_key, Type** left_type,
2763 Type** right_type, Type** overall_type,
2764 Handle<Map> map, Zone* zone) {
2765 CompareICStub stub(stub_key, map->GetIsolate());
2766 *left_type = StateToType(zone, stub.left());
2767 *right_type = StateToType(zone, stub.right());
2768 *overall_type = StateToType(zone, stub.state(), map);
2769 }
2770
2771
2772 CompareIC::State CompareIC::NewInputState(State old_state, 2762 CompareIC::State CompareIC::NewInputState(State old_state,
2773 Handle<Object> value) { 2763 Handle<Object> value) {
2774 switch (old_state) { 2764 switch (old_state) {
2775 case UNINITIALIZED: 2765 case UNINITIALIZED:
2776 if (value->IsSmi()) return SMI; 2766 if (value->IsSmi()) return SMI;
2777 if (value->IsHeapNumber()) return NUMBER; 2767 if (value->IsHeapNumber()) return NUMBER;
2778 if (value->IsInternalizedString()) return INTERNALIZED_STRING; 2768 if (value->IsInternalizedString()) return INTERNALIZED_STRING;
2779 if (value->IsString()) return STRING; 2769 if (value->IsString()) return STRING;
2780 if (value->IsSymbol()) return UNIQUE_NAME; 2770 if (value->IsSymbol()) return UNIQUE_NAME;
2781 if (value->IsJSObject()) return OBJECT; 2771 if (value->IsJSObject()) return OBJECT;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
3215 static const Address IC_utilities[] = { 3205 static const Address IC_utilities[] = {
3216 #define ADDR(name) FUNCTION_ADDR(name), 3206 #define ADDR(name) FUNCTION_ADDR(name),
3217 IC_UTIL_LIST(ADDR) NULL 3207 IC_UTIL_LIST(ADDR) NULL
3218 #undef ADDR 3208 #undef ADDR
3219 }; 3209 };
3220 3210
3221 3211
3222 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3212 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3223 } 3213 }
3224 } // namespace v8::internal 3214 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698