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

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

Issue 404813002: MIPS: Cache IC handlers on the prototype's map if possible. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/ic-mips.cc ('k') | src/mips64/ic-mips64.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic-inl.h" 10 #include "src/ic-inl.h"
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 if (current_map->IsJSGlobalProxyMap()) { 878 if (current_map->IsJSGlobalProxyMap()) {
879 __ CheckAccessGlobalProxy(reg, scratch2, miss); 879 __ CheckAccessGlobalProxy(reg, scratch2, miss);
880 } else if (current_map->IsJSGlobalObjectMap()) { 880 } else if (current_map->IsJSGlobalObjectMap()) {
881 GenerateCheckPropertyCell( 881 GenerateCheckPropertyCell(
882 masm(), Handle<JSGlobalObject>::cast(current), name, 882 masm(), Handle<JSGlobalObject>::cast(current), name,
883 scratch2, miss); 883 scratch2, miss);
884 } 884 }
885 885
886 reg = holder_reg; // From now on the object will be in holder_reg. 886 reg = holder_reg; // From now on the object will be in holder_reg.
887 887
888 if (heap()->InNewSpace(*prototype)) { 888 // Two possible reasons for loading the prototype from the map:
889 // The prototype is in new space; we cannot store a reference to it 889 // (1) Can't store references to new space in code.
890 // in the code. Load it from the map. 890 // (2) Handler is shared for all receivers with the same prototype
891 // map (but not necessarily the same prototype instance).
892 bool load_prototype_from_map =
893 heap()->InNewSpace(*prototype) || depth == 1;
894 if (load_prototype_from_map) {
891 __ lw(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); 895 __ lw(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset));
892 } else { 896 } else {
893 // The prototype is in old space; load it directly.
894 __ li(reg, Operand(prototype)); 897 __ li(reg, Operand(prototype));
895 } 898 }
896 } 899 }
897 900
898 // Go to the next object in the prototype chain. 901 // Go to the next object in the prototype chain.
899 current = prototype; 902 current = prototype;
900 current_map = handle(current->map()); 903 current_map = handle(current->map());
901 } 904 }
902 905
903 // Log the check depth. 906 // Log the check depth.
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 1501
1499 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1502 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1500 } 1503 }
1501 1504
1502 1505
1503 #undef __ 1506 #undef __
1504 1507
1505 } } // namespace v8::internal 1508 } } // namespace v8::internal
1506 1509
1507 #endif // V8_TARGET_ARCH_MIPS 1510 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips64/ic-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698