OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 code = isolate()->stub_cache()->ComputeLoadNonexistent(name, receiver); | 907 code = isolate()->stub_cache()->ComputeLoadNonexistent(name, receiver); |
908 } else { | 908 } else { |
909 // Compute monomorphic stub. | 909 // Compute monomorphic stub. |
910 Handle<JSObject> holder(lookup->holder()); | 910 Handle<JSObject> holder(lookup->holder()); |
911 switch (lookup->type()) { | 911 switch (lookup->type()) { |
912 case FIELD: | 912 case FIELD: |
913 code = isolate()->stub_cache()->ComputeLoadField( | 913 code = isolate()->stub_cache()->ComputeLoadField( |
914 name, receiver, holder, lookup->GetFieldIndex()); | 914 name, receiver, holder, lookup->GetFieldIndex()); |
915 break; | 915 break; |
916 case CONSTANT_FUNCTION: { | 916 case CONSTANT_FUNCTION: { |
917 Handle<Object> constant(lookup->GetConstantFunction()); | 917 Handle<JSFunction> constant(lookup->GetConstantFunction()); |
918 code = isolate()->stub_cache()->ComputeLoadConstant( | 918 code = isolate()->stub_cache()->ComputeLoadConstant( |
919 name, receiver, holder, constant); | 919 name, receiver, holder, constant); |
920 break; | 920 break; |
921 } | 921 } |
922 case NORMAL: | 922 case NORMAL: |
923 if (holder->IsGlobalObject()) { | 923 if (holder->IsGlobalObject()) { |
924 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder); | 924 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder); |
925 Handle<JSGlobalPropertyCell> cell(global->GetPropertyCell(lookup)); | 925 Handle<JSGlobalPropertyCell> cell(global->GetPropertyCell(lookup)); |
926 code = isolate()->stub_cache()->ComputeLoadGlobal( | 926 code = isolate()->stub_cache()->ComputeLoadGlobal( |
927 name, receiver, global, cell, lookup->IsDontDelete()); | 927 name, receiver, global, cell, lookup->IsDontDelete()); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 code = pre_monomorphic_stub(); | 1156 code = pre_monomorphic_stub(); |
1157 } else { | 1157 } else { |
1158 // Compute a monomorphic stub. | 1158 // Compute a monomorphic stub. |
1159 Handle<JSObject> holder(lookup->holder()); | 1159 Handle<JSObject> holder(lookup->holder()); |
1160 switch (lookup->type()) { | 1160 switch (lookup->type()) { |
1161 case FIELD: | 1161 case FIELD: |
1162 code = isolate()->stub_cache()->ComputeKeyedLoadField( | 1162 code = isolate()->stub_cache()->ComputeKeyedLoadField( |
1163 name, receiver, holder, lookup->GetFieldIndex()); | 1163 name, receiver, holder, lookup->GetFieldIndex()); |
1164 break; | 1164 break; |
1165 case CONSTANT_FUNCTION: { | 1165 case CONSTANT_FUNCTION: { |
1166 Handle<Object> constant(lookup->GetConstantFunction()); | 1166 Handle<JSFunction> constant(lookup->GetConstantFunction()); |
1167 code = isolate()->stub_cache()->ComputeKeyedLoadConstant( | 1167 code = isolate()->stub_cache()->ComputeKeyedLoadConstant( |
1168 name, receiver, holder, constant); | 1168 name, receiver, holder, constant); |
1169 break; | 1169 break; |
1170 } | 1170 } |
1171 case CALLBACKS: { | 1171 case CALLBACKS: { |
1172 Handle<Object> callback_object(lookup->GetCallbackObject()); | 1172 Handle<Object> callback_object(lookup->GetCallbackObject()); |
1173 if (!callback_object->IsAccessorInfo()) return; | 1173 if (!callback_object->IsAccessorInfo()) return; |
1174 Handle<AccessorInfo> callback = | 1174 Handle<AccessorInfo> callback = |
1175 Handle<AccessorInfo>::cast(callback_object); | 1175 Handle<AccessorInfo>::cast(callback_object); |
1176 if (v8::ToCData<Address>(callback->getter()) == 0) return; | 1176 if (v8::ToCData<Address>(callback->getter()) == 0) return; |
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2388 #undef ADDR | 2388 #undef ADDR |
2389 }; | 2389 }; |
2390 | 2390 |
2391 | 2391 |
2392 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2392 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2393 return IC_utilities[id]; | 2393 return IC_utilities[id]; |
2394 } | 2394 } |
2395 | 2395 |
2396 | 2396 |
2397 } } // namespace v8::internal | 2397 } } // namespace v8::internal |
OLD | NEW |