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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 3322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3333 | 3333 |
3334 __ JumpIfSmi(eax, if_false); | 3334 __ JumpIfSmi(eax, if_false); |
3335 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); | 3335 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); |
3336 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3336 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3337 Split(equal, if_true, if_false, fall_through); | 3337 Split(equal, if_true, if_false, fall_through); |
3338 | 3338 |
3339 context()->Plug(if_true, if_false); | 3339 context()->Plug(if_true, if_false); |
3340 } | 3340 } |
3341 | 3341 |
3342 | 3342 |
3343 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { | |
3344 ZoneList<Expression*>* args = expr->arguments(); | |
3345 DCHECK(args->length() == 1); | |
3346 | |
3347 VisitForAccumulatorValue(args->at(0)); | |
3348 | |
3349 Label materialize_true, materialize_false; | |
3350 Label* if_true = NULL; | |
3351 Label* if_false = NULL; | |
3352 Label* fall_through = NULL; | |
3353 context()->PrepareTest(&materialize_true, &materialize_false, | |
3354 &if_true, &if_false, &fall_through); | |
3355 | |
3356 __ JumpIfSmi(eax, if_false); | |
3357 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); | |
3358 __ movzx_b(ebx, FieldOperand(ebx, Map::kBitFieldOffset)); | |
3359 __ test(ebx, Immediate(1 << Map::kIsUndetectable)); | |
3360 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3361 Split(not_zero, if_true, if_false, fall_through); | |
3362 | |
3363 context()->Plug(if_true, if_false); | |
3364 } | |
3365 | |
3366 | |
3367 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( | 3343 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( |
3368 CallRuntime* expr) { | 3344 CallRuntime* expr) { |
3369 ZoneList<Expression*>* args = expr->arguments(); | 3345 ZoneList<Expression*>* args = expr->arguments(); |
3370 DCHECK(args->length() == 1); | 3346 DCHECK(args->length() == 1); |
3371 | 3347 |
3372 VisitForAccumulatorValue(args->at(0)); | 3348 VisitForAccumulatorValue(args->at(0)); |
3373 | 3349 |
3374 Label materialize_true, materialize_false, skip_lookup; | 3350 Label materialize_true, materialize_false, skip_lookup; |
3375 Label* if_true = NULL; | 3351 Label* if_true = NULL; |
3376 Label* if_false = NULL; | 3352 Label* if_false = NULL; |
(...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5314 Assembler::target_address_at(call_target_address, | 5290 Assembler::target_address_at(call_target_address, |
5315 unoptimized_code)); | 5291 unoptimized_code)); |
5316 return OSR_AFTER_STACK_CHECK; | 5292 return OSR_AFTER_STACK_CHECK; |
5317 } | 5293 } |
5318 | 5294 |
5319 | 5295 |
5320 } // namespace internal | 5296 } // namespace internal |
5321 } // namespace v8 | 5297 } // namespace v8 |
5322 | 5298 |
5323 #endif // V8_TARGET_ARCH_IA32 | 5299 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |