Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 1183213002: Inline code generation for %_IsTypedArray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: don't remove mips64 EmitIsArray Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/typedarray.js ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_X64 7 #if V8_TARGET_ARCH_X64
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 3508 matching lines...) Expand 10 before | Expand all | Expand 10 after
3519 3519
3520 __ JumpIfSmi(rax, if_false); 3520 __ JumpIfSmi(rax, if_false);
3521 __ CmpObjectType(rax, JS_ARRAY_TYPE, rbx); 3521 __ CmpObjectType(rax, JS_ARRAY_TYPE, rbx);
3522 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3522 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3523 Split(equal, if_true, if_false, fall_through); 3523 Split(equal, if_true, if_false, fall_through);
3524 3524
3525 context()->Plug(if_true, if_false); 3525 context()->Plug(if_true, if_false);
3526 } 3526 }
3527 3527
3528 3528
3529 void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) {
3530 ZoneList<Expression*>* args = expr->arguments();
3531 DCHECK(args->length() == 1);
3532
3533 VisitForAccumulatorValue(args->at(0));
3534
3535 Label materialize_true, materialize_false;
3536 Label* if_true = NULL;
3537 Label* if_false = NULL;
3538 Label* fall_through = NULL;
3539 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3540 &if_false, &fall_through);
3541
3542 __ JumpIfSmi(rax, if_false);
3543 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx);
3544 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3545 Split(equal, if_true, if_false, fall_through);
3546
3547 context()->Plug(if_true, if_false);
3548 }
3549
3550
3529 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { 3551 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) {
3530 ZoneList<Expression*>* args = expr->arguments(); 3552 ZoneList<Expression*>* args = expr->arguments();
3531 DCHECK(args->length() == 1); 3553 DCHECK(args->length() == 1);
3532 3554
3533 VisitForAccumulatorValue(args->at(0)); 3555 VisitForAccumulatorValue(args->at(0));
3534 3556
3535 Label materialize_true, materialize_false; 3557 Label materialize_true, materialize_false;
3536 Label* if_true = NULL; 3558 Label* if_true = NULL;
3537 Label* if_false = NULL; 3559 Label* if_false = NULL;
3538 Label* fall_through = NULL; 3560 Label* fall_through = NULL;
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after
5481 Assembler::target_address_at(call_target_address, 5503 Assembler::target_address_at(call_target_address,
5482 unoptimized_code)); 5504 unoptimized_code));
5483 return OSR_AFTER_STACK_CHECK; 5505 return OSR_AFTER_STACK_CHECK;
5484 } 5506 }
5485 5507
5486 5508
5487 } // namespace internal 5509 } // namespace internal
5488 } // namespace v8 5510 } // namespace v8
5489 5511
5490 #endif // V8_TARGET_ARCH_X64 5512 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/typedarray.js ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698