| OLD | NEW |
| 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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 | 829 |
| 830 | 830 |
| 831 // Undoes the effects of ReserveSpaceForFastApiCall. | 831 // Undoes the effects of ReserveSpaceForFastApiCall. |
| 832 static void FreeSpaceForFastApiCall(MacroAssembler* masm) { | 832 static void FreeSpaceForFastApiCall(MacroAssembler* masm) { |
| 833 __ Drop(kFastApiCallArguments); | 833 __ Drop(kFastApiCallArguments); |
| 834 } | 834 } |
| 835 | 835 |
| 836 | 836 |
| 837 static void GenerateFastApiDirectCall(MacroAssembler* masm, | 837 static void GenerateFastApiDirectCall(MacroAssembler* masm, |
| 838 const CallOptimization& optimization, | 838 const CallOptimization& optimization, |
| 839 int argc) { | 839 int argc, |
| 840 bool restore_context) { |
| 840 // ----------- S t a t e ------------- | 841 // ----------- S t a t e ------------- |
| 841 // -- sp[0] : holder (set by CheckPrototypes) | 842 // -- sp[0] : context |
| 842 // -- sp[8] : callee JS function | 843 // -- sp[8] : holder (set by CheckPrototypes) |
| 843 // -- sp[16] : call data | 844 // -- sp[16] : callee JS function |
| 844 // -- sp[24] : isolate | 845 // -- sp[24] : call data |
| 845 // -- sp[32] : ReturnValue default value | 846 // -- sp[32] : isolate |
| 846 // -- sp[40] : ReturnValue | 847 // -- sp[40] : ReturnValue default value |
| 847 // -- sp[48] : last JS argument | 848 // -- sp[48] : ReturnValue |
| 849 // -- sp[56] : last JS argument |
| 848 // -- ... | 850 // -- ... |
| 849 // -- sp[(argc + 5) * 8] : first JS argument | 851 // -- sp[(argc + 6) * 8] : first JS argument |
| 850 // -- sp[(argc + 6) * 8] : receiver | 852 // -- sp[(argc + 7) * 8] : receiver |
| 851 // ----------------------------------- | 853 // ----------------------------------- |
| 854 // Save calling context. |
| 855 __ Poke(cp, 0); |
| 852 // Get the function and setup the context. | 856 // Get the function and setup the context. |
| 853 Handle<JSFunction> function = optimization.constant_function(); | 857 Handle<JSFunction> function = optimization.constant_function(); |
| 854 Register function_reg = x5; | 858 Register function_reg = x5; |
| 855 __ LoadHeapObject(function_reg, function); | 859 __ LoadHeapObject(function_reg, function); |
| 856 __ Ldr(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset)); | 860 __ Ldr(cp, FieldMemOperand(function_reg, JSFunction::kContextOffset)); |
| 861 __ Poke(function_reg, 2 * kPointerSize); |
| 857 | 862 |
| 858 // Pass the additional arguments. | 863 // Pass the additional arguments. |
| 859 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 864 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
| 860 Handle<Object> call_data(api_call_info->data(), masm->isolate()); | 865 Handle<Object> call_data(api_call_info->data(), masm->isolate()); |
| 861 Register call_data_reg = x6; | 866 Register call_data_reg = x6; |
| 862 if (masm->isolate()->heap()->InNewSpace(*call_data)) { | 867 if (masm->isolate()->heap()->InNewSpace(*call_data)) { |
| 863 __ Mov(x0, Operand(api_call_info)); | 868 __ Mov(x0, Operand(api_call_info)); |
| 864 __ Ldr(call_data_reg, FieldMemOperand(x0, CallHandlerInfo::kDataOffset)); | 869 __ Ldr(call_data_reg, FieldMemOperand(x0, CallHandlerInfo::kDataOffset)); |
| 865 } else { | 870 } else { |
| 866 __ Mov(call_data_reg, Operand(call_data)); | 871 __ Mov(call_data_reg, Operand(call_data)); |
| 867 } | 872 } |
| 868 | 873 // Store call data. |
| 874 __ Poke(call_data_reg, 3 * kPointerSize); |
| 875 // Store isolate. |
| 869 Register isolate_reg = x7; | 876 Register isolate_reg = x7; |
| 870 __ Mov(isolate_reg, | 877 __ Mov(isolate_reg, |
| 871 Operand(ExternalReference::isolate_address(masm->isolate()))); | 878 Operand(ExternalReference::isolate_address(masm->isolate()))); |
| 872 | 879 __ Poke(isolate_reg, 4 * kPointerSize); |
| 880 // Store ReturnValue default and ReturnValue. |
| 873 Register undefined_reg = x8; | 881 Register undefined_reg = x8; |
| 874 __ LoadRoot(undefined_reg, Heap::kUndefinedValueRootIndex); | 882 __ LoadRoot(undefined_reg, Heap::kUndefinedValueRootIndex); |
| 875 | 883 __ PokePair(undefined_reg, undefined_reg, 5 * kXRegSizeInBytes); |
| 876 // Store JS function, call data, isolate, ReturnValue default and ReturnValue. | |
| 877 // TODO(jbramley): Try to combine these accesses using stp. | |
| 878 __ Poke(function_reg, 1 * kXRegSizeInBytes); | |
| 879 __ Poke(call_data_reg, 2 * kXRegSizeInBytes); | |
| 880 __ Poke(isolate_reg, 3 * kXRegSizeInBytes); | |
| 881 __ Poke(undefined_reg, 4 * kXRegSizeInBytes); | |
| 882 __ Poke(undefined_reg, 5 * kXRegSizeInBytes); | |
| 883 | 884 |
| 884 Register implicit_args = x2; | 885 Register implicit_args = x2; |
| 885 __ Add(implicit_args, masm->StackPointer(), 5 * kXRegSizeInBytes); | 886 __ Add(implicit_args, masm->StackPointer(), |
| 887 (kFastApiCallArguments - 1) * kXRegSizeInBytes); |
| 886 | 888 |
| 887 FrameScope frame_scope(masm, StackFrame::MANUAL); | 889 FrameScope frame_scope(masm, StackFrame::MANUAL); |
| 888 // Allocate the v8::Arguments structure inside the ExitFrame since it's not | 890 // Allocate the v8::Arguments structure inside the ExitFrame since it's not |
| 889 // controlled by GC. | 891 // controlled by GC. |
| 890 const int kApiArgsStackSpace = 4; | 892 const int kApiArgsStackSpace = 4; |
| 891 __ EnterExitFrame( | 893 __ EnterExitFrame( |
| 892 false, | 894 false, |
| 893 x3, | 895 x3, |
| 894 kApiArgsStackSpace + MacroAssembler::kCallApiFunctionSpillSpace); | 896 kApiArgsStackSpace + MacroAssembler::kCallApiFunctionSpillSpace); |
| 895 | 897 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 923 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 925 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
| 924 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 926 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
| 925 | 927 |
| 926 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); | 928 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback); |
| 927 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; | 929 ExternalReference::Type thunk_type = ExternalReference::PROFILING_API_CALL; |
| 928 ApiFunction thunk_fun(thunk_address); | 930 ApiFunction thunk_fun(thunk_address); |
| 929 ExternalReference thunk_ref = | 931 ExternalReference thunk_ref = |
| 930 ExternalReference(&thunk_fun, thunk_type, masm->isolate()); | 932 ExternalReference(&thunk_fun, thunk_type, masm->isolate()); |
| 931 | 933 |
| 932 AllowExternalCallThatCantCauseGC scope(masm); | 934 AllowExternalCallThatCantCauseGC scope(masm); |
| 935 MemOperand context_restore_operand(fp, 2 * kPointerSize); |
| 936 MemOperand return_value_operand( |
| 937 fp, (kFastApiCallArguments + 1) * kPointerSize); |
| 933 // CallApiFunctionAndReturn can spill registers inside the exit frame, | 938 // CallApiFunctionAndReturn can spill registers inside the exit frame, |
| 934 // after the return address and the v8::Arguments structure. | 939 // after the return address and the v8::Arguments structure. |
| 935 const int spill_offset = 1 + kApiArgsStackSpace; | 940 const int spill_offset = 1 + kApiArgsStackSpace; |
| 936 __ CallApiFunctionAndReturn(ref, | 941 __ CallApiFunctionAndReturn(ref, |
| 937 function_address, | 942 function_address, |
| 938 thunk_ref, | 943 thunk_ref, |
| 939 x1, | 944 x1, |
| 940 kStackUnwindSpace, | 945 kStackUnwindSpace, |
| 941 spill_offset, | 946 spill_offset, |
| 942 kFastApiCallArguments + 1); | 947 return_value_operand, |
| 948 restore_context ? |
| 949 &context_restore_operand : NULL); |
| 943 } | 950 } |
| 944 | 951 |
| 945 | 952 |
| 946 // Generate call to api function. | 953 // Generate call to api function. |
| 947 static void GenerateFastApiCall(MacroAssembler* masm, | 954 static void GenerateFastApiCall(MacroAssembler* masm, |
| 948 const CallOptimization& optimization, | 955 const CallOptimization& optimization, |
| 949 Register receiver, | 956 Register receiver, |
| 950 Register scratch, | 957 Register scratch, |
| 951 int argc, | 958 int argc, |
| 952 Register* values) { | 959 Register* values) { |
| 953 ASSERT(optimization.is_simple_api_call()); | 960 ASSERT(optimization.is_simple_api_call()); |
| 954 ASSERT(!AreAliased(receiver, scratch)); | 961 ASSERT(!AreAliased(receiver, scratch)); |
| 955 | 962 |
| 956 const int stack_space = kFastApiCallArguments + argc + 1; | 963 const int stack_space = kFastApiCallArguments + argc + 1; |
| 964 const int kHolderIndex = kFastApiCallArguments + |
| 965 FunctionCallbackArguments::kHolderIndex - 1; |
| 957 // Assign stack space for the call arguments. | 966 // Assign stack space for the call arguments. |
| 958 __ Claim(stack_space); | 967 __ Claim(stack_space); |
| 959 // Write holder to stack frame. | 968 // Write holder to stack frame. |
| 960 __ Poke(receiver, 0); | 969 __ Poke(receiver, kHolderIndex * kPointerSize); |
| 961 // Write receiver to stack frame. | 970 // Write receiver to stack frame. |
| 962 int index = stack_space - 1; | 971 int index = stack_space - 1; |
| 963 __ Poke(receiver, index * kPointerSize); | 972 __ Poke(receiver, index * kPointerSize); |
| 964 // Write the arguments to stack frame. | 973 // Write the arguments to stack frame. |
| 965 for (int i = 0; i < argc; i++) { | 974 for (int i = 0; i < argc; i++) { |
| 966 // TODO(jbramley): This is broken, but it is broken on ARM too. | 975 // TODO(jbramley): This is broken, but it is broken on ARM too. |
| 967 ASSERT(!AreAliased(receiver, scratch, values[i])); | 976 ASSERT(!AreAliased(receiver, scratch, values[i])); |
| 968 __ Poke(receiver, index-- * kPointerSize); | 977 __ Poke(receiver, index-- * kPointerSize); |
| 969 } | 978 } |
| 970 | 979 |
| 971 GenerateFastApiDirectCall(masm, optimization, argc); | 980 GenerateFastApiDirectCall(masm, optimization, argc, true); |
| 972 } | 981 } |
| 973 | 982 |
| 974 | 983 |
| 975 class CallInterceptorCompiler BASE_EMBEDDED { | 984 class CallInterceptorCompiler BASE_EMBEDDED { |
| 976 public: | 985 public: |
| 977 CallInterceptorCompiler(StubCompiler* stub_compiler, | 986 CallInterceptorCompiler(StubCompiler* stub_compiler, |
| 978 const ParameterCount& arguments, | 987 const ParameterCount& arguments, |
| 979 Register name, | 988 Register name, |
| 980 Code::ExtraICState extra_ic_state) | 989 Code::ExtraICState extra_ic_state) |
| 981 : stub_compiler_(stub_compiler), | 990 : stub_compiler_(stub_compiler), |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 } else { | 1087 } else { |
| 1079 // CheckPrototypes has a side effect of fetching a 'holder' | 1088 // CheckPrototypes has a side effect of fetching a 'holder' |
| 1080 // for API (object which is instanceof for the signature). It's | 1089 // for API (object which is instanceof for the signature). It's |
| 1081 // safe to omit it here, as if present, it should be fetched | 1090 // safe to omit it here, as if present, it should be fetched |
| 1082 // by the previous CheckPrototypes. | 1091 // by the previous CheckPrototypes. |
| 1083 ASSERT(depth2 == kInvalidProtoDepth); | 1092 ASSERT(depth2 == kInvalidProtoDepth); |
| 1084 } | 1093 } |
| 1085 | 1094 |
| 1086 // Invoke function. | 1095 // Invoke function. |
| 1087 if (can_do_fast_api_call) { | 1096 if (can_do_fast_api_call) { |
| 1088 GenerateFastApiDirectCall(masm, optimization, arguments_.immediate()); | 1097 GenerateFastApiDirectCall( |
| 1098 masm, optimization, arguments_.immediate(), false); |
| 1089 } else { | 1099 } else { |
| 1090 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) | 1100 CallKind call_kind = CallICBase::Contextual::decode(extra_ic_state_) |
| 1091 ? CALL_AS_FUNCTION | 1101 ? CALL_AS_FUNCTION |
| 1092 : CALL_AS_METHOD; | 1102 : CALL_AS_METHOD; |
| 1093 Handle<JSFunction> function = optimization.constant_function(); | 1103 Handle<JSFunction> function = optimization.constant_function(); |
| 1094 ParameterCount expected(function); | 1104 ParameterCount expected(function); |
| 1095 __ InvokeFunction(function, expected, arguments_, | 1105 __ InvokeFunction(function, expected, arguments_, |
| 1096 JUMP_FUNCTION, NullCallWrapper(), call_kind); | 1106 JUMP_FUNCTION, NullCallWrapper(), call_kind); |
| 1097 } | 1107 } |
| 1098 | 1108 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 Register StubCompiler::CheckPrototypes(Handle<JSObject> object, | 1189 Register StubCompiler::CheckPrototypes(Handle<JSObject> object, |
| 1180 Register object_reg, | 1190 Register object_reg, |
| 1181 Handle<JSObject> holder, | 1191 Handle<JSObject> holder, |
| 1182 Register holder_reg, | 1192 Register holder_reg, |
| 1183 Register scratch1, | 1193 Register scratch1, |
| 1184 Register scratch2, | 1194 Register scratch2, |
| 1185 Handle<Name> name, | 1195 Handle<Name> name, |
| 1186 int save_at_depth, | 1196 int save_at_depth, |
| 1187 Label* miss, | 1197 Label* miss, |
| 1188 PrototypeCheckType check) { | 1198 PrototypeCheckType check) { |
| 1199 const int kHolderIndex = kFastApiCallArguments + |
| 1200 FunctionCallbackArguments::kHolderIndex - 1; |
| 1189 // Make sure that the type feedback oracle harvests the receiver map. | 1201 // Make sure that the type feedback oracle harvests the receiver map. |
| 1190 // TODO(svenpanne) Remove this hack when all ICs are reworked. | 1202 // TODO(svenpanne) Remove this hack when all ICs are reworked. |
| 1191 __ Mov(scratch1, Operand(Handle<Map>(object->map()))); | 1203 __ Mov(scratch1, Operand(Handle<Map>(object->map()))); |
| 1192 | 1204 |
| 1193 Handle<JSObject> first = object; | 1205 Handle<JSObject> first = object; |
| 1194 | 1206 |
| 1195 // object_reg and holder_reg registers can alias. | 1207 // object_reg and holder_reg registers can alias. |
| 1196 ASSERT(!AreAliased(object_reg, scratch1, scratch2)); | 1208 ASSERT(!AreAliased(object_reg, scratch1, scratch2)); |
| 1197 ASSERT(!AreAliased(holder_reg, scratch1, scratch2)); | 1209 ASSERT(!AreAliased(holder_reg, scratch1, scratch2)); |
| 1198 | 1210 |
| 1199 // Keep track of the current object in register reg. | 1211 // Keep track of the current object in register reg. |
| 1200 Register reg = object_reg; | 1212 Register reg = object_reg; |
| 1201 int depth = 0; | 1213 int depth = 0; |
| 1202 | 1214 |
| 1203 if (save_at_depth == depth) { | 1215 if (save_at_depth == depth) { |
| 1204 __ Poke(reg, 0); | 1216 __ Poke(reg, kHolderIndex * kPointerSize); |
| 1205 } | 1217 } |
| 1206 | 1218 |
| 1207 // Check the maps in the prototype chain. | 1219 // Check the maps in the prototype chain. |
| 1208 // Traverse the prototype chain from the object and do map checks. | 1220 // Traverse the prototype chain from the object and do map checks. |
| 1209 Handle<JSObject> current = object; | 1221 Handle<JSObject> current = object; |
| 1210 while (!current.is_identical_to(holder)) { | 1222 while (!current.is_identical_to(holder)) { |
| 1211 ++depth; | 1223 ++depth; |
| 1212 | 1224 |
| 1213 // Only global objects and objects that do not require access | 1225 // Only global objects and objects that do not require access |
| 1214 // checks are allowed in stubs. | 1226 // checks are allowed in stubs. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 // The prototype is in new space; we cannot store a reference to it | 1265 // The prototype is in new space; we cannot store a reference to it |
| 1254 // in the code. Load it from the map. | 1266 // in the code. Load it from the map. |
| 1255 __ Ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); | 1267 __ Ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); |
| 1256 } else { | 1268 } else { |
| 1257 // The prototype is in old space; load it directly. | 1269 // The prototype is in old space; load it directly. |
| 1258 __ Mov(reg, Operand(prototype)); | 1270 __ Mov(reg, Operand(prototype)); |
| 1259 } | 1271 } |
| 1260 } | 1272 } |
| 1261 | 1273 |
| 1262 if (save_at_depth == depth) { | 1274 if (save_at_depth == depth) { |
| 1263 __ Poke(reg, 0); | 1275 __ Poke(reg, kHolderIndex * kPointerSize); |
| 1264 } | 1276 } |
| 1265 | 1277 |
| 1266 // Go to the next object in the prototype chain. | 1278 // Go to the next object in the prototype chain. |
| 1267 current = prototype; | 1279 current = prototype; |
| 1268 } | 1280 } |
| 1269 | 1281 |
| 1270 // Log the check depth. | 1282 // Log the check depth. |
| 1271 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); | 1283 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
| 1272 | 1284 |
| 1273 // Check the holder map. | 1285 // Check the holder map. |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 | 1494 |
| 1483 // After the call to the API function we need to free memory used for: | 1495 // After the call to the API function we need to free memory used for: |
| 1484 // - the holder | 1496 // - the holder |
| 1485 // - the callback data | 1497 // - the callback data |
| 1486 // - the isolate | 1498 // - the isolate |
| 1487 // - the property name | 1499 // - the property name |
| 1488 // - the receiver. | 1500 // - the receiver. |
| 1489 // | 1501 // |
| 1490 // The memory allocated inside the ExitFrame will be freed when we'll leave | 1502 // The memory allocated inside the ExitFrame will be freed when we'll leave |
| 1491 // the ExitFrame in CallApiFunctionAndReturn. | 1503 // the ExitFrame in CallApiFunctionAndReturn. |
| 1492 const int kStackUnwindSpace = kFastApiCallArguments + 1; | 1504 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; |
| 1493 | 1505 |
| 1494 // Do the API call. | 1506 // Do the API call. |
| 1495 Address getter_address = v8::ToCData<Address>(callback->getter()); | 1507 Address getter_address = v8::ToCData<Address>(callback->getter()); |
| 1496 | 1508 |
| 1497 ApiFunction fun(getter_address); | 1509 ApiFunction fun(getter_address); |
| 1498 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; | 1510 ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; |
| 1499 ExternalReference ref = ExternalReference(&fun, type, isolate()); | 1511 ExternalReference ref = ExternalReference(&fun, type, isolate()); |
| 1500 | 1512 |
| 1501 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback); | 1513 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback); |
| 1502 ExternalReference::Type thunk_type = ExternalReference::PROFILING_GETTER_CALL; | 1514 ExternalReference::Type thunk_type = ExternalReference::PROFILING_GETTER_CALL; |
| 1503 ApiFunction thunk_fun(thunk_address); | 1515 ApiFunction thunk_fun(thunk_address); |
| 1504 ExternalReference thunk_ref = | 1516 ExternalReference thunk_ref = |
| 1505 ExternalReference(&thunk_fun, thunk_type, isolate()); | 1517 ExternalReference(&thunk_fun, thunk_type, isolate()); |
| 1506 | 1518 |
| 1507 // TODO(jbramley): I don't know where '6' comes from, but this goes away at | 1519 // TODO(jbramley): I don't know where '6' comes from, but this goes away at |
| 1508 // some point. | 1520 // some point. |
| 1509 __ CallApiFunctionAndReturn(ref, | 1521 __ CallApiFunctionAndReturn(ref, |
| 1510 getter_address, | 1522 getter_address, |
| 1511 thunk_ref, | 1523 thunk_ref, |
| 1512 x2, | 1524 x2, |
| 1513 kStackUnwindSpace, | 1525 kStackUnwindSpace, |
| 1514 spill_offset, | 1526 spill_offset, |
| 1515 6); | 1527 MemOperand(fp, 6 * kPointerSize), |
| 1528 NULL); |
| 1516 } | 1529 } |
| 1517 | 1530 |
| 1518 | 1531 |
| 1519 void BaseLoadStubCompiler::GenerateLoadInterceptor( | 1532 void BaseLoadStubCompiler::GenerateLoadInterceptor( |
| 1520 Register holder_reg, | 1533 Register holder_reg, |
| 1521 Handle<JSObject> object, | 1534 Handle<JSObject> object, |
| 1522 Handle<JSObject> interceptor_holder, | 1535 Handle<JSObject> interceptor_holder, |
| 1523 LookupResult* lookup, | 1536 LookupResult* lookup, |
| 1524 Handle<Name> name) { | 1537 Handle<Name> name) { |
| 1525 ASSERT(!AreAliased(receiver(), this->name(), | 1538 ASSERT(!AreAliased(receiver(), this->name(), |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2605 | 2618 |
| 2606 __ IncrementCounter(counters->call_const(), 1, x0, x3); | 2619 __ IncrementCounter(counters->call_const(), 1, x0, x3); |
| 2607 __ IncrementCounter(counters->call_const_fast_api(), 1, x0, x3); | 2620 __ IncrementCounter(counters->call_const_fast_api(), 1, x0, x3); |
| 2608 | 2621 |
| 2609 ReserveSpaceForFastApiCall(masm(), x0); | 2622 ReserveSpaceForFastApiCall(masm(), x0); |
| 2610 | 2623 |
| 2611 // Check that the maps haven't changed and find a Holder as a side effect. | 2624 // Check that the maps haven't changed and find a Holder as a side effect. |
| 2612 CheckPrototypes(Handle<JSObject>::cast(object), receiver, holder, x0, x3, x4, | 2625 CheckPrototypes(Handle<JSObject>::cast(object), receiver, holder, x0, x3, x4, |
| 2613 name, depth, &miss); | 2626 name, depth, &miss); |
| 2614 | 2627 |
| 2615 GenerateFastApiDirectCall(masm(), optimization, argc); | 2628 GenerateFastApiDirectCall(masm(), optimization, argc, false); |
| 2616 | 2629 |
| 2617 __ Bind(&miss); | 2630 __ Bind(&miss); |
| 2618 FreeSpaceForFastApiCall(masm()); | 2631 FreeSpaceForFastApiCall(masm()); |
| 2619 | 2632 |
| 2620 __ Bind(&miss_before_stack_reserved); | 2633 __ Bind(&miss_before_stack_reserved); |
| 2621 GenerateMissBranch(); | 2634 GenerateMissBranch(); |
| 2622 | 2635 |
| 2623 // Return the generated code. | 2636 // Return the generated code. |
| 2624 return GetCode(function); | 2637 return GetCode(function); |
| 2625 } | 2638 } |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3253 | 3266 |
| 3254 // Miss case, call the runtime. | 3267 // Miss case, call the runtime. |
| 3255 __ Bind(&miss_force_generic); | 3268 __ Bind(&miss_force_generic); |
| 3256 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); | 3269 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); |
| 3257 } | 3270 } |
| 3258 | 3271 |
| 3259 | 3272 |
| 3260 } } // namespace v8::internal | 3273 } } // namespace v8::internal |
| 3261 | 3274 |
| 3262 #endif // V8_TARGET_ARCH_A64 | 3275 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |