OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |