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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1524673002: [fullcodegen] Add support for %_GetSuperConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 3608 matching lines...) Expand 10 before | Expand all | Expand 10 after
3619 __ AssertString(rax); 3619 __ AssertString(rax);
3620 3620
3621 __ movl(rax, FieldOperand(rax, String::kHashFieldOffset)); 3621 __ movl(rax, FieldOperand(rax, String::kHashFieldOffset));
3622 DCHECK(String::kHashShift >= kSmiTagSize); 3622 DCHECK(String::kHashShift >= kSmiTagSize);
3623 __ IndexFromHash(rax, rax); 3623 __ IndexFromHash(rax, rax);
3624 3624
3625 context()->Plug(rax); 3625 context()->Plug(rax);
3626 } 3626 }
3627 3627
3628 3628
3629 void FullCodeGenerator::EmitGetSuperConstructor(CallRuntime* expr) {
3630 ZoneList<Expression*>* args = expr->arguments();
3631 DCHECK_EQ(1, args->length());
3632 VisitForAccumulatorValue(args->at(0));
3633 __ AssertFunction(rax);
3634 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset));
3635 __ movp(rax, FieldOperand(rax, Map::kPrototypeOffset));
3636 context()->Plug(rax);
3637 }
3638
3639
3629 void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) { 3640 void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) {
3630 Label bailout, return_result, done, one_char_separator, long_separator, 3641 Label bailout, return_result, done, one_char_separator, long_separator,
3631 non_trivial_array, not_size_one_array, loop, 3642 non_trivial_array, not_size_one_array, loop,
3632 loop_1, loop_1_condition, loop_2, loop_2_entry, loop_3, loop_3_entry; 3643 loop_1, loop_1_condition, loop_2, loop_2_entry, loop_3, loop_3_entry;
3633 ZoneList<Expression*>* args = expr->arguments(); 3644 ZoneList<Expression*>* args = expr->arguments();
3634 DCHECK(args->length() == 2); 3645 DCHECK(args->length() == 2);
3635 // We will leave the separator on the stack until the end of the function. 3646 // We will leave the separator on the stack until the end of the function.
3636 VisitForStackValue(args->at(1)); 3647 VisitForStackValue(args->at(1));
3637 // Load this to rax (= array) 3648 // Load this to rax (= array)
3638 VisitForAccumulatorValue(args->at(0)); 3649 VisitForAccumulatorValue(args->at(0));
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
4765 Assembler::target_address_at(call_target_address, 4776 Assembler::target_address_at(call_target_address,
4766 unoptimized_code)); 4777 unoptimized_code));
4767 return OSR_AFTER_STACK_CHECK; 4778 return OSR_AFTER_STACK_CHECK;
4768 } 4779 }
4769 4780
4770 4781
4771 } // namespace internal 4782 } // namespace internal
4772 } // namespace v8 4783 } // namespace v8
4773 4784
4774 #endif // V8_TARGET_ARCH_X64 4785 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698