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 3031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3042 // If the object is not a value type, return the object. | 3042 // If the object is not a value type, return the object. |
3043 __ CmpObjectType(eax, JS_VALUE_TYPE, ebx); | 3043 __ CmpObjectType(eax, JS_VALUE_TYPE, ebx); |
3044 __ j(not_equal, &done, Label::kNear); | 3044 __ j(not_equal, &done, Label::kNear); |
3045 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset)); | 3045 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset)); |
3046 | 3046 |
3047 __ bind(&done); | 3047 __ bind(&done); |
3048 context()->Plug(eax); | 3048 context()->Plug(eax); |
3049 } | 3049 } |
3050 | 3050 |
3051 | 3051 |
3052 void FullCodeGenerator::EmitIsDate(CallRuntime* expr) { | |
3053 ZoneList<Expression*>* args = expr->arguments(); | |
3054 DCHECK_EQ(1, args->length()); | |
3055 | |
3056 VisitForAccumulatorValue(args->at(0)); | |
3057 | |
3058 Label materialize_true, materialize_false; | |
3059 Label* if_true = nullptr; | |
3060 Label* if_false = nullptr; | |
3061 Label* fall_through = nullptr; | |
3062 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
3063 &if_false, &fall_through); | |
3064 | |
3065 __ JumpIfSmi(eax, if_false); | |
3066 __ CmpObjectType(eax, JS_DATE_TYPE, ebx); | |
3067 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3068 Split(equal, if_true, if_false, fall_through); | |
3069 | |
3070 context()->Plug(if_true, if_false); | |
3071 } | |
3072 | |
3073 | |
3074 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { | 3052 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
3075 ZoneList<Expression*>* args = expr->arguments(); | 3053 ZoneList<Expression*>* args = expr->arguments(); |
3076 DCHECK_EQ(3, args->length()); | 3054 DCHECK_EQ(3, args->length()); |
3077 | 3055 |
3078 Register string = eax; | 3056 Register string = eax; |
3079 Register index = ebx; | 3057 Register index = ebx; |
3080 Register value = ecx; | 3058 Register value = ecx; |
3081 | 3059 |
3082 VisitForStackValue(args->at(0)); // index | 3060 VisitForStackValue(args->at(0)); // index |
3083 VisitForStackValue(args->at(1)); // value | 3061 VisitForStackValue(args->at(1)); // value |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4462 Assembler::target_address_at(call_target_address, | 4440 Assembler::target_address_at(call_target_address, |
4463 unoptimized_code)); | 4441 unoptimized_code)); |
4464 return OSR_AFTER_STACK_CHECK; | 4442 return OSR_AFTER_STACK_CHECK; |
4465 } | 4443 } |
4466 | 4444 |
4467 | 4445 |
4468 } // namespace internal | 4446 } // namespace internal |
4469 } // namespace v8 | 4447 } // namespace v8 |
4470 | 4448 |
4471 #endif // V8_TARGET_ARCH_X87 | 4449 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |