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

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

Issue 1406113007: Merge GlobalObject with JSGlobalObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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.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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // global proxy when called as functions (without an explicit receiver 143 // global proxy when called as functions (without an explicit receiver
144 // object). 144 // object).
145 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) { 145 if (info()->MustReplaceUndefinedReceiverWithGlobalProxy()) {
146 Label ok; 146 Label ok;
147 int receiver_offset = info_->scope()->num_parameters() * kPointerSize; 147 int receiver_offset = info_->scope()->num_parameters() * kPointerSize;
148 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 148 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
149 __ lw(a2, MemOperand(sp, receiver_offset)); 149 __ lw(a2, MemOperand(sp, receiver_offset));
150 __ Branch(&ok, ne, a2, Operand(at)); 150 __ Branch(&ok, ne, a2, Operand(at));
151 151
152 __ lw(a2, GlobalObjectOperand()); 152 __ lw(a2, GlobalObjectOperand());
153 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalProxyOffset)); 153 __ lw(a2, FieldMemOperand(a2, JSGlobalObject::kGlobalProxyOffset));
154 154
155 __ sw(a2, MemOperand(sp, receiver_offset)); 155 __ sw(a2, MemOperand(sp, receiver_offset));
156 156
157 __ bind(&ok); 157 __ bind(&ok);
158 } 158 }
159 } 159 }
160 160
161 info()->set_prologue_offset(masm_->pc_offset()); 161 info()->set_prologue_offset(masm_->pc_offset());
162 if (NeedsEagerFrame()) { 162 if (NeedsEagerFrame()) {
163 if (info()->IsStub()) { 163 if (info()->IsStub()) {
(...skipping 3090 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 3254
3255 __ GetObjectType(receiver, scratch, scratch); 3255 __ GetObjectType(receiver, scratch, scratch);
3256 DeoptimizeIf(lt, instr, Deoptimizer::kNotAJavaScriptObject, scratch, 3256 DeoptimizeIf(lt, instr, Deoptimizer::kNotAJavaScriptObject, scratch,
3257 Operand(FIRST_SPEC_OBJECT_TYPE)); 3257 Operand(FIRST_SPEC_OBJECT_TYPE));
3258 3258
3259 __ Branch(&result_in_receiver); 3259 __ Branch(&result_in_receiver);
3260 __ bind(&global_object); 3260 __ bind(&global_object);
3261 __ lw(result, FieldMemOperand(function, JSFunction::kContextOffset)); 3261 __ lw(result, FieldMemOperand(function, JSFunction::kContextOffset));
3262 __ lw(result, 3262 __ lw(result,
3263 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX)); 3263 ContextOperand(result, Context::GLOBAL_OBJECT_INDEX));
3264 __ lw(result, 3264 __ lw(result, FieldMemOperand(result, JSGlobalObject::kGlobalProxyOffset));
3265 FieldMemOperand(result, GlobalObject::kGlobalProxyOffset));
3266 3265
3267 if (result.is(receiver)) { 3266 if (result.is(receiver)) {
3268 __ bind(&result_in_receiver); 3267 __ bind(&result_in_receiver);
3269 } else { 3268 } else {
3270 Label result_ok; 3269 Label result_ok;
3271 __ Branch(&result_ok); 3270 __ Branch(&result_ok);
3272 __ bind(&result_in_receiver); 3271 __ bind(&result_in_receiver);
3273 __ mov(result, receiver); 3272 __ mov(result, receiver);
3274 __ bind(&result_ok); 3273 __ bind(&result_ok);
3275 } 3274 }
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after
5849 __ Push(at, ToRegister(instr->function())); 5848 __ Push(at, ToRegister(instr->function()));
5850 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5849 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5851 RecordSafepoint(Safepoint::kNoLazyDeopt); 5850 RecordSafepoint(Safepoint::kNoLazyDeopt);
5852 } 5851 }
5853 5852
5854 5853
5855 #undef __ 5854 #undef __
5856 5855
5857 } // namespace internal 5856 } // namespace internal
5858 } // namespace v8 5857 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698