Index: src/type-info.cc |
diff --git a/src/type-info.cc b/src/type-info.cc |
index 0ba6dfa852e25118518e3c04273a41d7c02b563e..83eb0da8b6826ffdad64bbd56b0b6dc9aebfa3b2 100644 |
--- a/src/type-info.cc |
+++ b/src/type-info.cc |
@@ -43,16 +43,12 @@ namespace internal { |
TypeFeedbackOracle::TypeFeedbackOracle(Handle<Code> code, |
+ Handle<FixedArray> feedback_vector, |
Benedikt Meurer
2014/04/28 19:17:00
As discussed offline: You'll probably need to dupl
|
Handle<Context> native_context, |
Zone* zone) |
: native_context_(native_context), |
- zone_(zone) { |
- Object* raw_info = code->type_feedback_info(); |
- if (raw_info->IsTypeFeedbackInfo()) { |
- feedback_vector_ = Handle<FixedArray>(TypeFeedbackInfo::cast(raw_info)-> |
- feedback_vector()); |
- } |
- |
+ zone_(zone), |
+ feedback_vector_(feedback_vector) { |
BuildDictionary(code); |
ASSERT(dictionary_->IsDictionary()); |
} |
@@ -136,9 +132,9 @@ bool TypeFeedbackOracle::CallNewIsMonomorphic(int slot) { |
byte TypeFeedbackOracle::ForInType(int feedback_vector_slot) { |
Handle<Object> value = GetInfo(feedback_vector_slot); |
- return value->IsSmi() && |
- Smi::cast(*value)->value() == TypeFeedbackInfo::kForInFastCaseMarker |
- ? ForInStatement::FAST_FOR_IN : ForInStatement::SLOW_FOR_IN; |
+ return value.is_identical_to( |
+ TypeFeedbackInfo::UninitializedSentinel(isolate())) |
+ ? ForInStatement::FAST_FOR_IN : ForInStatement::SLOW_FOR_IN; |
} |