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

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

Issue 1114563003: Optimize the typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 years, 7 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
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_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 4812 matching lines...) Expand 10 before | Expand all | Expand 10 after
4823 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS); 4823 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS);
4824 __ LoadRoot(r0, Heap::kFalseValueRootIndex); 4824 __ LoadRoot(r0, Heap::kFalseValueRootIndex);
4825 if (context()->IsStackValue()) __ push(r0); 4825 if (context()->IsStackValue()) __ push(r0);
4826 __ bind(&done); 4826 __ bind(&done);
4827 } 4827 }
4828 break; 4828 break;
4829 } 4829 }
4830 4830
4831 case Token::TYPEOF: { 4831 case Token::TYPEOF: {
4832 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4832 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4833 { StackValueContext context(this); 4833 {
4834 AccumulatorValueContext context(this);
4834 VisitForTypeofValue(expr->expression()); 4835 VisitForTypeofValue(expr->expression());
4835 } 4836 }
4836 __ CallRuntime(Runtime::kTypeof, 1); 4837 __ mov(r3, r0);
4838 TypeofStub typeof_stub(isolate());
4839 __ CallStub(&typeof_stub);
4837 context()->Plug(r0); 4840 context()->Plug(r0);
4838 break; 4841 break;
4839 } 4842 }
4840 4843
4841 default: 4844 default:
4842 UNREACHABLE(); 4845 UNREACHABLE();
4843 } 4846 }
4844 } 4847 }
4845 4848
4846 4849
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
5536 5539
5537 DCHECK(interrupt_address == 5540 DCHECK(interrupt_address ==
5538 isolate->builtins()->OsrAfterStackCheck()->entry()); 5541 isolate->builtins()->OsrAfterStackCheck()->entry());
5539 return OSR_AFTER_STACK_CHECK; 5542 return OSR_AFTER_STACK_CHECK;
5540 } 5543 }
5541 5544
5542 5545
5543 } } // namespace v8::internal 5546 } } // namespace v8::internal
5544 5547
5545 #endif // V8_TARGET_ARCH_ARM 5548 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698