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

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

Issue 17064002: Refactor only: Rename JSGlobaPropertyCell to PropertyCell (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months 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/mips/macro-assembler-mips.cc ('k') | src/objects.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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 414
415 // Generate code to check that a global property cell is empty. Create 415 // Generate code to check that a global property cell is empty. Create
416 // the property cell at compilation time if no cell exists for the 416 // the property cell at compilation time if no cell exists for the
417 // property. 417 // property.
418 static void GenerateCheckPropertyCell(MacroAssembler* masm, 418 static void GenerateCheckPropertyCell(MacroAssembler* masm,
419 Handle<GlobalObject> global, 419 Handle<GlobalObject> global,
420 Handle<Name> name, 420 Handle<Name> name,
421 Register scratch, 421 Register scratch,
422 Label* miss) { 422 Label* miss) {
423 Handle<JSGlobalPropertyCell> cell = 423 Handle<PropertyCell> cell =
424 GlobalObject::EnsurePropertyCell(global, name); 424 GlobalObject::EnsurePropertyCell(global, name);
425 ASSERT(cell->value()->IsTheHole()); 425 ASSERT(cell->value()->IsTheHole());
426 __ li(scratch, Operand(cell)); 426 __ li(scratch, Operand(cell));
427 __ lw(scratch, 427 __ lw(scratch,
428 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); 428 FieldMemOperand(scratch, PropertyCell::kValueOffset));
429 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 429 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
430 __ Branch(miss, ne, scratch, Operand(at)); 430 __ Branch(miss, ne, scratch, Operand(at));
431 } 431 }
432 432
433 433
434 // Generate StoreTransition code, value is passed in a0 register. 434 // Generate StoreTransition code, value is passed in a0 register.
435 // After executing generated code, the receiver_reg and name_reg 435 // After executing generated code, the receiver_reg and name_reg
436 // may be clobbered. 436 // may be clobbered.
437 void StubCompiler::GenerateStoreTransition(MacroAssembler* masm, 437 void StubCompiler::GenerateStoreTransition(MacroAssembler* masm,
438 Handle<JSObject> object, 438 Handle<JSObject> object,
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 // Get the receiver from the stack. 1593 // Get the receiver from the stack.
1594 __ lw(a0, MemOperand(sp, argc * kPointerSize)); 1594 __ lw(a0, MemOperand(sp, argc * kPointerSize));
1595 1595
1596 // Check that the maps haven't changed. 1596 // Check that the maps haven't changed.
1597 __ JumpIfSmi(a0, miss); 1597 __ JumpIfSmi(a0, miss);
1598 CheckPrototypes(object, a0, holder, a3, a1, t0, name, miss); 1598 CheckPrototypes(object, a0, holder, a3, a1, t0, name, miss);
1599 } 1599 }
1600 1600
1601 1601
1602 void CallStubCompiler::GenerateLoadFunctionFromCell( 1602 void CallStubCompiler::GenerateLoadFunctionFromCell(
1603 Handle<JSGlobalPropertyCell> cell, 1603 Handle<PropertyCell> cell,
1604 Handle<JSFunction> function, 1604 Handle<JSFunction> function,
1605 Label* miss) { 1605 Label* miss) {
1606 // Get the value from the cell. 1606 // Get the value from the cell.
1607 __ li(a3, Operand(cell)); 1607 __ li(a3, Operand(cell));
1608 __ lw(a1, FieldMemOperand(a3, JSGlobalPropertyCell::kValueOffset)); 1608 __ lw(a1, FieldMemOperand(a3, PropertyCell::kValueOffset));
1609 1609
1610 // Check that the cell contains the same function. 1610 // Check that the cell contains the same function.
1611 if (heap()->InNewSpace(*function)) { 1611 if (heap()->InNewSpace(*function)) {
1612 // We can't embed a pointer to a function in new space so we have 1612 // We can't embed a pointer to a function in new space so we have
1613 // to verify that the shared function info is unchanged. This has 1613 // to verify that the shared function info is unchanged. This has
1614 // the nice side effect that multiple closures based on the same 1614 // the nice side effect that multiple closures based on the same
1615 // function can all use this call IC. Before we load through the 1615 // function can all use this call IC. Before we load through the
1616 // function, we have to verify that it still is a function. 1616 // function, we have to verify that it still is a function.
1617 __ JumpIfSmi(a1, miss); 1617 __ JumpIfSmi(a1, miss);
1618 __ GetObjectType(a1, a3, a3); 1618 __ GetObjectType(a1, a3, a3);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 GenerateMissBranch(); 1668 GenerateMissBranch();
1669 1669
1670 // Return the generated code. 1670 // Return the generated code.
1671 return GetCode(Code::FIELD, name); 1671 return GetCode(Code::FIELD, name);
1672 } 1672 }
1673 1673
1674 1674
1675 Handle<Code> CallStubCompiler::CompileArrayPushCall( 1675 Handle<Code> CallStubCompiler::CompileArrayPushCall(
1676 Handle<Object> object, 1676 Handle<Object> object,
1677 Handle<JSObject> holder, 1677 Handle<JSObject> holder,
1678 Handle<JSGlobalPropertyCell> cell, 1678 Handle<PropertyCell> cell,
1679 Handle<JSFunction> function, 1679 Handle<JSFunction> function,
1680 Handle<String> name) { 1680 Handle<String> name) {
1681 // ----------- S t a t e ------------- 1681 // ----------- S t a t e -------------
1682 // -- a2 : name 1682 // -- a2 : name
1683 // -- ra : return address 1683 // -- ra : return address
1684 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based) 1684 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based)
1685 // -- ... 1685 // -- ...
1686 // -- sp[argc * 4] : receiver 1686 // -- sp[argc * 4] : receiver
1687 // ----------------------------------- 1687 // -----------------------------------
1688 1688
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 GenerateMissBranch(); 1922 GenerateMissBranch();
1923 1923
1924 // Return the generated code. 1924 // Return the generated code.
1925 return GetCode(function); 1925 return GetCode(function);
1926 } 1926 }
1927 1927
1928 1928
1929 Handle<Code> CallStubCompiler::CompileArrayPopCall( 1929 Handle<Code> CallStubCompiler::CompileArrayPopCall(
1930 Handle<Object> object, 1930 Handle<Object> object,
1931 Handle<JSObject> holder, 1931 Handle<JSObject> holder,
1932 Handle<JSGlobalPropertyCell> cell, 1932 Handle<PropertyCell> cell,
1933 Handle<JSFunction> function, 1933 Handle<JSFunction> function,
1934 Handle<String> name) { 1934 Handle<String> name) {
1935 // ----------- S t a t e ------------- 1935 // ----------- S t a t e -------------
1936 // -- a2 : name 1936 // -- a2 : name
1937 // -- ra : return address 1937 // -- ra : return address
1938 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based) 1938 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based)
1939 // -- ... 1939 // -- ...
1940 // -- sp[argc * 4] : receiver 1940 // -- sp[argc * 4] : receiver
1941 // ----------------------------------- 1941 // -----------------------------------
1942 1942
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2004 GenerateMissBranch(); 2004 GenerateMissBranch();
2005 2005
2006 // Return the generated code. 2006 // Return the generated code.
2007 return GetCode(function); 2007 return GetCode(function);
2008 } 2008 }
2009 2009
2010 2010
2011 Handle<Code> CallStubCompiler::CompileStringCharCodeAtCall( 2011 Handle<Code> CallStubCompiler::CompileStringCharCodeAtCall(
2012 Handle<Object> object, 2012 Handle<Object> object,
2013 Handle<JSObject> holder, 2013 Handle<JSObject> holder,
2014 Handle<JSGlobalPropertyCell> cell, 2014 Handle<PropertyCell> cell,
2015 Handle<JSFunction> function, 2015 Handle<JSFunction> function,
2016 Handle<String> name) { 2016 Handle<String> name) {
2017 // ----------- S t a t e ------------- 2017 // ----------- S t a t e -------------
2018 // -- a2 : function name 2018 // -- a2 : function name
2019 // -- ra : return address 2019 // -- ra : return address
2020 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based) 2020 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based)
2021 // -- ... 2021 // -- ...
2022 // -- sp[argc * 4] : receiver 2022 // -- sp[argc * 4] : receiver
2023 // ----------------------------------- 2023 // -----------------------------------
2024 2024
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2086 GenerateMissBranch(); 2086 GenerateMissBranch();
2087 2087
2088 // Return the generated code. 2088 // Return the generated code.
2089 return GetCode(function); 2089 return GetCode(function);
2090 } 2090 }
2091 2091
2092 2092
2093 Handle<Code> CallStubCompiler::CompileStringCharAtCall( 2093 Handle<Code> CallStubCompiler::CompileStringCharAtCall(
2094 Handle<Object> object, 2094 Handle<Object> object,
2095 Handle<JSObject> holder, 2095 Handle<JSObject> holder,
2096 Handle<JSGlobalPropertyCell> cell, 2096 Handle<PropertyCell> cell,
2097 Handle<JSFunction> function, 2097 Handle<JSFunction> function,
2098 Handle<String> name) { 2098 Handle<String> name) {
2099 // ----------- S t a t e ------------- 2099 // ----------- S t a t e -------------
2100 // -- a2 : function name 2100 // -- a2 : function name
2101 // -- ra : return address 2101 // -- ra : return address
2102 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based) 2102 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based)
2103 // -- ... 2103 // -- ...
2104 // -- sp[argc * 4] : receiver 2104 // -- sp[argc * 4] : receiver
2105 // ----------------------------------- 2105 // -----------------------------------
2106 2106
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 GenerateMissBranch(); 2167 GenerateMissBranch();
2168 2168
2169 // Return the generated code. 2169 // Return the generated code.
2170 return GetCode(function); 2170 return GetCode(function);
2171 } 2171 }
2172 2172
2173 2173
2174 Handle<Code> CallStubCompiler::CompileStringFromCharCodeCall( 2174 Handle<Code> CallStubCompiler::CompileStringFromCharCodeCall(
2175 Handle<Object> object, 2175 Handle<Object> object,
2176 Handle<JSObject> holder, 2176 Handle<JSObject> holder,
2177 Handle<JSGlobalPropertyCell> cell, 2177 Handle<PropertyCell> cell,
2178 Handle<JSFunction> function, 2178 Handle<JSFunction> function,
2179 Handle<String> name) { 2179 Handle<String> name) {
2180 // ----------- S t a t e ------------- 2180 // ----------- S t a t e -------------
2181 // -- a2 : function name 2181 // -- a2 : function name
2182 // -- ra : return address 2182 // -- ra : return address
2183 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based) 2183 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based)
2184 // -- ... 2184 // -- ...
2185 // -- sp[argc * 4] : receiver 2185 // -- sp[argc * 4] : receiver
2186 // ----------------------------------- 2186 // -----------------------------------
2187 2187
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
2240 GenerateMissBranch(); 2240 GenerateMissBranch();
2241 2241
2242 // Return the generated code. 2242 // Return the generated code.
2243 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); 2243 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name);
2244 } 2244 }
2245 2245
2246 2246
2247 Handle<Code> CallStubCompiler::CompileMathFloorCall( 2247 Handle<Code> CallStubCompiler::CompileMathFloorCall(
2248 Handle<Object> object, 2248 Handle<Object> object,
2249 Handle<JSObject> holder, 2249 Handle<JSObject> holder,
2250 Handle<JSGlobalPropertyCell> cell, 2250 Handle<PropertyCell> cell,
2251 Handle<JSFunction> function, 2251 Handle<JSFunction> function,
2252 Handle<String> name) { 2252 Handle<String> name) {
2253 // ----------- S t a t e ------------- 2253 // ----------- S t a t e -------------
2254 // -- a2 : function name 2254 // -- a2 : function name
2255 // -- ra : return address 2255 // -- ra : return address
2256 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based) 2256 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based)
2257 // -- ... 2257 // -- ...
2258 // -- sp[argc * 4] : receiver 2258 // -- sp[argc * 4] : receiver
2259 // ----------------------------------- 2259 // -----------------------------------
2260 2260
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2369 GenerateMissBranch(); 2369 GenerateMissBranch();
2370 2370
2371 // Return the generated code. 2371 // Return the generated code.
2372 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); 2372 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name);
2373 } 2373 }
2374 2374
2375 2375
2376 Handle<Code> CallStubCompiler::CompileMathAbsCall( 2376 Handle<Code> CallStubCompiler::CompileMathAbsCall(
2377 Handle<Object> object, 2377 Handle<Object> object,
2378 Handle<JSObject> holder, 2378 Handle<JSObject> holder,
2379 Handle<JSGlobalPropertyCell> cell, 2379 Handle<PropertyCell> cell,
2380 Handle<JSFunction> function, 2380 Handle<JSFunction> function,
2381 Handle<String> name) { 2381 Handle<String> name) {
2382 // ----------- S t a t e ------------- 2382 // ----------- S t a t e -------------
2383 // -- a2 : function name 2383 // -- a2 : function name
2384 // -- ra : return address 2384 // -- ra : return address
2385 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based) 2385 // -- sp[(argc - n - 1) * 4] : arg[n] (zero-based)
2386 // -- ... 2386 // -- ...
2387 // -- sp[argc * 4] : receiver 2387 // -- sp[argc * 4] : receiver
2388 // ----------------------------------- 2388 // -----------------------------------
2389 2389
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
2469 2469
2470 // Return the generated code. 2470 // Return the generated code.
2471 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name); 2471 return cell.is_null() ? GetCode(function) : GetCode(Code::NORMAL, name);
2472 } 2472 }
2473 2473
2474 2474
2475 Handle<Code> CallStubCompiler::CompileFastApiCall( 2475 Handle<Code> CallStubCompiler::CompileFastApiCall(
2476 const CallOptimization& optimization, 2476 const CallOptimization& optimization,
2477 Handle<Object> object, 2477 Handle<Object> object,
2478 Handle<JSObject> holder, 2478 Handle<JSObject> holder,
2479 Handle<JSGlobalPropertyCell> cell, 2479 Handle<PropertyCell> cell,
2480 Handle<JSFunction> function, 2480 Handle<JSFunction> function,
2481 Handle<String> name) { 2481 Handle<String> name) {
2482 2482
2483 Counters* counters = isolate()->counters(); 2483 Counters* counters = isolate()->counters();
2484 2484
2485 ASSERT(optimization.is_simple_api_call()); 2485 ASSERT(optimization.is_simple_api_call());
2486 // Bail out if object is a global object as we don't want to 2486 // Bail out if object is a global object as we don't want to
2487 // repatch it to global receiver. 2487 // repatch it to global receiver.
2488 if (object->IsGlobalObject()) return Handle<Code>::null(); 2488 if (object->IsGlobalObject()) return Handle<Code>::null();
2489 if (!cell.is_null()) return Handle<Code>::null(); 2489 if (!cell.is_null()) return Handle<Code>::null();
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2642 2642
2643 2643
2644 Handle<Code> CallStubCompiler::CompileCallConstant( 2644 Handle<Code> CallStubCompiler::CompileCallConstant(
2645 Handle<Object> object, 2645 Handle<Object> object,
2646 Handle<JSObject> holder, 2646 Handle<JSObject> holder,
2647 Handle<Name> name, 2647 Handle<Name> name,
2648 CheckType check, 2648 CheckType check,
2649 Handle<JSFunction> function) { 2649 Handle<JSFunction> function) {
2650 if (HasCustomCallGenerator(function)) { 2650 if (HasCustomCallGenerator(function)) {
2651 Handle<Code> code = CompileCustomCall(object, holder, 2651 Handle<Code> code = CompileCustomCall(object, holder,
2652 Handle<JSGlobalPropertyCell>::null(), 2652 Handle<PropertyCell>::null(),
2653 function, Handle<String>::cast(name)); 2653 function, Handle<String>::cast(name));
2654 // A null handle means bail out to the regular compiler code below. 2654 // A null handle means bail out to the regular compiler code below.
2655 if (!code.is_null()) return code; 2655 if (!code.is_null()) return code;
2656 } 2656 }
2657 2657
2658 Label success; 2658 Label success;
2659 2659
2660 CompileHandlerFrontend(object, holder, name, check, &success); 2660 CompileHandlerFrontend(object, holder, name, check, &success);
2661 __ bind(&success); 2661 __ bind(&success);
2662 CompileHandlerBackend(function); 2662 CompileHandlerBackend(function);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2702 GenerateMissBranch(); 2702 GenerateMissBranch();
2703 2703
2704 // Return the generated code. 2704 // Return the generated code.
2705 return GetCode(Code::INTERCEPTOR, name); 2705 return GetCode(Code::INTERCEPTOR, name);
2706 } 2706 }
2707 2707
2708 2708
2709 Handle<Code> CallStubCompiler::CompileCallGlobal( 2709 Handle<Code> CallStubCompiler::CompileCallGlobal(
2710 Handle<JSObject> object, 2710 Handle<JSObject> object,
2711 Handle<GlobalObject> holder, 2711 Handle<GlobalObject> holder,
2712 Handle<JSGlobalPropertyCell> cell, 2712 Handle<PropertyCell> cell,
2713 Handle<JSFunction> function, 2713 Handle<JSFunction> function,
2714 Handle<Name> name) { 2714 Handle<Name> name) {
2715 // ----------- S t a t e ------------- 2715 // ----------- S t a t e -------------
2716 // -- a2 : name 2716 // -- a2 : name
2717 // -- ra : return address 2717 // -- ra : return address
2718 // ----------------------------------- 2718 // -----------------------------------
2719 2719
2720 if (HasCustomCallGenerator(function)) { 2720 if (HasCustomCallGenerator(function)) {
2721 Handle<Code> code = CompileCustomCall( 2721 Handle<Code> code = CompileCustomCall(
2722 object, holder, cell, function, Handle<String>::cast(name)); 2722 object, holder, cell, function, Handle<String>::cast(name));
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2878 __ bind(&miss); 2878 __ bind(&miss);
2879 TailCallBuiltin(masm(), MissBuiltin(kind())); 2879 TailCallBuiltin(masm(), MissBuiltin(kind()));
2880 2880
2881 // Return the generated code. 2881 // Return the generated code.
2882 return GetICCode(kind(), Code::INTERCEPTOR, name); 2882 return GetICCode(kind(), Code::INTERCEPTOR, name);
2883 } 2883 }
2884 2884
2885 2885
2886 Handle<Code> StoreStubCompiler::CompileStoreGlobal( 2886 Handle<Code> StoreStubCompiler::CompileStoreGlobal(
2887 Handle<GlobalObject> object, 2887 Handle<GlobalObject> object,
2888 Handle<JSGlobalPropertyCell> cell, 2888 Handle<PropertyCell> cell,
2889 Handle<Name> name) { 2889 Handle<Name> name) {
2890 Label miss; 2890 Label miss;
2891 2891
2892 // Check that the map of the global has not changed. 2892 // Check that the map of the global has not changed.
2893 __ lw(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); 2893 __ lw(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset));
2894 __ Branch(&miss, ne, scratch1(), Operand(Handle<Map>(object->map()))); 2894 __ Branch(&miss, ne, scratch1(), Operand(Handle<Map>(object->map())));
2895 2895
2896 // Check that the value in the cell is not the hole. If it is, this 2896 // Check that the value in the cell is not the hole. If it is, this
2897 // cell could have been deleted and reintroducing the global needs 2897 // cell could have been deleted and reintroducing the global needs
2898 // to update the property details in the property dictionary of the 2898 // to update the property details in the property dictionary of the
2899 // global object. We bail out to the runtime system to do that. 2899 // global object. We bail out to the runtime system to do that.
2900 __ li(scratch1(), Operand(cell)); 2900 __ li(scratch1(), Operand(cell));
2901 __ LoadRoot(scratch2(), Heap::kTheHoleValueRootIndex); 2901 __ LoadRoot(scratch2(), Heap::kTheHoleValueRootIndex);
2902 __ lw(scratch3(), 2902 __ lw(scratch3(),
2903 FieldMemOperand(scratch1(), JSGlobalPropertyCell::kValueOffset)); 2903 FieldMemOperand(scratch1(), PropertyCell::kValueOffset));
2904 __ Branch(&miss, eq, scratch3(), Operand(scratch2())); 2904 __ Branch(&miss, eq, scratch3(), Operand(scratch2()));
2905 2905
2906 // Store the value in the cell. 2906 // Store the value in the cell.
2907 __ sw(value(), 2907 __ sw(value(),
2908 FieldMemOperand(scratch1(), JSGlobalPropertyCell::kValueOffset)); 2908 FieldMemOperand(scratch1(), PropertyCell::kValueOffset));
2909 __ mov(v0, a0); // Stored value must be returned in v0. 2909 __ mov(v0, a0); // Stored value must be returned in v0.
2910 // Cells are always rescanned, so no write barrier here. 2910 // Cells are always rescanned, so no write barrier here.
2911 2911
2912 Counters* counters = isolate()->counters(); 2912 Counters* counters = isolate()->counters();
2913 __ IncrementCounter( 2913 __ IncrementCounter(
2914 counters->named_store_global_inline(), 1, scratch1(), scratch2()); 2914 counters->named_store_global_inline(), 1, scratch1(), scratch2());
2915 __ Ret(); 2915 __ Ret();
2916 2916
2917 // Handle store cache miss. 2917 // Handle store cache miss.
2918 __ bind(&miss); 2918 __ bind(&miss);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3020 } 3020 }
3021 3021
3022 3022
3023 #undef __ 3023 #undef __
3024 #define __ ACCESS_MASM(masm()) 3024 #define __ ACCESS_MASM(masm())
3025 3025
3026 3026
3027 Handle<Code> LoadStubCompiler::CompileLoadGlobal( 3027 Handle<Code> LoadStubCompiler::CompileLoadGlobal(
3028 Handle<JSObject> object, 3028 Handle<JSObject> object,
3029 Handle<GlobalObject> global, 3029 Handle<GlobalObject> global,
3030 Handle<JSGlobalPropertyCell> cell, 3030 Handle<PropertyCell> cell,
3031 Handle<Name> name, 3031 Handle<Name> name,
3032 bool is_dont_delete) { 3032 bool is_dont_delete) {
3033 Label success, miss; 3033 Label success, miss;
3034 3034
3035 __ CheckMap( 3035 __ CheckMap(
3036 receiver(), scratch1(), Handle<Map>(object->map()), &miss, DO_SMI_CHECK); 3036 receiver(), scratch1(), Handle<Map>(object->map()), &miss, DO_SMI_CHECK);
3037 HandlerFrontendHeader( 3037 HandlerFrontendHeader(
3038 object, receiver(), Handle<JSObject>::cast(global), name, &miss); 3038 object, receiver(), Handle<JSObject>::cast(global), name, &miss);
3039 3039
3040 // Get the value from the cell. 3040 // Get the value from the cell.
3041 __ li(a3, Operand(cell)); 3041 __ li(a3, Operand(cell));
3042 __ lw(t0, FieldMemOperand(a3, JSGlobalPropertyCell::kValueOffset)); 3042 __ lw(t0, FieldMemOperand(a3, PropertyCell::kValueOffset));
3043 3043
3044 // Check for deleted property if property can actually be deleted. 3044 // Check for deleted property if property can actually be deleted.
3045 if (!is_dont_delete) { 3045 if (!is_dont_delete) {
3046 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 3046 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
3047 __ Branch(&miss, eq, t0, Operand(at)); 3047 __ Branch(&miss, eq, t0, Operand(at));
3048 } 3048 }
3049 3049
3050 HandlerFrontendFooter(&success, &miss); 3050 HandlerFrontendFooter(&success, &miss);
3051 __ bind(&success); 3051 __ bind(&success);
3052 3052
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
3738 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow); 3738 TailCallBuiltin(masm, Builtins::kKeyedStoreIC_Slow);
3739 } 3739 }
3740 } 3740 }
3741 3741
3742 3742
3743 #undef __ 3743 #undef __
3744 3744
3745 } } // namespace v8::internal 3745 } } // namespace v8::internal
3746 3746
3747 #endif // V8_TARGET_ARCH_MIPS 3747 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698