OLD | NEW |
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/arm64/lithium-codegen-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); | 389 CodeFactory::CallICInOptimizedCode(isolate(), arity, mode).code(); |
390 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 390 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
391 } else { | 391 } else { |
392 __ Mov(x0, arity); | 392 __ Mov(x0, arity); |
393 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); | 393 CallCode(isolate()->builtins()->Call(mode), RelocInfo::CODE_TARGET, instr); |
394 } | 394 } |
395 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | 395 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); |
396 } | 396 } |
397 | 397 |
398 | 398 |
399 void LCodeGen::DoCallNew(LCallNew* instr) { | |
400 DCHECK(ToRegister(instr->context()).is(cp)); | |
401 DCHECK(instr->IsMarkedAsCall()); | |
402 DCHECK(ToRegister(instr->constructor()).is(x1)); | |
403 | |
404 __ Mov(x0, instr->arity()); | |
405 // No cell in x2 for construct type feedback in optimized code. | |
406 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); | |
407 | |
408 CallConstructStub stub(isolate(), NO_CALL_CONSTRUCTOR_FLAGS); | |
409 CallCode(stub.GetCode(), RelocInfo::CONSTRUCT_CALL, instr); | |
410 RecordPushedArgumentsDelta(instr->hydrogen()->argument_delta()); | |
411 | |
412 DCHECK(ToRegister(instr->result()).is(x0)); | |
413 } | |
414 | |
415 | |
416 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { | 399 void LCodeGen::DoCallNewArray(LCallNewArray* instr) { |
417 DCHECK(instr->IsMarkedAsCall()); | 400 DCHECK(instr->IsMarkedAsCall()); |
418 DCHECK(ToRegister(instr->context()).is(cp)); | 401 DCHECK(ToRegister(instr->context()).is(cp)); |
419 DCHECK(ToRegister(instr->constructor()).is(x1)); | 402 DCHECK(ToRegister(instr->constructor()).is(x1)); |
420 | 403 |
421 __ Mov(x0, Operand(instr->arity())); | 404 __ Mov(x0, Operand(instr->arity())); |
422 if (instr->arity() == 1) { | 405 if (instr->arity() == 1) { |
423 // We only need the allocation site for the case we have a length argument. | 406 // We only need the allocation site for the case we have a length argument. |
424 // The case may bail out to the runtime, which will determine the correct | 407 // The case may bail out to the runtime, which will determine the correct |
425 // elements kind with the site. | 408 // elements kind with the site. |
(...skipping 5527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5953 Handle<ScopeInfo> scope_info = instr->scope_info(); | 5936 Handle<ScopeInfo> scope_info = instr->scope_info(); |
5954 __ Push(scope_info); | 5937 __ Push(scope_info); |
5955 __ Push(ToRegister(instr->function())); | 5938 __ Push(ToRegister(instr->function())); |
5956 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5939 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5957 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5940 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5958 } | 5941 } |
5959 | 5942 |
5960 | 5943 |
5961 } // namespace internal | 5944 } // namespace internal |
5962 } // namespace v8 | 5945 } // namespace v8 |
OLD | NEW |