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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 1548363003: [crankshaft] Don't inline array resize operations if receiver's proto is not a JSObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-571064.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/allocation-site-scopes.h" 9 #include "src/allocation-site-scopes.h"
10 #include "src/ast/ast-numbering.h" 10 #include "src/ast/ast-numbering.h"
(...skipping 8685 matching lines...) Expand 10 before | Expand all | Expand 10 after
8696 DescriptorArray* descriptors = jsarray_map->instance_descriptors(); 8696 DescriptorArray* descriptors = jsarray_map->instance_descriptors();
8697 int number = descriptors->SearchWithCache(*length_string, *jsarray_map); 8697 int number = descriptors->SearchWithCache(*length_string, *jsarray_map);
8698 DCHECK_NE(DescriptorArray::kNotFound, number); 8698 DCHECK_NE(DescriptorArray::kNotFound, number);
8699 return descriptors->GetDetails(number).IsReadOnly(); 8699 return descriptors->GetDetails(number).IsReadOnly();
8700 } 8700 }
8701 8701
8702 8702
8703 // static 8703 // static
8704 bool HOptimizedGraphBuilder::CanInlineArrayResizeOperation( 8704 bool HOptimizedGraphBuilder::CanInlineArrayResizeOperation(
8705 Handle<Map> receiver_map) { 8705 Handle<Map> receiver_map) {
8706 return !receiver_map.is_null() && 8706 return !receiver_map.is_null() && receiver_map->prototype()->IsJSObject() &&
8707 receiver_map->instance_type() == JS_ARRAY_TYPE && 8707 receiver_map->instance_type() == JS_ARRAY_TYPE &&
8708 IsFastElementsKind(receiver_map->elements_kind()) && 8708 IsFastElementsKind(receiver_map->elements_kind()) &&
8709 !receiver_map->is_dictionary_map() && !receiver_map->is_observed() && 8709 !receiver_map->is_dictionary_map() && !receiver_map->is_observed() &&
8710 receiver_map->is_extensible() && 8710 receiver_map->is_extensible() &&
8711 (!receiver_map->is_prototype_map() || receiver_map->is_stable()) && 8711 (!receiver_map->is_prototype_map() || receiver_map->is_stable()) &&
8712 !IsReadOnlyLengthDescriptor(receiver_map); 8712 !IsReadOnlyLengthDescriptor(receiver_map);
8713 } 8713 }
8714 8714
8715 8715
8716 bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall( 8716 bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(
(...skipping 4903 matching lines...) Expand 10 before | Expand all | Expand 10 after
13620 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13620 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13621 } 13621 }
13622 13622
13623 #ifdef DEBUG 13623 #ifdef DEBUG
13624 graph_->Verify(false); // No full verify. 13624 graph_->Verify(false); // No full verify.
13625 #endif 13625 #endif
13626 } 13626 }
13627 13627
13628 } // namespace internal 13628 } // namespace internal
13629 } // namespace v8 13629 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-571064.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698