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

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

Issue 1989153002: X87: Fix %FunctionGetName and %_ClassOf for bound functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/crankshaft/x87/lithium-codegen-x87.cc ('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/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 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 Label done, null, function, non_function_constructor; 2708 Label done, null, function, non_function_constructor;
2709 2709
2710 VisitForAccumulatorValue(args->at(0)); 2710 VisitForAccumulatorValue(args->at(0));
2711 2711
2712 // If the object is not a JSReceiver, we return null. 2712 // If the object is not a JSReceiver, we return null.
2713 __ JumpIfSmi(eax, &null, Label::kNear); 2713 __ JumpIfSmi(eax, &null, Label::kNear);
2714 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 2714 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
2715 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); 2715 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax);
2716 __ j(below, &null, Label::kNear); 2716 __ j(below, &null, Label::kNear);
2717 2717
2718 // Return 'Function' for JSFunction objects. 2718 // Return 'Function' for JSFunction and JSBoundFunction objects.
2719 __ CmpInstanceType(eax, JS_FUNCTION_TYPE); 2719 __ CmpInstanceType(eax, FIRST_FUNCTION_TYPE);
2720 __ j(equal, &function, Label::kNear); 2720 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2721 __ j(above_equal, &function, Label::kNear);
2721 2722
2722 // Check if the constructor in the map is a JS function. 2723 // Check if the constructor in the map is a JS function.
2723 __ GetMapConstructor(eax, eax, ebx); 2724 __ GetMapConstructor(eax, eax, ebx);
2724 __ CmpInstanceType(ebx, JS_FUNCTION_TYPE); 2725 __ CmpInstanceType(ebx, JS_FUNCTION_TYPE);
2725 __ j(not_equal, &non_function_constructor, Label::kNear); 2726 __ j(not_equal, &non_function_constructor, Label::kNear);
2726 2727
2727 // eax now contains the constructor function. Grab the 2728 // eax now contains the constructor function. Grab the
2728 // instance class name from there. 2729 // instance class name from there.
2729 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); 2730 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset));
2730 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); 2731 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset));
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
3814 isolate->builtins()->OnStackReplacement()->entry(), 3815 isolate->builtins()->OnStackReplacement()->entry(),
3815 Assembler::target_address_at(call_target_address, unoptimized_code)); 3816 Assembler::target_address_at(call_target_address, unoptimized_code));
3816 return ON_STACK_REPLACEMENT; 3817 return ON_STACK_REPLACEMENT;
3817 } 3818 }
3818 3819
3819 3820
3820 } // namespace internal 3821 } // namespace internal
3821 } // namespace v8 3822 } // namespace v8
3822 3823
3823 #endif // V8_TARGET_ARCH_X87 3824 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698