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

Side by Side Diff: src/ic/mips64/handler-compiler-mips64.cc

Issue 538573002: MIPS: Make concrete classes for individual call descriptors. - internal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips64 port added. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/mips64/access-compiler-mips64.cc ('k') | src/ic/mips64/ic-compiler-mips64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); 279 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
280 __ TailCallStub(&stub); 280 __ TailCallStub(&stub);
281 } 281 }
282 282
283 283
284 void ElementHandlerCompiler::GenerateLoadDictionaryElement( 284 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
285 MacroAssembler* masm) { 285 MacroAssembler* masm) {
286 // The return address is in ra 286 // The return address is in ra
287 Label slow, miss; 287 Label slow, miss;
288 288
289 Register key = LoadConvention::NameRegister(); 289 Register key = LoadDescriptor::NameRegister();
290 Register receiver = LoadConvention::ReceiverRegister(); 290 Register receiver = LoadDescriptor::ReceiverRegister();
291 DCHECK(receiver.is(a1)); 291 DCHECK(receiver.is(a1));
292 DCHECK(key.is(a2)); 292 DCHECK(key.is(a2));
293 293
294 __ UntagAndJumpIfNotSmi(a6, key, &miss); 294 __ UntagAndJumpIfNotSmi(a6, key, &miss);
295 __ ld(a4, FieldMemOperand(receiver, JSObject::kElementsOffset)); 295 __ ld(a4, FieldMemOperand(receiver, JSObject::kElementsOffset));
296 DCHECK(kSmiTagSize + kSmiShiftSize == 32); 296 DCHECK(kSmiTagSize + kSmiShiftSize == 32);
297 __ LoadFromNumberDictionary(&slow, a4, key, v0, a6, a3, a5); 297 __ LoadFromNumberDictionary(&slow, a4, key, v0, a6, a3, a5);
298 __ Ret(); 298 __ Ret();
299 299
300 // Slow case, key and receiver still unmodified. 300 // Slow case, key and receiver still unmodified.
301 __ bind(&slow); 301 __ bind(&slow);
302 __ IncrementCounter( 302 __ IncrementCounter(
303 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, a2, a3); 303 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, a2, a3);
304 304
305 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); 305 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
306 306
307 // Miss case, call the runtime. 307 // Miss case, call the runtime.
308 __ bind(&miss); 308 __ bind(&miss);
309 309
310 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 310 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
311 } 311 }
312 312
313 313
314 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 314 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
315 // Push receiver, key and value for runtime call. 315 // Push receiver, key and value for runtime call.
316 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 316 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
317 StoreConvention::ValueRegister()); 317 StoreDescriptor::ValueRegister());
318 318
319 // The slow case calls into the runtime to complete the store without causing 319 // The slow case calls into the runtime to complete the store without causing
320 // an IC miss that would otherwise cause a transition to the generic stub. 320 // an IC miss that would otherwise cause a transition to the generic stub.
321 ExternalReference ref = 321 ExternalReference ref =
322 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); 322 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
323 __ TailCallExternalReference(ref, 3, 1); 323 __ TailCallExternalReference(ref, 3, 1);
324 } 324 }
325 325
326 326
327 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { 327 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
328 // Push receiver, key and value for runtime call. 328 // Push receiver, key and value for runtime call.
329 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 329 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
330 StoreConvention::ValueRegister()); 330 StoreDescriptor::ValueRegister());
331 331
332 // The slow case calls into the runtime to complete the store without causing 332 // The slow case calls into the runtime to complete the store without causing
333 // an IC miss that would otherwise cause a transition to the generic stub. 333 // an IC miss that would otherwise cause a transition to the generic stub.
334 ExternalReference ref = 334 ExternalReference ref =
335 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate()); 335 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate());
336 __ TailCallExternalReference(ref, 3, 1); 336 __ TailCallExternalReference(ref, 3, 1);
337 } 337 }
338 338
339 339
340 #undef __ 340 #undef __
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 ExternalReference store_ic_property = ExternalReference( 823 ExternalReference store_ic_property = ExternalReference(
824 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 824 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
825 __ TailCallExternalReference(store_ic_property, 3, 1); 825 __ TailCallExternalReference(store_ic_property, 3, 1);
826 826
827 // Return the generated code. 827 // Return the generated code.
828 return GetCode(kind(), Code::FAST, name); 828 return GetCode(kind(), Code::FAST, name);
829 } 829 }
830 830
831 831
832 Register NamedStoreHandlerCompiler::value() { 832 Register NamedStoreHandlerCompiler::value() {
833 return StoreConvention::ValueRegister(); 833 return StoreDescriptor::ValueRegister();
834 } 834 }
835 835
836 836
837 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 837 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
838 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 838 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
839 Label miss; 839 Label miss;
840 840
841 FrontendHeader(receiver(), name, &miss); 841 FrontendHeader(receiver(), name, &miss);
842 842
843 // Get the value from the cell. 843 // Get the value from the cell.
844 Register result = StoreConvention::ValueRegister(); 844 Register result = StoreDescriptor::ValueRegister();
845 __ li(result, Operand(cell)); 845 __ li(result, Operand(cell));
846 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); 846 __ ld(result, FieldMemOperand(result, Cell::kValueOffset));
847 847
848 // Check for deleted property if property can actually be deleted. 848 // Check for deleted property if property can actually be deleted.
849 if (is_configurable) { 849 if (is_configurable) {
850 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 850 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
851 __ Branch(&miss, eq, result, Operand(at)); 851 __ Branch(&miss, eq, result, Operand(at));
852 } 852 }
853 853
854 Counters* counters = isolate()->counters(); 854 Counters* counters = isolate()->counters();
855 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3); 855 __ IncrementCounter(counters->named_load_global_stub(), 1, a1, a3);
856 __ Ret(USE_DELAY_SLOT); 856 __ Ret(USE_DELAY_SLOT);
857 __ mov(v0, result); 857 __ mov(v0, result);
858 858
859 FrontendFooter(name, &miss); 859 FrontendFooter(name, &miss);
860 860
861 // Return the generated code. 861 // Return the generated code.
862 return GetCode(kind(), Code::NORMAL, name); 862 return GetCode(kind(), Code::NORMAL, name);
863 } 863 }
864 864
865 865
866 #undef __ 866 #undef __
867 } 867 }
868 } // namespace v8::internal 868 } // namespace v8::internal
869 869
870 #endif // V8_TARGET_ARCH_MIPS64 870 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips64/access-compiler-mips64.cc ('k') | src/ic/mips64/ic-compiler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698