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

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

Issue 102563004: Zonify types in compiler frontend (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years 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 | « src/hydrogen.cc ('k') | src/ic.h » ('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 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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 1176
1177 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 1177 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
1178 __ jmp(code, RelocInfo::CODE_TARGET); 1178 __ jmp(code, RelocInfo::CODE_TARGET);
1179 } 1179 }
1180 1180
1181 1181
1182 #undef __ 1182 #undef __
1183 #define __ ACCESS_MASM(masm()) 1183 #define __ ACCESS_MASM(masm())
1184 1184
1185 1185
1186 Register StubCompiler::CheckPrototypes(Handle<Type> type, 1186 Register StubCompiler::CheckPrototypes(Handle<HeapType> type,
1187 Register object_reg, 1187 Register object_reg,
1188 Handle<JSObject> holder, 1188 Handle<JSObject> holder,
1189 Register holder_reg, 1189 Register holder_reg,
1190 Register scratch1, 1190 Register scratch1,
1191 Register scratch2, 1191 Register scratch2,
1192 Handle<Name> name, 1192 Handle<Name> name,
1193 int save_at_depth, 1193 int save_at_depth,
1194 Label* miss, 1194 Label* miss,
1195 PrototypeCheckType check) { 1195 PrototypeCheckType check) {
1196 Handle<Map> receiver_map(IC::TypeToMap(*type, isolate())); 1196 Handle<Map> receiver_map(IC::TypeToMap(*type, isolate()));
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 Label success; 1324 Label success;
1325 __ jmp(&success); 1325 __ jmp(&success);
1326 GenerateRestoreName(masm(), miss, name); 1326 GenerateRestoreName(masm(), miss, name);
1327 TailCallBuiltin(masm(), MissBuiltin(kind())); 1327 TailCallBuiltin(masm(), MissBuiltin(kind()));
1328 __ bind(&success); 1328 __ bind(&success);
1329 } 1329 }
1330 } 1330 }
1331 1331
1332 1332
1333 Register LoadStubCompiler::CallbackHandlerFrontend( 1333 Register LoadStubCompiler::CallbackHandlerFrontend(
1334 Handle<Type> type, 1334 Handle<HeapType> type,
1335 Register object_reg, 1335 Register object_reg,
1336 Handle<JSObject> holder, 1336 Handle<JSObject> holder,
1337 Handle<Name> name, 1337 Handle<Name> name,
1338 Handle<Object> callback) { 1338 Handle<Object> callback) {
1339 Label miss; 1339 Label miss;
1340 1340
1341 Register reg = HandlerFrontendHeader(type, object_reg, holder, name, &miss); 1341 Register reg = HandlerFrontendHeader(type, object_reg, holder, name, &miss);
1342 1342
1343 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { 1343 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) {
1344 ASSERT(!reg.is(scratch2())); 1344 ASSERT(!reg.is(scratch2()));
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 } 2764 }
2765 __ bind(&miss); 2765 __ bind(&miss);
2766 TailCallBuiltin(masm(), MissBuiltin(kind())); 2766 TailCallBuiltin(masm(), MissBuiltin(kind()));
2767 2767
2768 // Return the generated code. 2768 // Return the generated code.
2769 return GetICCode( 2769 return GetICCode(
2770 kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); 2770 kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC);
2771 } 2771 }
2772 2772
2773 2773
2774 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<Type> type, 2774 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
2775 Handle<JSObject> last, 2775 Handle<JSObject> last,
2776 Handle<Name> name) { 2776 Handle<Name> name) {
2777 NonexistentHandlerFrontend(type, last, name); 2777 NonexistentHandlerFrontend(type, last, name);
2778 2778
2779 // Return undefined if maps of the full prototype chain are still the 2779 // Return undefined if maps of the full prototype chain are still the
2780 // same and no global property with this name contains a value. 2780 // same and no global property with this name contains a value.
2781 __ mov(eax, isolate()->factory()->undefined_value()); 2781 __ mov(eax, isolate()->factory()->undefined_value());
2782 __ ret(0); 2782 __ ret(0);
2783 2783
2784 // Return the generated code. 2784 // Return the generated code.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2858 } 2858 }
2859 __ ret(0); 2859 __ ret(0);
2860 } 2860 }
2861 2861
2862 2862
2863 #undef __ 2863 #undef __
2864 #define __ ACCESS_MASM(masm()) 2864 #define __ ACCESS_MASM(masm())
2865 2865
2866 2866
2867 Handle<Code> LoadStubCompiler::CompileLoadGlobal( 2867 Handle<Code> LoadStubCompiler::CompileLoadGlobal(
2868 Handle<Type> type, 2868 Handle<HeapType> type,
2869 Handle<GlobalObject> global, 2869 Handle<GlobalObject> global,
2870 Handle<PropertyCell> cell, 2870 Handle<PropertyCell> cell,
2871 Handle<Name> name, 2871 Handle<Name> name,
2872 bool is_dont_delete) { 2872 bool is_dont_delete) {
2873 Label miss; 2873 Label miss;
2874 2874
2875 HandlerFrontendHeader(type, receiver(), global, name, &miss); 2875 HandlerFrontendHeader(type, receiver(), global, name, &miss);
2876 // Get the value from the cell. 2876 // Get the value from the cell.
2877 if (Serializer::enabled()) { 2877 if (Serializer::enabled()) {
2878 __ mov(eax, Immediate(cell)); 2878 __ mov(eax, Immediate(cell));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2916 2916
2917 Label number_case; 2917 Label number_case;
2918 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 2918 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
2919 __ JumpIfSmi(receiver(), smi_target); 2919 __ JumpIfSmi(receiver(), smi_target);
2920 2920
2921 Register map_reg = scratch1(); 2921 Register map_reg = scratch1();
2922 __ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); 2922 __ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
2923 int receiver_count = types->length(); 2923 int receiver_count = types->length();
2924 int number_of_handled_maps = 0; 2924 int number_of_handled_maps = 0;
2925 for (int current = 0; current < receiver_count; ++current) { 2925 for (int current = 0; current < receiver_count; ++current) {
2926 Handle<Type> type = types->at(current); 2926 Handle<HeapType> type = types->at(current);
2927 Handle<Map> map = IC::TypeToMap(*type, isolate()); 2927 Handle<Map> map = IC::TypeToMap(*type, isolate());
2928 if (!map->is_deprecated()) { 2928 if (!map->is_deprecated()) {
2929 number_of_handled_maps++; 2929 number_of_handled_maps++;
2930 __ cmp(map_reg, map); 2930 __ cmp(map_reg, map);
2931 if (type->Is(Type::Number())) { 2931 if (type->Is(HeapType::Number())) {
2932 ASSERT(!number_case.is_unused()); 2932 ASSERT(!number_case.is_unused());
2933 __ bind(&number_case); 2933 __ bind(&number_case);
2934 } 2934 }
2935 __ j(equal, handlers->at(current)); 2935 __ j(equal, handlers->at(current));
2936 } 2936 }
2937 } 2937 }
2938 ASSERT(number_of_handled_maps != 0); 2938 ASSERT(number_of_handled_maps != 0);
2939 2939
2940 __ bind(&miss); 2940 __ bind(&miss);
2941 TailCallBuiltin(masm(), MissBuiltin(kind())); 2941 TailCallBuiltin(masm(), MissBuiltin(kind()));
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2993 // ----------------------------------- 2993 // -----------------------------------
2994 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2994 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2995 } 2995 }
2996 2996
2997 2997
2998 #undef __ 2998 #undef __
2999 2999
3000 } } // namespace v8::internal 3000 } } // namespace v8::internal
3001 3001
3002 #endif // V8_TARGET_ARCH_IA32 3002 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698