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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3433 | 3433 |
3434 __ JumpIfSmi(r0, if_false); | 3434 __ JumpIfSmi(r0, if_false); |
3435 __ CompareObjectType(r0, r1, r1, JS_REGEXP_TYPE); | 3435 __ CompareObjectType(r0, r1, r1, JS_REGEXP_TYPE); |
3436 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3436 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3437 Split(eq, if_true, if_false, fall_through); | 3437 Split(eq, if_true, if_false, fall_through); |
3438 | 3438 |
3439 context()->Plug(if_true, if_false); | 3439 context()->Plug(if_true, if_false); |
3440 } | 3440 } |
3441 | 3441 |
3442 | 3442 |
| 3443 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
| 3444 ZoneList<Expression*>* args = expr->arguments(); |
| 3445 DCHECK(args->length() == 1); |
| 3446 |
| 3447 VisitForAccumulatorValue(args->at(0)); |
| 3448 |
| 3449 Label materialize_true, materialize_false; |
| 3450 Label* if_true = NULL; |
| 3451 Label* if_false = NULL; |
| 3452 Label* fall_through = NULL; |
| 3453 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 3454 &if_false, &fall_through); |
| 3455 |
| 3456 __ JumpIfSmi(r0, if_false); |
| 3457 Register map = r1; |
| 3458 Register type_reg = r2; |
| 3459 __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 3460 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 3461 __ sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
| 3462 __ cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); |
| 3463 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3464 Split(ls, if_true, if_false, fall_through); |
| 3465 |
| 3466 context()->Plug(if_true, if_false); |
| 3467 } |
| 3468 |
3443 | 3469 |
3444 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | 3470 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { |
3445 DCHECK(expr->arguments()->length() == 0); | 3471 DCHECK(expr->arguments()->length() == 0); |
3446 | 3472 |
3447 Label materialize_true, materialize_false; | 3473 Label materialize_true, materialize_false; |
3448 Label* if_true = NULL; | 3474 Label* if_true = NULL; |
3449 Label* if_false = NULL; | 3475 Label* if_false = NULL; |
3450 Label* fall_through = NULL; | 3476 Label* fall_through = NULL; |
3451 context()->PrepareTest(&materialize_true, &materialize_false, | 3477 context()->PrepareTest(&materialize_true, &materialize_false, |
3452 &if_true, &if_false, &fall_through); | 3478 &if_true, &if_false, &fall_through); |
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5227 | 5253 |
5228 DCHECK(interrupt_address == | 5254 DCHECK(interrupt_address == |
5229 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5255 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5230 return OSR_AFTER_STACK_CHECK; | 5256 return OSR_AFTER_STACK_CHECK; |
5231 } | 5257 } |
5232 | 5258 |
5233 | 5259 |
5234 } } // namespace v8::internal | 5260 } } // namespace v8::internal |
5235 | 5261 |
5236 #endif // V8_TARGET_ARCH_ARM | 5262 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |