| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 3314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3325 | 3325 |
| 3326 __ JumpIfSmi(rax, if_false); | 3326 __ JumpIfSmi(rax, if_false); |
| 3327 __ CmpObjectType(rax, SIMD128_VALUE_TYPE, rbx); | 3327 __ CmpObjectType(rax, SIMD128_VALUE_TYPE, rbx); |
| 3328 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3328 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3329 Split(equal, if_true, if_false, fall_through); | 3329 Split(equal, if_true, if_false, fall_through); |
| 3330 | 3330 |
| 3331 context()->Plug(if_true, if_false); | 3331 context()->Plug(if_true, if_false); |
| 3332 } | 3332 } |
| 3333 | 3333 |
| 3334 | 3334 |
| 3335 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { | |
| 3336 ZoneList<Expression*>* args = expr->arguments(); | |
| 3337 DCHECK(args->length() == 1); | |
| 3338 | |
| 3339 VisitForAccumulatorValue(args->at(0)); | |
| 3340 | |
| 3341 Label materialize_true, materialize_false; | |
| 3342 Label* if_true = NULL; | |
| 3343 Label* if_false = NULL; | |
| 3344 Label* fall_through = NULL; | |
| 3345 context()->PrepareTest(&materialize_true, &materialize_false, | |
| 3346 &if_true, &if_false, &fall_through); | |
| 3347 | |
| 3348 __ JumpIfSmi(rax, if_false); | |
| 3349 __ movp(rbx, FieldOperand(rax, HeapObject::kMapOffset)); | |
| 3350 __ testb(FieldOperand(rbx, Map::kBitFieldOffset), | |
| 3351 Immediate(1 << Map::kIsUndetectable)); | |
| 3352 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 3353 Split(not_zero, if_true, if_false, fall_through); | |
| 3354 | |
| 3355 context()->Plug(if_true, if_false); | |
| 3356 } | |
| 3357 | |
| 3358 | |
| 3359 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( | 3335 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( |
| 3360 CallRuntime* expr) { | 3336 CallRuntime* expr) { |
| 3361 ZoneList<Expression*>* args = expr->arguments(); | 3337 ZoneList<Expression*>* args = expr->arguments(); |
| 3362 DCHECK(args->length() == 1); | 3338 DCHECK(args->length() == 1); |
| 3363 | 3339 |
| 3364 VisitForAccumulatorValue(args->at(0)); | 3340 VisitForAccumulatorValue(args->at(0)); |
| 3365 | 3341 |
| 3366 Label materialize_true, materialize_false, skip_lookup; | 3342 Label materialize_true, materialize_false, skip_lookup; |
| 3367 Label* if_true = NULL; | 3343 Label* if_true = NULL; |
| 3368 Label* if_false = NULL; | 3344 Label* if_false = NULL; |
| (...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5324 Assembler::target_address_at(call_target_address, | 5300 Assembler::target_address_at(call_target_address, |
| 5325 unoptimized_code)); | 5301 unoptimized_code)); |
| 5326 return OSR_AFTER_STACK_CHECK; | 5302 return OSR_AFTER_STACK_CHECK; |
| 5327 } | 5303 } |
| 5328 | 5304 |
| 5329 | 5305 |
| 5330 } // namespace internal | 5306 } // namespace internal |
| 5331 } // namespace v8 | 5307 } // namespace v8 |
| 5332 | 5308 |
| 5333 #endif // V8_TARGET_ARCH_X64 | 5309 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |