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 3320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3331 | 3331 |
3332 __ JumpIfSmi(eax, if_false); | 3332 __ JumpIfSmi(eax, if_false); |
3333 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); | 3333 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); |
3334 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3334 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3335 Split(equal, if_true, if_false, fall_through); | 3335 Split(equal, if_true, if_false, fall_through); |
3336 | 3336 |
3337 context()->Plug(if_true, if_false); | 3337 context()->Plug(if_true, if_false); |
3338 } | 3338 } |
3339 | 3339 |
3340 | 3340 |
| 3341 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
| 3342 ZoneList<Expression*>* args = expr->arguments(); |
| 3343 DCHECK(args->length() == 1); |
| 3344 |
| 3345 VisitForAccumulatorValue(args->at(0)); |
| 3346 |
| 3347 Label materialize_true, materialize_false; |
| 3348 Label* if_true = NULL; |
| 3349 Label* if_false = NULL; |
| 3350 Label* fall_through = NULL; |
| 3351 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 3352 &if_false, &fall_through); |
| 3353 |
| 3354 __ JumpIfSmi(eax, if_false); |
| 3355 Register map = ebx; |
| 3356 __ mov(map, FieldOperand(eax, HeapObject::kMapOffset)); |
| 3357 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); |
| 3358 __ j(less, if_false); |
| 3359 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); |
| 3360 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3361 Split(less_equal, if_true, if_false, fall_through); |
| 3362 |
| 3363 context()->Plug(if_true, if_false); |
| 3364 } |
| 3365 |
3341 | 3366 |
3342 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | 3367 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { |
3343 DCHECK(expr->arguments()->length() == 0); | 3368 DCHECK(expr->arguments()->length() == 0); |
3344 | 3369 |
3345 Label materialize_true, materialize_false; | 3370 Label materialize_true, materialize_false; |
3346 Label* if_true = NULL; | 3371 Label* if_true = NULL; |
3347 Label* if_false = NULL; | 3372 Label* if_false = NULL; |
3348 Label* fall_through = NULL; | 3373 Label* fall_through = NULL; |
3349 context()->PrepareTest(&materialize_true, &materialize_false, | 3374 context()->PrepareTest(&materialize_true, &materialize_false, |
3350 &if_true, &if_false, &fall_through); | 3375 &if_true, &if_false, &fall_through); |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5110 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5135 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5111 Assembler::target_address_at(call_target_address, | 5136 Assembler::target_address_at(call_target_address, |
5112 unoptimized_code)); | 5137 unoptimized_code)); |
5113 return OSR_AFTER_STACK_CHECK; | 5138 return OSR_AFTER_STACK_CHECK; |
5114 } | 5139 } |
5115 | 5140 |
5116 | 5141 |
5117 } } // namespace v8::internal | 5142 } } // namespace v8::internal |
5118 | 5143 |
5119 #endif // V8_TARGET_ARCH_IA32 | 5144 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |