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

Unified Diff: src/objects-inl.h

Issue 1675223002: Mark maps having a hidden prototype rather than maps of hidden prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 88801e209ac454f9e0382a3255c901ee41f0f4e9..21fdc8d0e897acc4135819bdc2412379ed70cfa9 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1186,16 +1186,16 @@ MaybeHandle<Object> Object::SetElement(Isolate* isolate, Handle<Object> object,
return value;
}
-
-MaybeHandle<Object> Object::GetPrototype(Isolate* isolate,
- Handle<Object> receiver) {
+MaybeHandle<Object> JSReceiver::GetPrototype(Isolate* isolate,
+ Handle<JSReceiver> receiver) {
// We don't expect access checks to be needed on JSProxy objects.
DCHECK(!receiver->IsAccessCheckNeeded() || receiver->IsJSObject());
PrototypeIterator iter(isolate, receiver,
- PrototypeIterator::START_AT_RECEIVER);
+ PrototypeIterator::START_AT_RECEIVER,
+ PrototypeIterator::END_AT_NON_HIDDEN);
do {
if (!iter.AdvanceFollowingProxies()) return MaybeHandle<Object>();
- } while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN));
+ } while (!iter.IsAtEnd());
return PrototypeIterator::GetCurrent(iter);
}
@@ -4482,14 +4482,12 @@ bool Map::is_constructor() const {
return ((1 << kIsConstructor) & bit_field()) != 0;
}
-
-void Map::set_is_hidden_prototype() {
- set_bit_field3(IsHiddenPrototype::update(bit_field3(), true));
+void Map::set_has_hidden_prototype(bool value) {
+ set_bit_field3(HasHiddenPrototype::update(bit_field3(), value));
}
-
-bool Map::is_hidden_prototype() const {
- return IsHiddenPrototype::decode(bit_field3());
+bool Map::has_hidden_prototype() const {
+ return HasHiddenPrototype::decode(bit_field3());
}
« no previous file with comments | « src/objects.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698