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: REBASE. 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
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/interface-descriptors-mips.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 4784 matching lines...) Expand 10 before | Expand all | Expand 10 after
4795 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS); 4795 PrepareForBailoutForId(expr->MaterializeFalseId(), NO_REGISTERS);
4796 __ LoadRoot(v0, Heap::kFalseValueRootIndex); 4796 __ LoadRoot(v0, Heap::kFalseValueRootIndex);
4797 if (context()->IsStackValue()) __ push(v0); 4797 if (context()->IsStackValue()) __ push(v0);
4798 __ bind(&done); 4798 __ bind(&done);
4799 } 4799 }
4800 break; 4800 break;
4801 } 4801 }
4802 4802
4803 case Token::TYPEOF: { 4803 case Token::TYPEOF: {
4804 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)"); 4804 Comment cmnt(masm_, "[ UnaryOperation (TYPEOF)");
4805 { StackValueContext context(this); 4805 {
4806 AccumulatorValueContext context(this);
4806 VisitForTypeofValue(expr->expression()); 4807 VisitForTypeofValue(expr->expression());
4807 } 4808 }
4808 __ CallRuntime(Runtime::kTypeof, 1); 4809 __ mov(a3, v0);
4810 TypeofStub typeof_stub(isolate());
4811 __ CallStub(&typeof_stub);
4809 context()->Plug(v0); 4812 context()->Plug(v0);
4810 break; 4813 break;
4811 } 4814 }
4812 4815
4813 default: 4816 default:
4814 UNREACHABLE(); 4817 UNREACHABLE();
4815 } 4818 }
4816 } 4819 }
4817 4820
4818 4821
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
5444 Assembler::target_address_at(pc_immediate_load_address)) == 5447 Assembler::target_address_at(pc_immediate_load_address)) ==
5445 reinterpret_cast<uint32_t>( 5448 reinterpret_cast<uint32_t>(
5446 isolate->builtins()->OsrAfterStackCheck()->entry())); 5449 isolate->builtins()->OsrAfterStackCheck()->entry()));
5447 return OSR_AFTER_STACK_CHECK; 5450 return OSR_AFTER_STACK_CHECK;
5448 } 5451 }
5449 5452
5450 5453
5451 } } // namespace v8::internal 5454 } } // namespace v8::internal
5452 5455
5453 #endif // V8_TARGET_ARCH_MIPS 5456 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/interface-descriptors-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698