Commit 42f94d59 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix null-dereference in r23716.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/545843002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23717 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2e80f582
......@@ -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) {
......
......@@ -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) {}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment