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

Side by Side Diff: src/mips/full-codegen-mips.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 4815 matching lines...) Expand 10 before | Expand all | Expand 10 after
4826 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS); 4826 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS);
4827 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 4827 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
4828 if (context()->IsStackValue()) __ push(v0); 4828 if (context()->IsStackValue()) __ push(v0);
4829 __ bind(&done); 4829 __ bind(&done);
4830 } 4830 }
4831 break; 4831 break;
4832 } 4832 }
4833 4833
4834 case Token::TYPEOF: { 4834 case Token::TYPEOF: {
4835 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4835 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4836 { StackValueContext context(this); 4836 {
4837 AccumulatorValueContext context(this);
4837 VisitForTypeofValue(expr->expression()); 4838 VisitForTypeofValue(expr->expression());
4838 } 4839 }
4839 __ CallRuntime(Runtime::kTypeof, 1); 4840 __ mov(a3, v0);
4841 TypeofStub typeof_stub(isolate());
4842 __ CallStub(&typeof_stub);
4840 context()->Plug(v0); 4843 context()->Plug(v0);
4841 break; 4844 break;
4842 } 4845 }
4843 4846
4844 default: 4847 default:
4845 UNREACHABLE(); 4848 UNREACHABLE();
4846 } 4849 }
4847 } 4850 }
4848 4851
4849 4852
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
5475 Assembler::target_address_at(pc_immediate_load_address)) == 5478 Assembler::target_address_at(pc_immediate_load_address)) ==
5476 reinterpret_cast<uint32_t>( 5479 reinterpret_cast<uint32_t>(
5477 isolate->builtins()->OsrAfterStackCheck()->entry())); 5480 isolate->builtins()->OsrAfterStackCheck()->entry()));
5478 return OSR_AFTER_STACK_CHECK; 5481 return OSR_AFTER_STACK_CHECK;
5479 } 5482 }
5480 5483
5481 5484
5482 } } // namespace v8::internal 5485 } } // namespace v8::internal
5483 5486
5484 #endif // V8_TARGET_ARCH_MIPS 5487 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698