Commit 0bff3fa7 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Remove duplicate way of encoding the holder in the flags.

R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24316002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 54572833
......@@ -4813,11 +4813,6 @@ class Code: public HeapObject {
NONEXISTENT
};
enum StubHolder {
OWN_STUB,
PROTOTYPE_STUB
};
typedef int ExtraICState;
static const ExtraICState kNoExtraICState = 0;
......@@ -5022,8 +5017,6 @@ class Code: public HeapObject {
class ExtraICStateKeyedAccessStoreMode:
public BitField<KeyedAccessStoreMode, 1, 4> {}; // NOLINT
class ExtraICStateStubHolder: public BitField<StubHolder, 0, 1> {};
static inline StrictModeFlag GetStrictMode(ExtraICState extra_ic_state) {
return ExtraICStateStrictMode::decode(extra_ic_state);
}
......@@ -5040,10 +5033,6 @@ class Code: public HeapObject {
ExtraICStateStrictMode::encode(strict_mode);
}
static inline ExtraICState ComputeExtraICState(StubHolder stub_holder) {
return ExtraICStateStubHolder::encode(stub_holder);
}
// Flags operations.
static inline Flags ComputeFlags(
Kind kind,
......
......@@ -136,12 +136,11 @@ Handle<Code> StubCache::FindLoadHandler(Handle<Name> name,
Handle<JSObject> stub_holder,
Code::Kind kind,
Code::StubType type) {
Code::ExtraICState extra_ic_state = Code::ComputeExtraICState(
receiver.is_identical_to(stub_holder) ? Code::OWN_STUB
: Code::PROTOTYPE_STUB);
InlineCacheHolderFlag holder_flag = receiver.is_identical_to(stub_holder)
? OWN_MAP : PROTOTYPE_MAP;
ASSERT(type != Code::NORMAL);
Code::Flags flags = Code::ComputeMonomorphicFlags(
Code::STUB, extra_ic_state, type, kind);
Code::STUB, Code::kNoExtraICState, type, kind, holder_flag);
Handle<Object> probe(stub_holder->map()->FindInCodeCache(*name, flags),
isolate_);
if (probe->IsCode()) return Handle<Code>::cast(probe);
......
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