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

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

Issue 1415723005: Ensure we never inline class constructors in Crankshaft, as it currently is entirely unsupported. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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-inline-class-constructor.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-numbering.h" 10 #include "src/ast-numbering.h"
(...skipping 9831 matching lines...) Expand 10 before | Expand all | Expand 10 after
9842 9842
9843 int args_to_drop = argument_count + (expression->IsCall() ? 2 : 1); 9843 int args_to_drop = argument_count + (expression->IsCall() ? 2 : 1);
9844 Drop(args_to_drop); 9844 Drop(args_to_drop);
9845 ast_context()->ReturnValue(new_object); 9845 ast_context()->ReturnValue(new_object);
9846 } 9846 }
9847 9847
9848 9848
9849 // Checks whether allocation using the given constructor can be inlined. 9849 // Checks whether allocation using the given constructor can be inlined.
9850 static bool IsAllocationInlineable(Handle<JSFunction> constructor) { 9850 static bool IsAllocationInlineable(Handle<JSFunction> constructor) {
9851 return constructor->has_initial_map() && 9851 return constructor->has_initial_map() &&
9852 !IsClassConstructor(constructor->shared()->kind()) &&
9852 constructor->initial_map()->instance_type() == JS_OBJECT_TYPE && 9853 constructor->initial_map()->instance_type() == JS_OBJECT_TYPE &&
9853 constructor->initial_map()->instance_size() < 9854 constructor->initial_map()->instance_size() <
9854 HAllocate::kMaxInlineSize; 9855 HAllocate::kMaxInlineSize;
9855 } 9856 }
9856 9857
9857 9858
9858 bool HOptimizedGraphBuilder::IsCallArrayInlineable( 9859 bool HOptimizedGraphBuilder::IsCallArrayInlineable(
9859 int argument_count, 9860 int argument_count,
9860 Handle<AllocationSite> site) { 9861 Handle<AllocationSite> site) {
9861 Handle<JSFunction> caller = current_info()->closure(); 9862 Handle<JSFunction> caller = current_info()->closure();
(...skipping 3838 matching lines...) Expand 10 before | Expand all | Expand 10 after
13700 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13701 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13701 } 13702 }
13702 13703
13703 #ifdef DEBUG 13704 #ifdef DEBUG
13704 graph_->Verify(false); // No full verify. 13705 graph_->Verify(false); // No full verify.
13705 #endif 13706 #endif
13706 } 13707 }
13707 13708
13708 } // namespace internal 13709 } // namespace internal
13709 } // namespace v8 13710 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-inline-class-constructor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698