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

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

Issue 527093002: Make concrete classes for individual call descriptors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. 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
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_ARM 7 #if V8_TARGET_ARCH_ARM
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc); 284 CallApiFunctionStub stub(isolate, is_store, call_data_undefined, argc);
285 __ TailCallStub(&stub); 285 __ TailCallStub(&stub);
286 } 286 }
287 287
288 288
289 void ElementHandlerCompiler::GenerateLoadDictionaryElement( 289 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
290 MacroAssembler* masm) { 290 MacroAssembler* masm) {
291 // The return address is in lr. 291 // The return address is in lr.
292 Label slow, miss; 292 Label slow, miss;
293 293
294 Register key = LoadConvention::NameRegister(); 294 Register key = LoadDescriptor::NameRegister();
295 Register receiver = LoadConvention::ReceiverRegister(); 295 Register receiver = LoadDescriptor::ReceiverRegister();
296 DCHECK(receiver.is(r1)); 296 DCHECK(receiver.is(r1));
297 DCHECK(key.is(r2)); 297 DCHECK(key.is(r2));
298 298
299 __ UntagAndJumpIfNotSmi(r6, key, &miss); 299 __ UntagAndJumpIfNotSmi(r6, key, &miss);
300 __ ldr(r4, FieldMemOperand(receiver, JSObject::kElementsOffset)); 300 __ ldr(r4, FieldMemOperand(receiver, JSObject::kElementsOffset));
301 __ LoadFromNumberDictionary(&slow, r4, key, r0, r6, r3, r5); 301 __ LoadFromNumberDictionary(&slow, r4, key, r0, r6, r3, r5);
302 __ Ret(); 302 __ Ret();
303 303
304 __ bind(&slow); 304 __ bind(&slow);
305 __ IncrementCounter( 305 __ IncrementCounter(
306 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, r2, r3); 306 masm->isolate()->counters()->keyed_load_external_array_slow(), 1, r2, r3);
307 307
308 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow); 308 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
309 309
310 // Miss case, call the runtime. 310 // Miss case, call the runtime.
311 __ bind(&miss); 311 __ bind(&miss);
312 312
313 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 313 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
314 } 314 }
315 315
316 316
317 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 317 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
318 // Push receiver, key and value for runtime call. 318 // Push receiver, key and value for runtime call.
319 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 319 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
320 StoreConvention::ValueRegister()); 320 StoreDescriptor::ValueRegister());
321 321
322 // The slow case calls into the runtime to complete the store without causing 322 // The slow case calls into the runtime to complete the store without causing
323 // an IC miss that would otherwise cause a transition to the generic stub. 323 // an IC miss that would otherwise cause a transition to the generic stub.
324 ExternalReference ref = 324 ExternalReference ref =
325 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); 325 ExternalReference(IC_Utility(IC::kStoreIC_Slow), masm->isolate());
326 __ TailCallExternalReference(ref, 3, 1); 326 __ TailCallExternalReference(ref, 3, 1);
327 } 327 }
328 328
329 329
330 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { 330 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
331 // Push receiver, key and value for runtime call. 331 // Push receiver, key and value for runtime call.
332 __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), 332 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
333 StoreConvention::ValueRegister()); 333 StoreDescriptor::ValueRegister());
334 334
335 // The slow case calls into the runtime to complete the store without causing 335 // The slow case calls into the runtime to complete the store without causing
336 // an IC miss that would otherwise cause a transition to the generic stub. 336 // an IC miss that would otherwise cause a transition to the generic stub.
337 ExternalReference ref = 337 ExternalReference ref =
338 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate()); 338 ExternalReference(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate());
339 __ TailCallExternalReference(ref, 3, 1); 339 __ TailCallExternalReference(ref, 3, 1);
340 } 340 }
341 341
342 342
343 #undef __ 343 #undef __
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 ExternalReference store_ic_property = ExternalReference( 822 ExternalReference store_ic_property = ExternalReference(
823 IC_Utility(IC::kStorePropertyWithInterceptor), isolate()); 823 IC_Utility(IC::kStorePropertyWithInterceptor), isolate());
824 __ TailCallExternalReference(store_ic_property, 3, 1); 824 __ TailCallExternalReference(store_ic_property, 3, 1);
825 825
826 // Return the generated code. 826 // Return the generated code.
827 return GetCode(kind(), Code::FAST, name); 827 return GetCode(kind(), Code::FAST, name);
828 } 828 }
829 829
830 830
831 Register NamedStoreHandlerCompiler::value() { 831 Register NamedStoreHandlerCompiler::value() {
832 return StoreConvention::ValueRegister(); 832 return StoreDescriptor::ValueRegister();
833 } 833 }
834 834
835 835
836 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 836 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
837 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { 837 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
838 Label miss; 838 Label miss;
839 FrontendHeader(receiver(), name, &miss); 839 FrontendHeader(receiver(), name, &miss);
840 840
841 // Get the value from the cell. 841 // Get the value from the cell.
842 Register result = StoreConvention::ValueRegister(); 842 Register result = StoreDescriptor::ValueRegister();
843 __ mov(result, Operand(cell)); 843 __ mov(result, Operand(cell));
844 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset)); 844 __ ldr(result, FieldMemOperand(result, Cell::kValueOffset));
845 845
846 // Check for deleted property if property can actually be deleted. 846 // Check for deleted property if property can actually be deleted.
847 if (is_configurable) { 847 if (is_configurable) {
848 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 848 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
849 __ cmp(result, ip); 849 __ cmp(result, ip);
850 __ b(eq, &miss); 850 __ b(eq, &miss);
851 } 851 }
852 852
853 Counters* counters = isolate()->counters(); 853 Counters* counters = isolate()->counters();
854 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3); 854 __ IncrementCounter(counters->named_load_global_stub(), 1, r1, r3);
855 __ Ret(); 855 __ Ret();
856 856
857 FrontendFooter(name, &miss); 857 FrontendFooter(name, &miss);
858 858
859 // Return the generated code. 859 // Return the generated code.
860 return GetCode(kind(), Code::NORMAL, name); 860 return GetCode(kind(), Code::NORMAL, name);
861 } 861 }
862 862
863 863
864 #undef __ 864 #undef __
865 } 865 }
866 } // namespace v8::internal 866 } // namespace v8::internal
867 867
868 #endif // V8_TARGET_ARCH_ARM 868 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698