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

Side by Side Diff: src/compiler/js-inlining.cc

Issue 1798373002: [turbofan] Fix double object allocation when inlining a construct call of a derived class.... (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/cctest/test-inobject-slack-tracking.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/compiler/js-inlining.h" 5 #include "src/compiler/js-inlining.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 frame_state); 293 frame_state);
294 } 294 }
295 295
296 namespace { 296 namespace {
297 297
298 // TODO(mstarzinger,verwaest): Move this predicate onto SharedFunctionInfo? 298 // TODO(mstarzinger,verwaest): Move this predicate onto SharedFunctionInfo?
299 bool NeedsImplicitReceiver(Handle<SharedFunctionInfo> shared_info) { 299 bool NeedsImplicitReceiver(Handle<SharedFunctionInfo> shared_info) {
300 DisallowHeapAllocation no_gc; 300 DisallowHeapAllocation no_gc;
301 Isolate* const isolate = shared_info->GetIsolate(); 301 Isolate* const isolate = shared_info->GetIsolate();
302 Code* const construct_stub = shared_info->construct_stub(); 302 Code* const construct_stub = shared_info->construct_stub();
303 return construct_stub != *isolate->builtins()->JSBuiltinsConstructStub(); 303 return construct_stub != *isolate->builtins()->JSBuiltinsConstructStub() &&
304 construct_stub !=
305 *isolate->builtins()->JSBuiltinsConstructStubForDerived() &&
306 construct_stub != *isolate->builtins()->JSConstructStubApi();
304 } 307 }
305 308
306 bool IsNonConstructible(Handle<SharedFunctionInfo> shared_info) { 309 bool IsNonConstructible(Handle<SharedFunctionInfo> shared_info) {
307 DisallowHeapAllocation no_gc; 310 DisallowHeapAllocation no_gc;
308 Isolate* const isolate = shared_info->GetIsolate(); 311 Isolate* const isolate = shared_info->GetIsolate();
309 Code* const construct_stub = shared_info->construct_stub(); 312 Code* const construct_stub = shared_info->construct_stub();
310 return construct_stub == *isolate->builtins()->ConstructedNonConstructable(); 313 return construct_stub == *isolate->builtins()->ConstructedNonConstructable();
311 } 314 }
312 315
313 } // namespace 316 } // namespace
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 node, frame_state, call.formal_arguments(), 554 node, frame_state, call.formal_arguments(),
552 FrameStateType::kArgumentsAdaptor, shared_info); 555 FrameStateType::kArgumentsAdaptor, shared_info);
553 } 556 }
554 557
555 return InlineCall(node, new_target, context, frame_state, start, end); 558 return InlineCall(node, new_target, context, frame_state, start, end);
556 } 559 }
557 560
558 } // namespace compiler 561 } // namespace compiler
559 } // namespace internal 562 } // namespace internal
560 } // namespace v8 563 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-inobject-slack-tracking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698