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

Unified Diff: src/hydrogen.h

Issue 153743005: Remove special ArrayLength handling already covered by JSObjectFieldAccessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index a2ce9c3d209b414777e8f47789e1d66e4ea0345c..b201949c90c4db6f8f0a4982f795ca5c7bd926b9 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -2336,15 +2336,14 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
}
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);
}
@@ -2368,11 +2367,6 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
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();
bool LookupInPrototypes();
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698