Revision: 19152
Author: [email protected]
Date: Thu Feb 6 13:01:38 2014 UTC
Log: Remove special ArrayLength handling already covered by
JSObjectFieldAccessors
[email protected]
Review URL: https://codereview.chromium.org/153743005
http://code.google.com/p/v8/source/detail?r=19152
Modified:
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/hydrogen.h
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Thu Feb 6 12:42:26 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc Thu Feb 6 13:01:38 2014 UTC
@@ -5481,18 +5481,6 @@
STATIC_ASSERT(kMaxLoadPolymorphism == kMaxStorePolymorphism);
if (types->length() > kMaxLoadPolymorphism) return false;
- if (IsArrayLength()) {
- bool is_fast = IsFastElementsKind(map()->elements_kind());
- for (int i = 1; i < types->length(); ++i) {
- Handle<Map> test_map = types->at(i);
- if (test_map->instance_type() != JS_ARRAY_TYPE) return false;
- if (IsFastElementsKind(test_map->elements_kind()) != is_fast) {
- return false;
- }
- }
- return true;
- }
-
HObjectAccess access = HObjectAccess::ForMap(); // bogus default
if (GetJSObjectFieldAccess(&access)) {
for (int i = 1; i < types->length(); ++i) {
=======================================
--- /branches/bleeding_edge/src/hydrogen.h Thu Feb 6 09:36:55 2014 UTC
+++ /branches/bleeding_edge/src/hydrogen.h Thu Feb 6 13:01:38 2014 UTC
@@ -2336,15 +2336,14 @@
}
bool GetJSObjectFieldAccess(HObjectAccess* access) {
- if (IsArrayLength()) {
- *access = HObjectAccess::ForArrayLength(map()->elements_kind());
- return true;
- }
int offset;
if (Accessors::IsJSObjectFieldAccessor<Type>(type_, name_, &offset))
{
if (type_->Is(Type::String())) {
ASSERT(name_->Equals(isolate()->heap()->length_string()));
*access = HObjectAccess::ForStringLength();
+ } else if (type_->Is(Type::Array())) {
+ ASSERT(name_->Equals(isolate()->heap()->length_string()));
+ *access = HObjectAccess::ForArrayLength(map()->elements_kind());
} else {
*access = HObjectAccess::ForMapAndOffset(map(), offset);
}
@@ -2367,11 +2366,6 @@
Type* ToType(Handle<Map> map) { return builder_->ToType(map); }
Isolate* isolate() { return lookup_.isolate(); }
CompilationInfo* current_info() { return builder_->current_info(); }
-
- bool IsArrayLength() {
- return map()->instance_type() == JS_ARRAY_TYPE &&
- name_->Equals(isolate()->heap()->length_string());
- }
bool LoadResult(Handle<Map> map);
bool LookupDescriptor();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.