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

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

Issue 1999403002: Version 5.1.281.45 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1
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
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_IA32 5 #if V8_TARGET_ARCH_IA32
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 2861 matching lines...) Expand 10 before | Expand all | Expand 10 after
2872 Label done, null, function, non_function_constructor; 2872 Label done, null, function, non_function_constructor;
2873 2873
2874 VisitForAccumulatorValue(args->at(0)); 2874 VisitForAccumulatorValue(args->at(0));
2875 2875
2876 // If the object is not a JSReceiver, we return null. 2876 // If the object is not a JSReceiver, we return null.
2877 __ JumpIfSmi(eax, &null, Label::kNear); 2877 __ JumpIfSmi(eax, &null, Label::kNear);
2878 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 2878 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
2879 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax); 2879 __ CmpObjectType(eax, FIRST_JS_RECEIVER_TYPE, eax);
2880 __ j(below, &null, Label::kNear); 2880 __ j(below, &null, Label::kNear);
2881 2881
2882 // Return 'Function' for JSFunction objects. 2882 // Return 'Function' for JSFunction and JSBoundFunction objects.
2883 __ CmpInstanceType(eax, JS_FUNCTION_TYPE); 2883 __ CmpInstanceType(eax, FIRST_FUNCTION_TYPE);
2884 __ j(equal, &function, Label::kNear); 2884 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE);
2885 __ j(above_equal, &function, Label::kNear);
2885 2886
2886 // Check if the constructor in the map is a JS function. 2887 // Check if the constructor in the map is a JS function.
2887 __ GetMapConstructor(eax, eax, ebx); 2888 __ GetMapConstructor(eax, eax, ebx);
2888 __ CmpInstanceType(ebx, JS_FUNCTION_TYPE); 2889 __ CmpInstanceType(ebx, JS_FUNCTION_TYPE);
2889 __ j(not_equal, &non_function_constructor, Label::kNear); 2890 __ j(not_equal, &non_function_constructor, Label::kNear);
2890 2891
2891 // eax now contains the constructor function. Grab the 2892 // eax now contains the constructor function. Grab the
2892 // instance class name from there. 2893 // instance class name from there.
2893 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset)); 2894 __ mov(eax, FieldOperand(eax, JSFunction::kSharedFunctionInfoOffset));
2894 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset)); 2895 __ mov(eax, FieldOperand(eax, SharedFunctionInfo::kInstanceClassNameOffset));
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
3985 isolate->builtins()->OnStackReplacement()->entry(), 3986 isolate->builtins()->OnStackReplacement()->entry(),
3986 Assembler::target_address_at(call_target_address, unoptimized_code)); 3987 Assembler::target_address_at(call_target_address, unoptimized_code));
3987 return ON_STACK_REPLACEMENT; 3988 return ON_STACK_REPLACEMENT;
3988 } 3989 }
3989 3990
3990 3991
3991 } // namespace internal 3992 } // namespace internal
3992 } // namespace v8 3993 } // namespace v8
3993 3994
3994 #endif // V8_TARGET_ARCH_IA32 3995 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698