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

Side by Side Diff: src/hydrogen.cc

Issue 1313303002: Do not inline array resize operations for outdated prototype maps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | src/objects.cc » ('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/hydrogen.h" 5 #include "src/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-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 8583 matching lines...) Expand 10 before | Expand all | Expand 10 after
8594 return descriptors->GetDetails(number).IsReadOnly(); 8594 return descriptors->GetDetails(number).IsReadOnly();
8595 } 8595 }
8596 8596
8597 8597
8598 // static 8598 // static
8599 bool HOptimizedGraphBuilder::CanInlineArrayResizeOperation( 8599 bool HOptimizedGraphBuilder::CanInlineArrayResizeOperation(
8600 Handle<Map> receiver_map) { 8600 Handle<Map> receiver_map) {
8601 return !receiver_map.is_null() && 8601 return !receiver_map.is_null() &&
8602 receiver_map->instance_type() == JS_ARRAY_TYPE && 8602 receiver_map->instance_type() == JS_ARRAY_TYPE &&
8603 IsFastElementsKind(receiver_map->elements_kind()) && 8603 IsFastElementsKind(receiver_map->elements_kind()) &&
8604 !receiver_map->is_dictionary_map() && 8604 !receiver_map->is_dictionary_map() && !receiver_map->is_observed() &&
8605 !IsReadOnlyLengthDescriptor(receiver_map) && 8605 receiver_map->is_extensible() &&
8606 !receiver_map->is_observed() && receiver_map->is_extensible(); 8606 (!receiver_map->is_prototype_map() || receiver_map->is_stable()) &&
8607 !IsReadOnlyLengthDescriptor(receiver_map);
8607 } 8608 }
8608 8609
8609 8610
8610 bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall( 8611 bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(
8611 Call* expr, Handle<JSFunction> function, Handle<Map> receiver_map, 8612 Call* expr, Handle<JSFunction> function, Handle<Map> receiver_map,
8612 int args_count_no_receiver) { 8613 int args_count_no_receiver) {
8613 if (!function->shared()->HasBuiltinFunctionId()) return false; 8614 if (!function->shared()->HasBuiltinFunctionId()) return false;
8614 BuiltinFunctionId id = function->shared()->builtin_function_id(); 8615 BuiltinFunctionId id = function->shared()->builtin_function_id();
8615 int argument_count = args_count_no_receiver + 1; // Plus receiver. 8616 int argument_count = args_count_no_receiver + 1; // Plus receiver.
8616 8617
(...skipping 4818 matching lines...) Expand 10 before | Expand all | Expand 10 after
13435 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13436 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13436 } 13437 }
13437 13438
13438 #ifdef DEBUG 13439 #ifdef DEBUG
13439 graph_->Verify(false); // No full verify. 13440 graph_->Verify(false); // No full verify.
13440 #endif 13441 #endif
13441 } 13442 }
13442 13443
13443 } // namespace internal 13444 } // namespace internal
13444 } // namespace v8 13445 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698