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

Side by Side Diff: src/arm/stub-cache-arm.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/arm/codegen-arm.h ('k') | src/ast.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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 1113
1114 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 1114 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
1115 __ Jump(code, RelocInfo::CODE_TARGET); 1115 __ Jump(code, RelocInfo::CODE_TARGET);
1116 } 1116 }
1117 1117
1118 1118
1119 #undef __ 1119 #undef __
1120 #define __ ACCESS_MASM(masm()) 1120 #define __ ACCESS_MASM(masm())
1121 1121
1122 1122
1123 Register StubCompiler::CheckPrototypes(Handle<Type> type, 1123 Register StubCompiler::CheckPrototypes(Handle<HeapType> type,
1124 Register object_reg, 1124 Register object_reg,
1125 Handle<JSObject> holder, 1125 Handle<JSObject> holder,
1126 Register holder_reg, 1126 Register holder_reg,
1127 Register scratch1, 1127 Register scratch1,
1128 Register scratch2, 1128 Register scratch2,
1129 Handle<Name> name, 1129 Handle<Name> name,
1130 int save_at_depth, 1130 int save_at_depth,
1131 Label* miss, 1131 Label* miss,
1132 PrototypeCheckType check) { 1132 PrototypeCheckType check) {
1133 Handle<Map> receiver_map(IC::TypeToMap(*type, isolate())); 1133 Handle<Map> receiver_map(IC::TypeToMap(*type, isolate()));
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 Label success; 1259 Label success;
1260 __ b(&success); 1260 __ b(&success);
1261 GenerateRestoreName(masm(), miss, name); 1261 GenerateRestoreName(masm(), miss, name);
1262 TailCallBuiltin(masm(), MissBuiltin(kind())); 1262 TailCallBuiltin(masm(), MissBuiltin(kind()));
1263 __ bind(&success); 1263 __ bind(&success);
1264 } 1264 }
1265 } 1265 }
1266 1266
1267 1267
1268 Register LoadStubCompiler::CallbackHandlerFrontend( 1268 Register LoadStubCompiler::CallbackHandlerFrontend(
1269 Handle<Type> type, 1269 Handle<HeapType> type,
1270 Register object_reg, 1270 Register object_reg,
1271 Handle<JSObject> holder, 1271 Handle<JSObject> holder,
1272 Handle<Name> name, 1272 Handle<Name> name,
1273 Handle<Object> callback) { 1273 Handle<Object> callback) {
1274 Label miss; 1274 Label miss;
1275 1275
1276 Register reg = HandlerFrontendHeader(type, object_reg, holder, name, &miss); 1276 Register reg = HandlerFrontendHeader(type, object_reg, holder, name, &miss);
1277 1277
1278 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { 1278 if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) {
1279 ASSERT(!reg.is(scratch2())); 1279 ASSERT(!reg.is(scratch2()));
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2631 2631
2632 // Handle store cache miss. 2632 // Handle store cache miss.
2633 __ bind(&miss); 2633 __ bind(&miss);
2634 TailCallBuiltin(masm(), MissBuiltin(kind())); 2634 TailCallBuiltin(masm(), MissBuiltin(kind()));
2635 2635
2636 // Return the generated code. 2636 // Return the generated code.
2637 return GetCode(kind(), Code::FAST, name); 2637 return GetCode(kind(), Code::FAST, name);
2638 } 2638 }
2639 2639
2640 2640
2641 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<Type> type, 2641 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(Handle<HeapType> type,
2642 Handle<JSObject> last, 2642 Handle<JSObject> last,
2643 Handle<Name> name) { 2643 Handle<Name> name) {
2644 NonexistentHandlerFrontend(type, last, name); 2644 NonexistentHandlerFrontend(type, last, name);
2645 2645
2646 // Return undefined if maps of the full prototype chain are still the 2646 // Return undefined if maps of the full prototype chain are still the
2647 // same and no global property with this name contains a value. 2647 // same and no global property with this name contains a value.
2648 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); 2648 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
2649 __ Ret(); 2649 __ Ret();
2650 2650
2651 // Return the generated code. 2651 // Return the generated code.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
2730 } 2730 }
2731 __ Ret(); 2731 __ Ret();
2732 } 2732 }
2733 2733
2734 2734
2735 #undef __ 2735 #undef __
2736 #define __ ACCESS_MASM(masm()) 2736 #define __ ACCESS_MASM(masm())
2737 2737
2738 2738
2739 Handle<Code> LoadStubCompiler::CompileLoadGlobal( 2739 Handle<Code> LoadStubCompiler::CompileLoadGlobal(
2740 Handle<Type> type, 2740 Handle<HeapType> type,
2741 Handle<GlobalObject> global, 2741 Handle<GlobalObject> global,
2742 Handle<PropertyCell> cell, 2742 Handle<PropertyCell> cell,
2743 Handle<Name> name, 2743 Handle<Name> name,
2744 bool is_dont_delete) { 2744 bool is_dont_delete) {
2745 Label miss; 2745 Label miss;
2746 2746
2747 HandlerFrontendHeader(type, receiver(), global, name, &miss); 2747 HandlerFrontendHeader(type, receiver(), global, name, &miss);
2748 2748
2749 // Get the value from the cell. 2749 // Get the value from the cell.
2750 __ mov(r3, Operand(cell)); 2750 __ mov(r3, Operand(cell));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 Label number_case; 2784 Label number_case;
2785 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 2785 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
2786 __ JumpIfSmi(receiver(), smi_target); 2786 __ JumpIfSmi(receiver(), smi_target);
2787 2787
2788 Register map_reg = scratch1(); 2788 Register map_reg = scratch1();
2789 2789
2790 int receiver_count = types->length(); 2790 int receiver_count = types->length();
2791 int number_of_handled_maps = 0; 2791 int number_of_handled_maps = 0;
2792 __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); 2792 __ ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
2793 for (int current = 0; current < receiver_count; ++current) { 2793 for (int current = 0; current < receiver_count; ++current) {
2794 Handle<Type> type = types->at(current); 2794 Handle<HeapType> type = types->at(current);
2795 Handle<Map> map = IC::TypeToMap(*type, isolate()); 2795 Handle<Map> map = IC::TypeToMap(*type, isolate());
2796 if (!map->is_deprecated()) { 2796 if (!map->is_deprecated()) {
2797 number_of_handled_maps++; 2797 number_of_handled_maps++;
2798 __ mov(ip, Operand(map)); 2798 __ mov(ip, Operand(map));
2799 __ cmp(map_reg, ip); 2799 __ cmp(map_reg, ip);
2800 if (type->Is(Type::Number())) { 2800 if (type->Is(HeapType::Number())) {
2801 ASSERT(!number_case.is_unused()); 2801 ASSERT(!number_case.is_unused());
2802 __ bind(&number_case); 2802 __ bind(&number_case);
2803 } 2803 }
2804 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq); 2804 __ Jump(handlers->at(current), RelocInfo::CODE_TARGET, eq);
2805 } 2805 }
2806 } 2806 }
2807 ASSERT(number_of_handled_maps != 0); 2807 ASSERT(number_of_handled_maps != 0);
2808 2808
2809 __ bind(&miss); 2809 __ bind(&miss);
2810 TailCallBuiltin(masm(), MissBuiltin(kind())); 2810 TailCallBuiltin(masm(), MissBuiltin(kind()));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 // ----------------------------------- 2891 // -----------------------------------
2892 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 2892 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
2893 } 2893 }
2894 2894
2895 2895
2896 #undef __ 2896 #undef __
2897 2897
2898 } } // namespace v8::internal 2898 } } // namespace v8::internal
2899 2899
2900 #endif // V8_TARGET_ARCH_ARM 2900 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.h ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698