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

Side by Side Diff: src/x64/builtins-x64.cc

Issue 1675223002: Mark maps having a hidden prototype rather than maps of hidden prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 10 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 | « src/string-stream.cc ('k') | src/x87/builtins-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/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 __ CmpObjectType(type, FUNCTION_TEMPLATE_INFO_TYPE, kScratchRegister); 2734 __ CmpObjectType(type, FUNCTION_TEMPLATE_INFO_TYPE, kScratchRegister);
2735 __ j(not_equal, &next_prototype, Label::kNear); 2735 __ j(not_equal, &next_prototype, Label::kNear);
2736 2736
2737 // Otherwise load the parent function template and iterate. 2737 // Otherwise load the parent function template and iterate.
2738 __ movp(type, 2738 __ movp(type,
2739 FieldOperand(type, FunctionTemplateInfo::kParentTemplateOffset)); 2739 FieldOperand(type, FunctionTemplateInfo::kParentTemplateOffset));
2740 __ jmp(&function_template_loop, Label::kNear); 2740 __ jmp(&function_template_loop, Label::kNear);
2741 2741
2742 // Load the next prototype. 2742 // Load the next prototype.
2743 __ bind(&next_prototype); 2743 __ bind(&next_prototype);
2744 __ testq(FieldOperand(map, Map::kBitField3Offset),
2745 Immediate(Map::HasHiddenPrototype::kMask));
2746 __ j(zero, receiver_check_failed);
2744 __ movp(receiver, FieldOperand(map, Map::kPrototypeOffset)); 2747 __ movp(receiver, FieldOperand(map, Map::kPrototypeOffset));
2745 // End if the prototype is null or not hidden.
2746 __ CompareRoot(receiver, Heap::kNullValueRootIndex);
2747 __ j(equal, receiver_check_failed);
2748 __ movp(map, FieldOperand(receiver, HeapObject::kMapOffset)); 2748 __ movp(map, FieldOperand(receiver, HeapObject::kMapOffset));
2749 __ testq(FieldOperand(map, Map::kBitField3Offset),
2750 Immediate(Map::IsHiddenPrototype::kMask));
2751 __ j(zero, receiver_check_failed);
2752 // Iterate. 2749 // Iterate.
2753 __ jmp(&prototype_loop_start, Label::kNear); 2750 __ jmp(&prototype_loop_start, Label::kNear);
2754 2751
2755 __ bind(&receiver_check_passed); 2752 __ bind(&receiver_check_passed);
2756 } 2753 }
2757 2754
2758 2755
2759 void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) { 2756 void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
2760 // ----------- S t a t e ------------- 2757 // ----------- S t a t e -------------
2761 // -- rax : number of arguments (not including the receiver) 2758 // -- rax : number of arguments (not including the receiver)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
2852 __ ret(0); 2849 __ ret(0);
2853 } 2850 }
2854 2851
2855 2852
2856 #undef __ 2853 #undef __
2857 2854
2858 } // namespace internal 2855 } // namespace internal
2859 } // namespace v8 2856 } // namespace v8
2860 2857
2861 #endif // V8_TARGET_ARCH_X64 2858 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/string-stream.cc ('k') | src/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698