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

Side by Side Diff: src/x87/macro-assembler-x87.cc

Issue 1548253002: X87: [runtime] Introduce dedicated JSBoundFunction to represent bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/x87/macro-assembler-x87.h ('k') | no next file » | 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 test(object, Immediate(kSmiTagMask)); 786 test(object, Immediate(kSmiTagMask));
787 Check(not_equal, kOperandIsASmiAndNotAFunction); 787 Check(not_equal, kOperandIsASmiAndNotAFunction);
788 Push(object); 788 Push(object);
789 CmpObjectType(object, JS_FUNCTION_TYPE, object); 789 CmpObjectType(object, JS_FUNCTION_TYPE, object);
790 Pop(object); 790 Pop(object);
791 Check(equal, kOperandIsNotAFunction); 791 Check(equal, kOperandIsNotAFunction);
792 } 792 }
793 } 793 }
794 794
795 795
796 void MacroAssembler::AssertBoundFunction(Register object) {
797 if (emit_debug_code()) {
798 test(object, Immediate(kSmiTagMask));
799 Check(not_equal, kOperandIsASmiAndNotABoundFunction);
800 Push(object);
801 CmpObjectType(object, JS_BOUND_FUNCTION_TYPE, object);
802 Pop(object);
803 Check(equal, kOperandIsNotABoundFunction);
804 }
805 }
806
807
796 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) { 808 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object) {
797 if (emit_debug_code()) { 809 if (emit_debug_code()) {
798 Label done_checking; 810 Label done_checking;
799 AssertNotSmi(object); 811 AssertNotSmi(object);
800 cmp(object, isolate()->factory()->undefined_value()); 812 cmp(object, isolate()->factory()->undefined_value());
801 j(equal, &done_checking); 813 j(equal, &done_checking);
802 cmp(FieldOperand(object, 0), 814 cmp(FieldOperand(object, 0),
803 Immediate(isolate()->factory()->allocation_site_map())); 815 Immediate(isolate()->factory()->allocation_site_map()));
804 Assert(equal, kExpectedUndefinedOrCell); 816 Assert(equal, kExpectedUndefinedOrCell);
805 bind(&done_checking); 817 bind(&done_checking);
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after
2953 mov(eax, dividend); 2965 mov(eax, dividend);
2954 shr(eax, 31); 2966 shr(eax, 31);
2955 add(edx, eax); 2967 add(edx, eax);
2956 } 2968 }
2957 2969
2958 2970
2959 } // namespace internal 2971 } // namespace internal
2960 } // namespace v8 2972 } // namespace v8
2961 2973
2962 #endif // V8_TARGET_ARCH_X87 2974 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/macro-assembler-x87.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698