| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 bool restore_context) { | 833 bool restore_context) { |
| 834 // ----------- S t a t e ------------- | 834 // ----------- S t a t e ------------- |
| 835 // -- sp[0] - sp[24] : FunctionCallbackInfo, incl. | 835 // -- sp[0] - sp[24] : FunctionCallbackInfo, incl. |
| 836 // : holder (set by CheckPrototypes) | 836 // : holder (set by CheckPrototypes) |
| 837 // -- sp[28] : last JS argument | 837 // -- sp[28] : last JS argument |
| 838 // -- ... | 838 // -- ... |
| 839 // -- sp[(argc + 6) * 4] : first JS argument | 839 // -- sp[(argc + 6) * 4] : first JS argument |
| 840 // -- sp[(argc + 7) * 4] : receiver | 840 // -- sp[(argc + 7) * 4] : receiver |
| 841 // ----------------------------------- | 841 // ----------------------------------- |
| 842 typedef FunctionCallbackArguments FCA; | 842 typedef FunctionCallbackArguments FCA; |
| 843 const int kArgs = kFastApiCallArguments; | |
| 844 // Save calling context. | 843 // Save calling context. |
| 845 __ sw(cp, | 844 __ sw(cp, MemOperand(sp, FCA::kContextSaveIndex * kPointerSize)); |
| 846 MemOperand(sp, (kArgs - 1 + FCA::kContextSaveIndex) * kPointerSize)); | |
| 847 // Get the function and setup the context. | 845 // Get the function and setup the context. |
| 848 Handle<JSFunction> function = optimization.constant_function(); | 846 Handle<JSFunction> function = optimization.constant_function(); |
| 849 __ LoadHeapObject(t1, function); | 847 __ LoadHeapObject(t1, function); |
| 850 __ lw(cp, FieldMemOperand(t1, JSFunction::kContextOffset)); | 848 __ lw(cp, FieldMemOperand(t1, JSFunction::kContextOffset)); |
| 851 __ sw(t1, MemOperand(sp, (kArgs - 1 + FCA::kCalleeIndex) * kPointerSize)); | 849 __ sw(t1, MemOperand(sp, FCA::kCalleeIndex * kPointerSize)); |
| 852 | 850 |
| 853 // Construct the FunctionCallbackInfo. | 851 // Construct the FunctionCallbackInfo. |
| 854 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 852 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
| 855 Handle<Object> call_data(api_call_info->data(), masm->isolate()); | 853 Handle<Object> call_data(api_call_info->data(), masm->isolate()); |
| 856 if (masm->isolate()->heap()->InNewSpace(*call_data)) { | 854 if (masm->isolate()->heap()->InNewSpace(*call_data)) { |
| 857 __ li(a0, api_call_info); | 855 __ li(a0, api_call_info); |
| 858 __ lw(t2, FieldMemOperand(a0, CallHandlerInfo::kDataOffset)); | 856 __ lw(t2, FieldMemOperand(a0, CallHandlerInfo::kDataOffset)); |
| 859 } else { | 857 } else { |
| 860 __ li(t2, call_data); | 858 __ li(t2, call_data); |
| 861 } | 859 } |
| 862 // Store call data. | 860 // Store call data. |
| 863 __ sw(t2, MemOperand(sp, (kArgs - 1 + FCA::kDataIndex) * kPointerSize)); | 861 __ sw(t2, MemOperand(sp, FCA::kDataIndex * kPointerSize)); |
| 864 // Store isolate. | 862 // Store isolate. |
| 865 __ li(t3, Operand(ExternalReference::isolate_address(masm->isolate()))); | 863 __ li(t3, Operand(ExternalReference::isolate_address(masm->isolate()))); |
| 866 __ sw(t3, MemOperand(sp, (kArgs - 1 + FCA::kIsolateIndex) * kPointerSize)); | 864 __ sw(t3, MemOperand(sp, FCA::kIsolateIndex * kPointerSize)); |
| 867 // Store ReturnValue default and ReturnValue. | 865 // Store ReturnValue default and ReturnValue. |
| 868 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); | 866 __ LoadRoot(t1, Heap::kUndefinedValueRootIndex); |
| 869 __ sw(t1, | 867 __ sw(t1, MemOperand(sp, FCA::kReturnValueOffset * kPointerSize)); |
| 870 MemOperand(sp, (kArgs - 1 + FCA::kReturnValueOffset) * kPointerSize)); | 868 __ sw(t1, MemOperand(sp, FCA::kReturnValueDefaultValueIndex * kPointerSize)); |
| 871 __ sw(t1, | |
| 872 MemOperand(sp, | |
| 873 (kArgs - 1 + FCA::kReturnValueDefaultValueIndex) * kPointerSize)); | |
| 874 | 869 |
| 875 // Prepare arguments. | 870 // Prepare arguments. |
| 876 __ Addu(a2, sp, Operand((kArgs - 1) * kPointerSize)); | 871 __ Move(a2, sp); |
| 877 | 872 |
| 878 // Allocate the v8::Arguments structure in the arguments' space since | 873 // Allocate the v8::Arguments structure in the arguments' space since |
| 879 // it's not controlled by GC. | 874 // it's not controlled by GC. |
| 880 const int kApiStackSpace = 4; | 875 const int kApiStackSpace = 4; |
| 881 | 876 |
| 882 FrameScope frame_scope(masm, StackFrame::MANUAL); | 877 FrameScope frame_scope(masm, StackFrame::MANUAL); |
| 883 __ EnterExitFrame(false, kApiStackSpace); | 878 __ EnterExitFrame(false, kApiStackSpace); |
| 884 | 879 |
| 885 // a0 = v8::Arguments& | 880 // a0 = FunctionCallbackInfo& |
| 886 // Arguments is built at sp + 1 (sp is a reserved spot for ra). | 881 // Arguments is built at sp + 1 (sp is a reserved spot for ra). |
| 887 __ Addu(a0, sp, kPointerSize); | 882 __ Addu(a0, sp, kPointerSize); |
| 888 | 883 // FunctionCallbackInfo::implicit_args_ |
| 889 // v8::Arguments::implicit_args_ | |
| 890 __ sw(a2, MemOperand(a0, 0 * kPointerSize)); | 884 __ sw(a2, MemOperand(a0, 0 * kPointerSize)); |
| 891 // v8::Arguments::values_ | 885 // FunctionCallbackInfo::values_ |
| 892 __ Addu(t0, a2, Operand(argc * kPointerSize)); | 886 __ Addu(t0, a2, Operand((kFastApiCallArguments - 1 + argc) * kPointerSize)); |
| 893 __ sw(t0, MemOperand(a0, 1 * kPointerSize)); | 887 __ sw(t0, MemOperand(a0, 1 * kPointerSize)); |
| 894 // v8::Arguments::length_ = argc | 888 // FunctionCallbackInfo::length_ = argc |
| 895 __ li(t0, Operand(argc)); | 889 __ li(t0, Operand(argc)); |
| 896 __ sw(t0, MemOperand(a0, 2 * kPointerSize)); | 890 __ sw(t0, MemOperand(a0, 2 * kPointerSize)); |
| 897 // v8::Arguments::is_construct_call = 0 | 891 // FunctionCallbackInfo::is_construct_call = 0 |
| 898 __ sw(zero_reg, MemOperand(a0, 3 * kPointerSize)); | 892 __ sw(zero_reg, MemOperand(a0, 3 * kPointerSize)); |
| 899 | 893 |
| 900 const int kStackUnwindSpace = argc + kArgs + 1; | 894 const int kStackUnwindSpace = argc + kFastApiCallArguments + 1; |
| 901 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 895 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
| 902 ApiFunction fun(function_address); | 896 ApiFunction fun(function_address); |
| 903 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 897 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
| 904 ExternalReference ref = | 898 ExternalReference ref = |
| 905 ExternalReference(&fun, | 899 ExternalReference(&fun, |
| 906 type, | 900 type, |
| 907 masm->isolate()); | 901 masm->isolate()); |
| 908 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); | 902 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); |
| 909 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; | 903 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; |
| 910 ApiFunction thunk_fun(thunk_address); | 904 ApiFunction thunk_fun(thunk_address); |
| 911 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, | 905 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, |
| 912 masm->isolate()); | 906 masm->isolate()); |
| 913 | 907 |
| 914 AllowExternalCallThatCantCauseGC scope(masm); | 908 AllowExternalCallThatCantCauseGC scope(masm); |
| 915 MemOperand context_restore_operand( | 909 MemOperand context_restore_operand( |
| 916 fp, (kArgs + 1 + FCA::kContextSaveIndex) * kPointerSize); | 910 fp, (2 + FCA::kContextSaveIndex) * kPointerSize); |
| 917 MemOperand return_value_operand( | 911 MemOperand return_value_operand( |
| 918 fp, (kArgs + 1 + FCA::kReturnValueOffset) * kPointerSize); | 912 fp, (2 + FCA::kReturnValueOffset) * kPointerSize); |
| 913 |
| 919 __ CallApiFunctionAndReturn(ref, | 914 __ CallApiFunctionAndReturn(ref, |
| 920 function_address, | 915 function_address, |
| 921 thunk_ref, | 916 thunk_ref, |
| 922 a1, | 917 a1, |
| 923 kStackUnwindSpace, | 918 kStackUnwindSpace, |
| 924 return_value_operand, | 919 return_value_operand, |
| 925 restore_context ? | 920 restore_context ? |
| 926 &context_restore_operand : NULL); | 921 &context_restore_operand : NULL); |
| 927 } | 922 } |
| 928 | 923 |
| 929 | 924 |
| 930 // Generate call to api function. | 925 // Generate call to api function. |
| 931 static void GenerateFastApiCall(MacroAssembler* masm, | 926 static void GenerateFastApiCall(MacroAssembler* masm, |
| 932 const CallOptimization& optimization, | 927 const CallOptimization& optimization, |
| 933 Register receiver, | 928 Register receiver, |
| 934 Register scratch, | 929 Register scratch, |
| 935 int argc, | 930 int argc, |
| 936 Register* values) { | 931 Register* values) { |
| 937 ASSERT(optimization.is_simple_api_call()); | 932 ASSERT(optimization.is_simple_api_call()); |
| 938 ASSERT(!receiver.is(scratch)); | 933 ASSERT(!receiver.is(scratch)); |
| 939 | 934 |
| 935 typedef FunctionCallbackArguments FCA; |
| 940 const int stack_space = kFastApiCallArguments + argc + 1; | 936 const int stack_space = kFastApiCallArguments + argc + 1; |
| 941 const int kHolderIndex = kFastApiCallArguments + | |
| 942 FunctionCallbackArguments::kHolderIndex - 1; | |
| 943 // Assign stack space for the call arguments. | 937 // Assign stack space for the call arguments. |
| 944 __ Subu(sp, sp, Operand(stack_space * kPointerSize)); | 938 __ Subu(sp, sp, Operand(stack_space * kPointerSize)); |
| 945 // Write holder to stack frame. | 939 // Write holder to stack frame. |
| 946 __ sw(receiver, MemOperand(sp, kHolderIndex * kPointerSize)); | 940 __ sw(receiver, MemOperand(sp, FCA::kHolderIndex * kPointerSize)); |
| 947 // Write receiver to stack frame. | 941 // Write receiver to stack frame. |
| 948 int index = stack_space - 1; | 942 int index = stack_space - 1; |
| 949 __ sw(receiver, MemOperand(sp, index * kPointerSize)); | 943 __ sw(receiver, MemOperand(sp, index * kPointerSize)); |
| 950 // Write the arguments to stack frame. | 944 // Write the arguments to stack frame. |
| 951 for (int i = 0; i < argc; i++) { | 945 for (int i = 0; i < argc; i++) { |
| 952 ASSERT(!receiver.is(values[i])); | 946 ASSERT(!receiver.is(values[i])); |
| 953 ASSERT(!scratch.is(values[i])); | 947 ASSERT(!scratch.is(values[i])); |
| 954 __ sw(receiver, MemOperand(sp, index-- * kPointerSize)); | 948 __ sw(receiver, MemOperand(sp, index-- * kPointerSize)); |
| 955 } | 949 } |
| 956 | 950 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 Register StubCompiler::CheckPrototypes(Handle<JSObject> object, | 1183 Register StubCompiler::CheckPrototypes(Handle<JSObject> object, |
| 1190 Register object_reg, | 1184 Register object_reg, |
| 1191 Handle<JSObject> holder, | 1185 Handle<JSObject> holder, |
| 1192 Register holder_reg, | 1186 Register holder_reg, |
| 1193 Register scratch1, | 1187 Register scratch1, |
| 1194 Register scratch2, | 1188 Register scratch2, |
| 1195 Handle<Name> name, | 1189 Handle<Name> name, |
| 1196 int save_at_depth, | 1190 int save_at_depth, |
| 1197 Label* miss, | 1191 Label* miss, |
| 1198 PrototypeCheckType check) { | 1192 PrototypeCheckType check) { |
| 1199 const int kHolderIndex = kFastApiCallArguments + | |
| 1200 FunctionCallbackArguments::kHolderIndex - 1; | |
| 1201 // Make sure that the type feedback oracle harvests the receiver map. | 1193 // Make sure that the type feedback oracle harvests the receiver map. |
| 1202 // TODO(svenpanne) Remove this hack when all ICs are reworked. | 1194 // TODO(svenpanne) Remove this hack when all ICs are reworked. |
| 1203 __ li(scratch1, Operand(Handle<Map>(object->map()))); | 1195 __ li(scratch1, Operand(Handle<Map>(object->map()))); |
| 1204 | 1196 |
| 1205 Handle<JSObject> first = object; | 1197 Handle<JSObject> first = object; |
| 1206 // Make sure there's no overlap between holder and object registers. | 1198 // Make sure there's no overlap between holder and object registers. |
| 1207 ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); | 1199 ASSERT(!scratch1.is(object_reg) && !scratch1.is(holder_reg)); |
| 1208 ASSERT(!scratch2.is(object_reg) && !scratch2.is(holder_reg) | 1200 ASSERT(!scratch2.is(object_reg) && !scratch2.is(holder_reg) |
| 1209 && !scratch2.is(scratch1)); | 1201 && !scratch2.is(scratch1)); |
| 1210 | 1202 |
| 1211 // Keep track of the current object in register reg. | 1203 // Keep track of the current object in register reg. |
| 1212 Register reg = object_reg; | 1204 Register reg = object_reg; |
| 1213 int depth = 0; | 1205 int depth = 0; |
| 1214 | 1206 |
| 1207 typedef FunctionCallbackArguments FCA; |
| 1215 if (save_at_depth == depth) { | 1208 if (save_at_depth == depth) { |
| 1216 __ sw(reg, MemOperand(sp, kHolderIndex * kPointerSize)); | 1209 __ sw(reg, MemOperand(sp, FCA::kHolderIndex * kPointerSize)); |
| 1217 } | 1210 } |
| 1218 | 1211 |
| 1219 // Check the maps in the prototype chain. | 1212 // Check the maps in the prototype chain. |
| 1220 // Traverse the prototype chain from the object and do map checks. | 1213 // Traverse the prototype chain from the object and do map checks. |
| 1221 Handle<JSObject> current = object; | 1214 Handle<JSObject> current = object; |
| 1222 while (!current.is_identical_to(holder)) { | 1215 while (!current.is_identical_to(holder)) { |
| 1223 ++depth; | 1216 ++depth; |
| 1224 | 1217 |
| 1225 // Only global objects and objects that do not require access | 1218 // Only global objects and objects that do not require access |
| 1226 // checks are allowed in stubs. | 1219 // checks are allowed in stubs. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 // The prototype is in new space; we cannot store a reference to it | 1257 // The prototype is in new space; we cannot store a reference to it |
| 1265 // in the code. Load it from the map. | 1258 // in the code. Load it from the map. |
| 1266 __ lw(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); | 1259 __ lw(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); |
| 1267 } else { | 1260 } else { |
| 1268 // The prototype is in old space; load it directly. | 1261 // The prototype is in old space; load it directly. |
| 1269 __ li(reg, Operand(prototype)); | 1262 __ li(reg, Operand(prototype)); |
| 1270 } | 1263 } |
| 1271 } | 1264 } |
| 1272 | 1265 |
| 1273 if (save_at_depth == depth) { | 1266 if (save_at_depth == depth) { |
| 1274 __ sw(reg, MemOperand(sp, kHolderIndex * kPointerSize)); | 1267 __ sw(reg, MemOperand(sp, FCA::kHolderIndex * kPointerSize)); |
| 1275 } | 1268 } |
| 1276 | 1269 |
| 1277 // Go to the next object in the prototype chain. | 1270 // Go to the next object in the prototype chain. |
| 1278 current = prototype; | 1271 current = prototype; |
| 1279 } | 1272 } |
| 1280 | 1273 |
| 1281 // Log the check depth. | 1274 // Log the check depth. |
| 1282 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); | 1275 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
| 1283 | 1276 |
| 1284 if (!holder.is_identical_to(first) || check == CHECK_ALL_MAPS) { | 1277 if (!holder.is_identical_to(first) || check == CHECK_ALL_MAPS) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1422 GenerateFastApiCall( | 1415 GenerateFastApiCall( |
| 1423 masm(), call_optimization, receiver(), scratch3(), 0, NULL); | 1416 masm(), call_optimization, receiver(), scratch3(), 0, NULL); |
| 1424 } | 1417 } |
| 1425 | 1418 |
| 1426 | 1419 |
| 1427 void BaseLoadStubCompiler::GenerateLoadCallback( | 1420 void BaseLoadStubCompiler::GenerateLoadCallback( |
| 1428 Register reg, | 1421 Register reg, |
| 1429 Handle<ExecutableAccessorInfo> callback) { | 1422 Handle<ExecutableAccessorInfo> callback) { |
| 1430 // Build AccessorInfo::args_ list on the stack and push property name below | 1423 // Build AccessorInfo::args_ list on the stack and push property name below |
| 1431 // the exit frame to make GC aware of them and store pointers to them. | 1424 // the exit frame to make GC aware of them and store pointers to them. |
| 1432 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 0); | 1425 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); |
| 1433 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == -1); | 1426 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); |
| 1434 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == -2); | 1427 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); |
| 1435 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == -3); | 1428 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); |
| 1436 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == -4); | 1429 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); |
| 1437 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == -5); | 1430 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); |
| 1431 STATIC_ASSERT(PropertyCallbackArguments::kArgsLength == 6); |
| 1438 ASSERT(!scratch2().is(reg)); | 1432 ASSERT(!scratch2().is(reg)); |
| 1439 ASSERT(!scratch3().is(reg)); | 1433 ASSERT(!scratch3().is(reg)); |
| 1440 ASSERT(!scratch4().is(reg)); | 1434 ASSERT(!scratch4().is(reg)); |
| 1441 __ push(receiver()); | 1435 __ push(receiver()); |
| 1442 __ mov(scratch2(), sp); // scratch2 = AccessorInfo::args_ | |
| 1443 if (heap()->InNewSpace(callback->data())) { | 1436 if (heap()->InNewSpace(callback->data())) { |
| 1444 __ li(scratch3(), callback); | 1437 __ li(scratch3(), callback); |
| 1445 __ lw(scratch3(), FieldMemOperand(scratch3(), | 1438 __ lw(scratch3(), FieldMemOperand(scratch3(), |
| 1446 ExecutableAccessorInfo::kDataOffset)); | 1439 ExecutableAccessorInfo::kDataOffset)); |
| 1447 } else { | 1440 } else { |
| 1448 __ li(scratch3(), Handle<Object>(callback->data(), isolate())); | 1441 __ li(scratch3(), Handle<Object>(callback->data(), isolate())); |
| 1449 } | 1442 } |
| 1450 __ Subu(sp, sp, 6 * kPointerSize); | 1443 __ Subu(sp, sp, 6 * kPointerSize); |
| 1451 __ sw(scratch3(), MemOperand(sp, 5 * kPointerSize)); | 1444 __ sw(scratch3(), MemOperand(sp, 5 * kPointerSize)); |
| 1452 __ LoadRoot(scratch3(), Heap::kUndefinedValueRootIndex); | 1445 __ LoadRoot(scratch3(), Heap::kUndefinedValueRootIndex); |
| 1453 __ sw(scratch3(), MemOperand(sp, 4 * kPointerSize)); | 1446 __ sw(scratch3(), MemOperand(sp, 4 * kPointerSize)); |
| 1454 __ sw(scratch3(), MemOperand(sp, 3 * kPointerSize)); | 1447 __ sw(scratch3(), MemOperand(sp, 3 * kPointerSize)); |
| 1455 __ li(scratch4(), | 1448 __ li(scratch4(), |
| 1456 Operand(ExternalReference::isolate_address(isolate()))); | 1449 Operand(ExternalReference::isolate_address(isolate()))); |
| 1457 __ sw(scratch4(), MemOperand(sp, 2 * kPointerSize)); | 1450 __ sw(scratch4(), MemOperand(sp, 2 * kPointerSize)); |
| 1458 __ sw(reg, MemOperand(sp, 1 * kPointerSize)); | 1451 __ sw(reg, MemOperand(sp, 1 * kPointerSize)); |
| 1459 __ sw(name(), MemOperand(sp, 0 * kPointerSize)); | 1452 __ sw(name(), MemOperand(sp, 0 * kPointerSize)); |
| 1453 __ Addu(scratch2(), sp, 1 * kPointerSize); |
| 1460 | 1454 |
| 1461 __ mov(a2, scratch2()); // Saved in case scratch2 == a1. | 1455 __ mov(a2, scratch2()); // Saved in case scratch2 == a1. |
| 1462 __ mov(a0, sp); // (first argument - a0) = Handle<Name> | 1456 __ mov(a0, sp); // (first argument - a0) = Handle<Name> |
| 1463 | 1457 |
| 1464 const int kApiStackSpace = 1; | 1458 const int kApiStackSpace = 1; |
| 1465 FrameScope frame_scope(masm(), StackFrame::MANUAL); | 1459 FrameScope frame_scope(masm(), StackFrame::MANUAL); |
| 1466 __ EnterExitFrame(false, kApiStackSpace); | 1460 __ EnterExitFrame(false, kApiStackSpace); |
| 1467 | 1461 |
| 1468 // Create AccessorInfo instance on the stack above the exit frame with | 1462 // Create PropertyAccessorInfo instance on the stack above the exit frame with |
| 1469 // scratch2 (internal::Object** args_) as the data. | 1463 // scratch2 (internal::Object** args_) as the data. |
| 1470 __ sw(a2, MemOperand(sp, kPointerSize)); | 1464 __ sw(a2, MemOperand(sp, kPointerSize)); |
| 1471 // (second argument - a1) = AccessorInfo& | 1465 // (second argument - a1) = AccessorInfo& |
| 1472 __ Addu(a1, sp, kPointerSize); | 1466 __ Addu(a1, sp, kPointerSize); |
| 1473 | 1467 |
| 1474 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; | 1468 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; |
| 1475 Address getter_address = v8::ToCData<Address>(callback->getter()); | 1469 Address getter_address = v8::ToCData<Address>(callback->getter()); |
| 1476 ApiFunction fun(getter_address); | 1470 ApiFunction fun(getter_address); |
| 1477 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; | 1471 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; |
| 1478 ExternalReference ref = ExternalReference(&fun, type, isolate()); | 1472 ExternalReference ref = ExternalReference(&fun, type, isolate()); |
| (...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3208 // ----------------------------------- | 3202 // ----------------------------------- |
| 3209 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3203 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
| 3210 } | 3204 } |
| 3211 | 3205 |
| 3212 | 3206 |
| 3213 #undef __ | 3207 #undef __ |
| 3214 | 3208 |
| 3215 } } // namespace v8::internal | 3209 } } // namespace v8::internal |
| 3216 | 3210 |
| 3217 #endif // V8_TARGET_ARCH_MIPS | 3211 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |