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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3328 __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE); | 3328 __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE); |
3329 __ j(less, if_false); | 3329 __ j(less, if_false); |
3330 __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE); | 3330 __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE); |
3331 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3331 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3332 Split(less_equal, if_true, if_false, fall_through); | 3332 Split(less_equal, if_true, if_false, fall_through); |
3333 | 3333 |
3334 context()->Plug(if_true, if_false); | 3334 context()->Plug(if_true, if_false); |
3335 } | 3335 } |
3336 | 3336 |
3337 | 3337 |
3338 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { | |
3339 ZoneList<Expression*>* args = expr->arguments(); | |
3340 DCHECK(args->length() == 1); | |
3341 | |
3342 VisitForAccumulatorValue(args->at(0)); | |
3343 | |
3344 Label materialize_true, materialize_false; | |
3345 Label* if_true = NULL; | |
3346 Label* if_false = NULL; | |
3347 Label* fall_through = NULL; | |
3348 context()->PrepareTest(&materialize_true, &materialize_false, | |
3349 &if_true, &if_false, &fall_through); | |
3350 | |
3351 __ JumpIfSmi(eax, if_false); | |
3352 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); | |
3353 __ movzx_b(ebx, FieldOperand(ebx, Map::kBitFieldOffset)); | |
3354 __ test(ebx, Immediate(1 << Map::kIsUndetectable)); | |
3355 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3356 Split(not_zero, if_true, if_false, fall_through); | |
3357 | |
3358 context()->Plug(if_true, if_false); | |
3359 } | |
3360 | |
3361 | |
3362 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( | 3338 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( |
3363 CallRuntime* expr) { | 3339 CallRuntime* expr) { |
3364 ZoneList<Expression*>* args = expr->arguments(); | 3340 ZoneList<Expression*>* args = expr->arguments(); |
3365 DCHECK(args->length() == 1); | 3341 DCHECK(args->length() == 1); |
3366 | 3342 |
3367 VisitForAccumulatorValue(args->at(0)); | 3343 VisitForAccumulatorValue(args->at(0)); |
3368 | 3344 |
3369 Label materialize_true, materialize_false, skip_lookup; | 3345 Label materialize_true, materialize_false, skip_lookup; |
3370 Label* if_true = NULL; | 3346 Label* if_true = NULL; |
3371 Label* if_false = NULL; | 3347 Label* if_false = NULL; |
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5331 Assembler::target_address_at(call_target_address, | 5307 Assembler::target_address_at(call_target_address, |
5332 unoptimized_code)); | 5308 unoptimized_code)); |
5333 return OSR_AFTER_STACK_CHECK; | 5309 return OSR_AFTER_STACK_CHECK; |
5334 } | 5310 } |
5335 | 5311 |
5336 | 5312 |
5337 } // namespace internal | 5313 } // namespace internal |
5338 } // namespace v8 | 5314 } // namespace v8 |
5339 | 5315 |
5340 #endif // V8_TARGET_ARCH_X87 | 5316 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |