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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 5 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/full-codegen-mips.cc ('k') | src/mips/lithium-mips.h » ('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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2873 2873
2874 2874
2875 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2875 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2876 DCHECK(ToRegister(instr->context()).is(cp)); 2876 DCHECK(ToRegister(instr->context()).is(cp));
2877 DCHECK(ToRegister(instr->global_object()) 2877 DCHECK(ToRegister(instr->global_object())
2878 .is(LoadDescriptor::ReceiverRegister())); 2878 .is(LoadDescriptor::ReceiverRegister()));
2879 DCHECK(ToRegister(instr->result()).is(v0)); 2879 DCHECK(ToRegister(instr->result()).is(v0));
2880 2880
2881 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2881 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2882 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2882 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2883 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; 2883 Handle<Code> ic =
2884 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode, SLOPPY, 2884 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode(),
2885 PREMONOMORPHIC).code(); 2885 SLOPPY, PREMONOMORPHIC).code();
2886 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2886 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2887 } 2887 }
2888 2888
2889 2889
2890 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2890 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2891 Register context = ToRegister(instr->context()); 2891 Register context = ToRegister(instr->context());
2892 Register result = ToRegister(instr->result()); 2892 Register result = ToRegister(instr->result());
2893 2893
2894 __ lw(result, ContextOperand(context, instr->slot_index())); 2894 __ lw(result, ContextOperand(context, instr->slot_index()));
2895 if (instr->hydrogen()->RequiresHoleCheck()) { 2895 if (instr->hydrogen()->RequiresHoleCheck()) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2976 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2977 DCHECK(ToRegister(instr->context()).is(cp)); 2977 DCHECK(ToRegister(instr->context()).is(cp));
2978 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2978 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2979 DCHECK(ToRegister(instr->result()).is(v0)); 2979 DCHECK(ToRegister(instr->result()).is(v0));
2980 2980
2981 // Name is always in a2. 2981 // Name is always in a2.
2982 __ li(LoadDescriptor::NameRegister(), Operand(instr->name())); 2982 __ li(LoadDescriptor::NameRegister(), Operand(instr->name()));
2983 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2983 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2984 Handle<Code> ic = 2984 Handle<Code> ic =
2985 CodeFactory::LoadICInOptimizedCode( 2985 CodeFactory::LoadICInOptimizedCode(
2986 isolate(), NOT_CONTEXTUAL, instr->hydrogen()->language_mode(), 2986 isolate(), NOT_INSIDE_TYPEOF, instr->hydrogen()->language_mode(),
2987 instr->hydrogen()->initialization_state()).code(); 2987 instr->hydrogen()->initialization_state()).code();
2988 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2988 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2989 } 2989 }
2990 2990
2991 2991
2992 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2992 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2993 Register scratch = scratch0(); 2993 Register scratch = scratch0();
2994 Register function = ToRegister(instr->function()); 2994 Register function = ToRegister(instr->function());
2995 Register result = ToRegister(instr->result()); 2995 Register result = ToRegister(instr->result());
2996 2996
(...skipping 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after
6029 __ Push(at, ToRegister(instr->function())); 6029 __ Push(at, ToRegister(instr->function()));
6030 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6030 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6031 RecordSafepoint(Safepoint::kNoLazyDeopt); 6031 RecordSafepoint(Safepoint::kNoLazyDeopt);
6032 } 6032 }
6033 6033
6034 6034
6035 #undef __ 6035 #undef __
6036 6036
6037 } // namespace internal 6037 } // namespace internal
6038 } // namespace v8 6038 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698