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

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

Issue 1114563003: Optimize the typeof operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mips/mips64 errors. 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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 4817 matching lines...) Expand 10 before | Expand all | Expand 10 after
4828 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS); 4828 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS);
4829 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 4829 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
4830 if (context()->IsStackValue()) __ push(v0); 4830 if (context()->IsStackValue()) __ push(v0);
4831 __ bind(&done); 4831 __ bind(&done);
4832 } 4832 }
4833 break; 4833 break;
4834 } 4834 }
4835 4835
4836 case Token::TYPEOF: { 4836 case Token::TYPEOF: {
4837 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4837 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4838 { StackValueContext context(this); 4838 {
4839 AccumulatorValueContext context(this);
4839 VisitForTypeofValue(expr->expression()); 4840 VisitForTypeofValue(expr->expression());
4840 } 4841 }
4841 __ CallRuntime(Runtime::kTypeof, 1); 4842 __ mov(a3, v0);
4843 TypeofStub typeof_stub(isolate());
4844 __ CallStub(&typeof_stub);
4842 context()->Plug(v0); 4845 context()->Plug(v0);
4843 break; 4846 break;
4844 } 4847 }
4845 4848
4846 default: 4849 default:
4847 UNREACHABLE(); 4850 UNREACHABLE();
4848 } 4851 }
4849 } 4852 }
4850 4853
4851 4854
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
5481 Assembler::target_address_at(pc_immediate_load_address)) == 5484 Assembler::target_address_at(pc_immediate_load_address)) ==
5482 reinterpret_cast<uint64_t>( 5485 reinterpret_cast<uint64_t>(
5483 isolate->builtins()->OsrAfterStackCheck()->entry())); 5486 isolate->builtins()->OsrAfterStackCheck()->entry()));
5484 return OSR_AFTER_STACK_CHECK; 5487 return OSR_AFTER_STACK_CHECK;
5485 } 5488 }
5486 5489
5487 5490
5488 } } // namespace v8::internal 5491 } } // namespace v8::internal
5489 5492
5490 #endif // V8_TARGET_ARCH_MIPS64 5493 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698