OLD | NEW |
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 2970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2981 | 2981 |
2982 __ JumpIfSmi(eax, if_false); | 2982 __ JumpIfSmi(eax, if_false); |
2983 __ CmpObjectType(eax, JS_PROXY_TYPE, ebx); | 2983 __ CmpObjectType(eax, JS_PROXY_TYPE, ebx); |
2984 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 2984 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
2985 Split(equal, if_true, if_false, fall_through); | 2985 Split(equal, if_true, if_false, fall_through); |
2986 | 2986 |
2987 context()->Plug(if_true, if_false); | 2987 context()->Plug(if_true, if_false); |
2988 } | 2988 } |
2989 | 2989 |
2990 | 2990 |
2991 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | |
2992 ZoneList<Expression*>* args = expr->arguments(); | |
2993 DCHECK(args->length() == 2); | |
2994 | |
2995 // Load the two objects into registers and perform the comparison. | |
2996 VisitForStackValue(args->at(0)); | |
2997 VisitForAccumulatorValue(args->at(1)); | |
2998 | |
2999 Label materialize_true, materialize_false; | |
3000 Label* if_true = NULL; | |
3001 Label* if_false = NULL; | |
3002 Label* fall_through = NULL; | |
3003 context()->PrepareTest(&materialize_true, &materialize_false, | |
3004 &if_true, &if_false, &fall_through); | |
3005 | |
3006 __ pop(ebx); | |
3007 __ cmp(eax, ebx); | |
3008 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3009 Split(equal, if_true, if_false, fall_through); | |
3010 | |
3011 context()->Plug(if_true, if_false); | |
3012 } | |
3013 | |
3014 | |
3015 void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { | 2991 void FullCodeGenerator::EmitClassOf(CallRuntime* expr) { |
3016 ZoneList<Expression*>* args = expr->arguments(); | 2992 ZoneList<Expression*>* args = expr->arguments(); |
3017 DCHECK(args->length() == 1); | 2993 DCHECK(args->length() == 1); |
3018 Label done, null, function, non_function_constructor; | 2994 Label done, null, function, non_function_constructor; |
3019 | 2995 |
3020 VisitForAccumulatorValue(args->at(0)); | 2996 VisitForAccumulatorValue(args->at(0)); |
3021 | 2997 |
3022 // If the object is not a JSReceiver, we return null. | 2998 // If the object is not a JSReceiver, we return null. |
3023 __ JumpIfSmi(eax, &null, Label::kNear); | 2999 __ JumpIfSmi(eax, &null, Label::kNear); |
3024 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 3000 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4522 Assembler::target_address_at(call_target_address, | 4498 Assembler::target_address_at(call_target_address, |
4523 unoptimized_code)); | 4499 unoptimized_code)); |
4524 return OSR_AFTER_STACK_CHECK; | 4500 return OSR_AFTER_STACK_CHECK; |
4525 } | 4501 } |
4526 | 4502 |
4527 | 4503 |
4528 } // namespace internal | 4504 } // namespace internal |
4529 } // namespace v8 | 4505 } // namespace v8 |
4530 | 4506 |
4531 #endif // V8_TARGET_ARCH_X87 | 4507 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |