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

Unified Diff: src/lookup-inl.h

Issue 1375843004: Remove obsolete lookup-inl.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix includes. Created 5 years, 2 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/lookup.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup-inl.h
diff --git a/src/lookup-inl.h b/src/lookup-inl.h
deleted file mode 100644
index 003ae5a6db5451a0586ce5fffa8efb1cafca6d25..0000000000000000000000000000000000000000
--- a/src/lookup-inl.h
+++ /dev/null
@@ -1,142 +0,0 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8_LOOKUP_INL_H_
-#define V8_LOOKUP_INL_H_
-
-#include "src/lookup.h"
-
-#include "src/elements.h"
-
-namespace v8 {
-namespace internal {
-
-
-JSReceiver* LookupIterator::NextHolder(Map* map) {
- DisallowHeapAllocation no_gc;
- if (!map->prototype()->IsJSReceiver()) return NULL;
-
- JSReceiver* next = JSReceiver::cast(map->prototype());
- DCHECK(!next->map()->IsGlobalObjectMap() ||
- next->map()->is_hidden_prototype());
-
- if (!check_prototype_chain() &&
- !(check_hidden() && next->map()->is_hidden_prototype()) &&
- // Always lookup behind the JSGlobalProxy into the JSGlobalObject, even
- // when not checking other hidden prototypes.
- !map->IsJSGlobalProxyMap()) {
- return NULL;
- }
-
- return next;
-}
-
-
-LookupIterator::State LookupIterator::LookupInHolder(Map* const map,
- JSReceiver* const holder) {
- STATIC_ASSERT(INTERCEPTOR == BEFORE_PROPERTY);
- DisallowHeapAllocation no_gc;
- if (interceptor_state_ == InterceptorState::kProcessNonMasking) {
- return LookupNonMaskingInterceptorInHolder(map, holder);
- }
- switch (state_) {
- case NOT_FOUND:
- if (map->IsJSProxyMap()) return JSPROXY;
- if (map->is_access_check_needed() &&
- (IsElement() || !isolate_->IsInternallyUsedPropertyName(name_))) {
- return ACCESS_CHECK;
- }
- // Fall through.
- case ACCESS_CHECK:
- if (exotic_index_state_ != ExoticIndexState::kNotExotic &&
- IsIntegerIndexedExotic(holder)) {
- return INTEGER_INDEXED_EXOTIC;
- }
- if (check_interceptor() && HasInterceptor(map) &&
- !SkipInterceptor(JSObject::cast(holder))) {
- return INTERCEPTOR;
- }
- // Fall through.
- case INTERCEPTOR:
- if (IsElement()) {
- // TODO(verwaest): Optimize.
- if (holder->IsStringObjectWithCharacterAt(index_)) {
- PropertyAttributes attributes =
- static_cast<PropertyAttributes>(READ_ONLY | DONT_DELETE);
- property_details_ = PropertyDetails(attributes, v8::internal::DATA, 0,
- PropertyCellType::kNoCell);
- } else {
- JSObject* js_object = JSObject::cast(holder);
- if (js_object->elements() == isolate()->heap()->empty_fixed_array()) {
- return NOT_FOUND;
- }
-
- ElementsAccessor* accessor = js_object->GetElementsAccessor();
- FixedArrayBase* backing_store = js_object->elements();
- number_ =
- accessor->GetEntryForIndex(js_object, backing_store, index_);
- if (number_ == kMaxUInt32) return NOT_FOUND;
- property_details_ = accessor->GetDetails(backing_store, number_);
- }
- } else if (!map->is_dictionary_map()) {
- DescriptorArray* descriptors = map->instance_descriptors();
- int number = descriptors->SearchWithCache(*name_, map);
- if (number == DescriptorArray::kNotFound) return NOT_FOUND;
- number_ = static_cast<uint32_t>(number);
- property_details_ = descriptors->GetDetails(number_);
- } else if (map->IsGlobalObjectMap()) {
- GlobalDictionary* dict = JSObject::cast(holder)->global_dictionary();
- int number = dict->FindEntry(name_);
- if (number == GlobalDictionary::kNotFound) return NOT_FOUND;
- number_ = static_cast<uint32_t>(number);
- DCHECK(dict->ValueAt(number_)->IsPropertyCell());
- PropertyCell* cell = PropertyCell::cast(dict->ValueAt(number_));
- if (cell->value()->IsTheHole()) return NOT_FOUND;
- property_details_ = cell->property_details();
- } else {
- NameDictionary* dict = JSObject::cast(holder)->property_dictionary();
- int number = dict->FindEntry(name_);
- if (number == NameDictionary::kNotFound) return NOT_FOUND;
- number_ = static_cast<uint32_t>(number);
- property_details_ = dict->DetailsAt(number_);
- }
- has_property_ = true;
- switch (property_details_.kind()) {
- case v8::internal::kData:
- return DATA;
- case v8::internal::kAccessor:
- return ACCESSOR;
- }
- case ACCESSOR:
- case DATA:
- return NOT_FOUND;
- case INTEGER_INDEXED_EXOTIC:
- case JSPROXY:
- case TRANSITION:
- UNREACHABLE();
- }
- UNREACHABLE();
- return state_;
-}
-
-
-LookupIterator::State LookupIterator::LookupNonMaskingInterceptorInHolder(
- Map* const map, JSReceiver* const holder) {
- switch (state_) {
- case NOT_FOUND:
- if (check_interceptor() && HasInterceptor(map) &&
- !SkipInterceptor(JSObject::cast(holder))) {
- return INTERCEPTOR;
- }
- // Fall through.
- default:
- return NOT_FOUND;
- }
- UNREACHABLE();
- return state_;
-}
-} // namespace internal
-} // namespace v8
-
-#endif // V8_LOOKUP_INL_H_
« no previous file with comments | « src/lookup.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698