| 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 #include "src/v8.h" | 5 #include "src/v8.h" | 
| 6 | 6 | 
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 | 
| 8 | 8 | 
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" | 
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" | 
| (...skipping 3299 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3310 | 3310 | 
| 3311   __ JumpIfSmi(eax, if_false); | 3311   __ JumpIfSmi(eax, if_false); | 
| 3312   __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ebx); | 3312   __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ebx); | 
| 3313   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3313   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 
| 3314   Split(above_equal, if_true, if_false, fall_through); | 3314   Split(above_equal, if_true, if_false, fall_through); | 
| 3315 | 3315 | 
| 3316   context()->Plug(if_true, if_false); | 3316   context()->Plug(if_true, if_false); | 
| 3317 } | 3317 } | 
| 3318 | 3318 | 
| 3319 | 3319 | 
|  | 3320 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) { | 
|  | 3321   ZoneList<Expression*>* args = expr->arguments(); | 
|  | 3322   DCHECK(args->length() == 1); | 
|  | 3323 | 
|  | 3324   VisitForAccumulatorValue(args->at(0)); | 
|  | 3325 | 
|  | 3326   Label materialize_true, materialize_false; | 
|  | 3327   Label* if_true = NULL; | 
|  | 3328   Label* if_false = NULL; | 
|  | 3329   Label* fall_through = NULL; | 
|  | 3330   context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 
|  | 3331                          &if_false, &fall_through); | 
|  | 3332 | 
|  | 3333   __ JumpIfSmi(eax, if_false); | 
|  | 3334   Register map = ebx; | 
|  | 3335   __ mov(map, FieldOperand(eax, HeapObject::kMapOffset)); | 
|  | 3336   __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE); | 
|  | 3337   __ j(less, if_false); | 
|  | 3338   __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE); | 
|  | 3339   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 
|  | 3340   Split(less_equal, if_true, if_false, fall_through); | 
|  | 3341 | 
|  | 3342   context()->Plug(if_true, if_false); | 
|  | 3343 } | 
|  | 3344 | 
|  | 3345 | 
| 3320 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { | 3346 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { | 
| 3321   ZoneList<Expression*>* args = expr->arguments(); | 3347   ZoneList<Expression*>* args = expr->arguments(); | 
| 3322   DCHECK(args->length() == 1); | 3348   DCHECK(args->length() == 1); | 
| 3323 | 3349 | 
| 3324   VisitForAccumulatorValue(args->at(0)); | 3350   VisitForAccumulatorValue(args->at(0)); | 
| 3325 | 3351 | 
| 3326   Label materialize_true, materialize_false; | 3352   Label materialize_true, materialize_false; | 
| 3327   Label* if_true = NULL; | 3353   Label* if_true = NULL; | 
| 3328   Label* if_false = NULL; | 3354   Label* if_false = NULL; | 
| 3329   Label* fall_through = NULL; | 3355   Label* fall_through = NULL; | 
| (...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4990               1 << Map::kIsUndetectable); | 5016               1 << Map::kIsUndetectable); | 
| 4991     Split(zero, if_true, if_false, fall_through); | 5017     Split(zero, if_true, if_false, fall_through); | 
| 4992   } else if (String::Equals(check, factory->symbol_string())) { | 5018   } else if (String::Equals(check, factory->symbol_string())) { | 
| 4993     __ JumpIfSmi(eax, if_false); | 5019     __ JumpIfSmi(eax, if_false); | 
| 4994     __ CmpObjectType(eax, SYMBOL_TYPE, edx); | 5020     __ CmpObjectType(eax, SYMBOL_TYPE, edx); | 
| 4995     Split(equal, if_true, if_false, fall_through); | 5021     Split(equal, if_true, if_false, fall_through); | 
| 4996   } else if (String::Equals(check, factory->float32x4_string())) { | 5022   } else if (String::Equals(check, factory->float32x4_string())) { | 
| 4997     __ JumpIfSmi(eax, if_false); | 5023     __ JumpIfSmi(eax, if_false); | 
| 4998     __ CmpObjectType(eax, FLOAT32X4_TYPE, edx); | 5024     __ CmpObjectType(eax, FLOAT32X4_TYPE, edx); | 
| 4999     Split(equal, if_true, if_false, fall_through); | 5025     Split(equal, if_true, if_false, fall_through); | 
|  | 5026   } else if (String::Equals(check, factory->int32x4_string())) { | 
|  | 5027     __ JumpIfSmi(eax, if_false); | 
|  | 5028     __ CmpObjectType(eax, INT32X4_TYPE, edx); | 
|  | 5029     Split(equal, if_true, if_false, fall_through); | 
|  | 5030   } else if (String::Equals(check, factory->bool32x4_string())) { | 
|  | 5031     __ JumpIfSmi(eax, if_false); | 
|  | 5032     __ CmpObjectType(eax, BOOL32X4_TYPE, edx); | 
|  | 5033     Split(equal, if_true, if_false, fall_through); | 
|  | 5034   } else if (String::Equals(check, factory->int16x8_string())) { | 
|  | 5035     __ JumpIfSmi(eax, if_false); | 
|  | 5036     __ CmpObjectType(eax, INT16X8_TYPE, edx); | 
|  | 5037     Split(equal, if_true, if_false, fall_through); | 
|  | 5038   } else if (String::Equals(check, factory->bool16x8_string())) { | 
|  | 5039     __ JumpIfSmi(eax, if_false); | 
|  | 5040     __ CmpObjectType(eax, BOOL16X8_TYPE, edx); | 
|  | 5041     Split(equal, if_true, if_false, fall_through); | 
|  | 5042   } else if (String::Equals(check, factory->int8x16_string())) { | 
|  | 5043     __ JumpIfSmi(eax, if_false); | 
|  | 5044     __ CmpObjectType(eax, INT8X16_TYPE, edx); | 
|  | 5045     Split(equal, if_true, if_false, fall_through); | 
|  | 5046   } else if (String::Equals(check, factory->bool8x16_string())) { | 
|  | 5047     __ JumpIfSmi(eax, if_false); | 
|  | 5048     __ CmpObjectType(eax, BOOL8X16_TYPE, edx); | 
|  | 5049     Split(equal, if_true, if_false, fall_through); | 
| 5000   } else if (String::Equals(check, factory->boolean_string())) { | 5050   } else if (String::Equals(check, factory->boolean_string())) { | 
| 5001     __ cmp(eax, isolate()->factory()->true_value()); | 5051     __ cmp(eax, isolate()->factory()->true_value()); | 
| 5002     __ j(equal, if_true); | 5052     __ j(equal, if_true); | 
| 5003     __ cmp(eax, isolate()->factory()->false_value()); | 5053     __ cmp(eax, isolate()->factory()->false_value()); | 
| 5004     Split(equal, if_true, if_false, fall_through); | 5054     Split(equal, if_true, if_false, fall_through); | 
| 5005   } else if (String::Equals(check, factory->undefined_string())) { | 5055   } else if (String::Equals(check, factory->undefined_string())) { | 
| 5006     __ cmp(eax, isolate()->factory()->undefined_value()); | 5056     __ cmp(eax, isolate()->factory()->undefined_value()); | 
| 5007     __ j(equal, if_true); | 5057     __ j(equal, if_true); | 
| 5008     __ JumpIfSmi(eax, if_false); | 5058     __ JumpIfSmi(eax, if_false); | 
| 5009     // Check for undetectable objects => true. | 5059     // Check for undetectable objects => true. | 
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5325             Assembler::target_address_at(call_target_address, | 5375             Assembler::target_address_at(call_target_address, | 
| 5326                                          unoptimized_code)); | 5376                                          unoptimized_code)); | 
| 5327   return OSR_AFTER_STACK_CHECK; | 5377   return OSR_AFTER_STACK_CHECK; | 
| 5328 } | 5378 } | 
| 5329 | 5379 | 
| 5330 | 5380 | 
| 5331 }  // namespace internal | 5381 }  // namespace internal | 
| 5332 }  // namespace v8 | 5382 }  // namespace v8 | 
| 5333 | 5383 | 
| 5334 #endif  // V8_TARGET_ARCH_IA32 | 5384 #endif  // V8_TARGET_ARCH_IA32 | 
| OLD | NEW | 
|---|