Reviewers: mvstanton,
Description:
Fix null-dereference in r23716.
[email protected]
Please review this at https://codereview.chromium.org/545843002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+4, -16 lines):
M src/ic/ic.h
M src/ic/ic.cc
M src/type-info.cc
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index
1bbdc7ce227f0911f4839145720c474861282fc2..3fb2ea90decbd2eb460f815d39500507800c18cb
100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -2759,16 +2759,6 @@ Type* CompareIC::StateToType(Zone* zone,
CompareIC::State state,
}
-void CompareIC::StubInfoToType(uint32_t stub_key, Type** left_type,
- Type** right_type, Type** overall_type,
- Handle<Map> map, Zone* zone) {
- CompareICStub stub(stub_key, map->GetIsolate());
- *left_type = StateToType(zone, stub.left());
- *right_type = StateToType(zone, stub.right());
- *overall_type = StateToType(zone, stub.state(), map);
-}
-
-
CompareIC::State CompareIC::NewInputState(State old_state,
Handle<Object> value) {
switch (old_state) {
Index: src/ic/ic.h
diff --git a/src/ic/ic.h b/src/ic/ic.h
index
0827dd2c27dfc909fc12f0ea10e326c660e462b9..1710fee91099e8747c21198fa32a464dee130528
100644
--- a/src/ic/ic.h
+++ b/src/ic/ic.h
@@ -846,10 +846,6 @@ class CompareIC : public IC {
static Type* StateToType(Zone* zone, State state,
Handle<Map> map = Handle<Map>());
- static void StubInfoToType(uint32_t stub_key, Type** left_type,
- Type** right_type, Type** overall_type,
- Handle<Map> map, Zone* zone);
-
CompareIC(Isolate* isolate, Token::Value op)
: IC(EXTRA_CALL_FRAME, isolate), op_(op) {}
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index
cbf4ffdd5c5a58c6082d8f4406f58ec6f4e557d8..da993a19e429d4122ea02a5d6b6b824018fdb130
100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -195,8 +195,10 @@ void TypeFeedbackOracle::CompareType(TypeFeedbackId id,
}
if (code->is_compare_ic_stub()) {
- CompareIC::StubInfoToType(code->stub_key(), left_type, right_type,
- combined_type, map, zone());
+ CompareICStub stub(code->stub_key(), isolate());
+ *left_type = CompareIC::StateToType(zone(), stub.left());
+ *right_type = CompareIC::StateToType(zone(), stub.right());
+ *combined_type = CompareIC::StateToType(zone(), stub.state(), map);
} else if (code->is_compare_nil_ic_stub()) {
CompareNilICStub stub(isolate(), code->extra_ic_state());
*combined_type = stub.GetType(zone(), map);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.