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

Side by Side Diff: src/a64/stub-cache-a64.cc

Issue 169353002: Remove arch specific api callback generate functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « no previous file | src/arm/stub-cache-arm.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 IC::UtilityId id) { 738 IC::UtilityId id) {
739 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 739 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
740 740
741 __ CallExternalReference( 741 __ CallExternalReference(
742 ExternalReference(IC_Utility(id), masm->isolate()), 742 ExternalReference(IC_Utility(id), masm->isolate()),
743 StubCache::kInterceptorArgsLength); 743 StubCache::kInterceptorArgsLength);
744 } 744 }
745 745
746 746
747 // Generate call to api function. 747 // Generate call to api function.
748 static void GenerateFastApiCall(MacroAssembler* masm, 748 void StubCompiler::GenerateFastApiCall(MacroAssembler* masm,
749 const CallOptimization& optimization, 749 const CallOptimization& optimization,
750 Handle<Map> receiver_map, 750 Handle<Map> receiver_map,
751 Register receiver, 751 Register receiver,
752 Register scratch, 752 Register scratch,
753 bool is_store, 753 bool is_store,
754 int argc, 754 int argc,
755 Register* values) { 755 Register* values) {
756 ASSERT(!AreAliased(receiver, scratch)); 756 ASSERT(!AreAliased(receiver, scratch));
757 __ Push(receiver); 757 __ Push(receiver);
758 // Write the arguments to stack frame. 758 // Write the arguments to stack frame.
759 for (int i = 0; i < argc; i++) { 759 for (int i = 0; i < argc; i++) {
760 // TODO(jbramley): Push these in as few Push() calls as possible. 760 // TODO(jbramley): Push these in as few Push() calls as possible.
761 Register arg = values[argc-1-i]; 761 Register arg = values[argc-1-i];
762 ASSERT(!AreAliased(receiver, scratch, arg)); 762 ASSERT(!AreAliased(receiver, scratch, arg));
763 __ Push(arg); 763 __ Push(arg);
764 } 764 }
765 765
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 1038
1039 1039
1040 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { 1040 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1041 // Return the constant value. 1041 // Return the constant value.
1042 __ LoadObject(x0, value); 1042 __ LoadObject(x0, value);
1043 __ Ret(); 1043 __ Ret();
1044 } 1044 }
1045 1045
1046 1046
1047 void LoadStubCompiler::GenerateLoadCallback( 1047 void LoadStubCompiler::GenerateLoadCallback(
1048 const CallOptimization& call_optimization,
1049 Handle<Map> receiver_map) {
1050 GenerateFastApiCall(
1051 masm(), call_optimization, receiver_map,
1052 receiver(), scratch3(), false, 0, NULL);
1053 }
1054
1055
1056 void LoadStubCompiler::GenerateLoadCallback(
1057 Register reg, 1048 Register reg,
1058 Handle<ExecutableAccessorInfo> callback) { 1049 Handle<ExecutableAccessorInfo> callback) {
1059 ASSERT(!AreAliased(scratch2(), scratch3(), scratch4(), reg)); 1050 ASSERT(!AreAliased(scratch2(), scratch3(), scratch4(), reg));
1060 1051
1061 // Build ExecutableAccessorInfo::args_ list on the stack and push property 1052 // Build ExecutableAccessorInfo::args_ list on the stack and push property
1062 // name below the exit frame to make GC aware of them and store pointers to 1053 // name below the exit frame to make GC aware of them and store pointers to
1063 // them. 1054 // them.
1064 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); 1055 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0);
1065 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); 1056 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1);
1066 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); 1057 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2);
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 } 1516 }
1526 1517
1527 __ Bind(&miss); 1518 __ Bind(&miss);
1528 TailCallBuiltin(masm(), MissBuiltin(kind())); 1519 TailCallBuiltin(masm(), MissBuiltin(kind()));
1529 1520
1530 return GetICCode( 1521 return GetICCode(
1531 kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 1522 kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
1532 } 1523 }
1533 1524
1534 1525
1535 Handle<Code> StoreStubCompiler::CompileStoreCallback(
1536 Handle<JSObject> object,
1537 Handle<JSObject> holder,
1538 Handle<Name> name,
1539 const CallOptimization& call_optimization) {
1540 HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
1541 receiver(), holder, name);
1542
1543 Register values[] = { value() };
1544 GenerateFastApiCall(masm(), call_optimization, handle(object->map()),
1545 receiver(), scratch3(), true, 1, values);
1546
1547 // Return the generated code.
1548 return GetCode(kind(), Code::FAST, name);
1549 }
1550
1551
1552 #undef __ 1526 #undef __
1553 #define __ ACCESS_MASM(masm) 1527 #define __ ACCESS_MASM(masm)
1554 1528
1555 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( 1529 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement(
1556 MacroAssembler* masm) { 1530 MacroAssembler* masm) {
1557 // ---------- S t a t e -------------- 1531 // ---------- S t a t e --------------
1558 // -- lr : return address 1532 // -- lr : return address
1559 // -- x0 : key 1533 // -- x0 : key
1560 // -- x1 : receiver 1534 // -- x1 : receiver
1561 // ----------------------------------- 1535 // -----------------------------------
(...skipping 15 matching lines...) Expand all
1577 1551
1578 // Miss case, call the runtime. 1552 // Miss case, call the runtime.
1579 __ Bind(&miss); 1553 __ Bind(&miss);
1580 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1554 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1581 } 1555 }
1582 1556
1583 1557
1584 } } // namespace v8::internal 1558 } } // namespace v8::internal
1585 1559
1586 #endif // V8_TARGET_ARCH_A64 1560 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « no previous file | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698