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

Unified Diff: src/objects.cc

Issue 1942163002: Remove some dead code in src/objects.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 13123f19005cdd39de8615e95cf6e11b2366343b..0ce5c57b157c2d251cb6179543a92d0dff050b77 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8172,28 +8172,6 @@ bool JSObject::HasEnumerableElements() {
return true;
}
-// Tests for the fast common case for property enumeration:
-// - This object and all prototypes has an enum cache (which means that
-// it is no proxy, has no interceptors and needs no access checks).
-// - This object has no elements.
-// - No prototype has enumerable properties/elements.
-bool JSReceiver::IsSimpleEnum() {
- for (PrototypeIterator iter(GetIsolate(), this,
- PrototypeIterator::START_AT_RECEIVER);
- !iter.IsAtEnd(); iter.Advance()) {
- if (!iter.GetCurrent()->IsJSObject()) return false;
- JSObject* current = iter.GetCurrent<JSObject>();
- int enum_length = current->map()->EnumLength();
- if (enum_length == kInvalidEnumCacheSentinel) return false;
- if (current->IsAccessCheckNeeded()) return false;
- DCHECK(!current->HasNamedInterceptor());
- DCHECK(!current->HasIndexedInterceptor());
- if (current->HasEnumerableElements()) return false;
- if (current != this && enum_length != 0) return false;
- }
- return true;
-}
-
int Map::NumberOfDescribedProperties(DescriptorFlag which,
PropertyFilter filter) {
@@ -10692,25 +10670,6 @@ const uc16* String::GetTwoByteData(unsigned start) {
}
-base::SmartArrayPointer<uc16> String::ToWideCString(
- RobustnessFlag robust_flag) {
- if (robust_flag == ROBUST_STRING_TRAVERSAL && !LooksValid()) {
- return base::SmartArrayPointer<uc16>();
- }
- StringCharacterStream stream(this);
-
- uc16* result = NewArray<uc16>(length() + 1);
-
- int i = 0;
- while (stream.HasMore()) {
- uint16_t character = stream.GetNext();
- result[i++] = character;
- }
- result[i] = 0;
- return base::SmartArrayPointer<uc16>(result);
-}
-
-
const uc16* SeqTwoByteString::SeqTwoByteStringGetData(unsigned start) {
return reinterpret_cast<uc16*>(
reinterpret_cast<char*>(this) - kHeapObjectTag + kHeaderSize) + start;
@@ -15957,22 +15916,6 @@ MaybeHandle<JSRegExp> JSRegExp::New(Handle<String> pattern, Flags flags) {
// static
-MaybeHandle<JSRegExp> JSRegExp::New(Handle<String> pattern,
- Handle<String> flags_string) {
- Isolate* isolate = pattern->GetIsolate();
- bool success = false;
- Flags flags = RegExpFlagsFromString(flags_string, &success);
- if (!success) {
- THROW_NEW_ERROR(
- isolate,
- NewSyntaxError(MessageTemplate::kInvalidRegExpFlags, flags_string),
- JSRegExp);
- }
- return New(pattern, flags);
-}
-
-
-// static
Handle<JSRegExp> JSRegExp::Copy(Handle<JSRegExp> regexp) {
Isolate* const isolate = regexp->GetIsolate();
return Handle<JSRegExp>::cast(isolate->factory()->CopyJSObject(regexp));
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698