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

Side by Side Diff: src/ic/mips/handler-compiler-mips.cc

Issue 753223002: Load prototype from map in PropertyHandlerCompiler::CheckPrototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/x64/handler-compiler-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // in LookupForRead(). 427 // in LookupForRead().
428 if (current_map->IsJSGlobalProxyMap()) { 428 if (current_map->IsJSGlobalProxyMap()) {
429 __ CheckAccessGlobalProxy(reg, scratch2, miss); 429 __ CheckAccessGlobalProxy(reg, scratch2, miss);
430 } else if (current_map->IsJSGlobalObjectMap()) { 430 } else if (current_map->IsJSGlobalObjectMap()) {
431 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current), 431 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current),
432 name, scratch2, miss); 432 name, scratch2, miss);
433 } 433 }
434 434
435 reg = holder_reg; // From now on the object will be in holder_reg. 435 reg = holder_reg; // From now on the object will be in holder_reg.
436 436
437 // Two possible reasons for loading the prototype from the map: 437 __ lw(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset));
438 // (1) Can't store references to new space in code.
439 // (2) Handler is shared for all receivers with the same prototype
440 // map (but not necessarily the same prototype instance).
441 bool load_prototype_from_map =
442 heap()->InNewSpace(*prototype) || depth == 1;
443 if (load_prototype_from_map) {
444 __ lw(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset));
445 } else {
446 __ li(reg, Operand(prototype));
447 }
448 } 438 }
449 439
450 // Go to the next object in the prototype chain. 440 // Go to the next object in the prototype chain.
451 current = prototype; 441 current = prototype;
452 current_map = handle(current->map()); 442 current_map = handle(current->map());
453 } 443 }
454 444
455 // Log the check depth. 445 // Log the check depth.
456 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); 446 LOG(isolate(), IntEvent("check-maps-depth", depth + 1));
457 447
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 // Return the generated code. 677 // Return the generated code.
688 return GetCode(kind(), Code::NORMAL, name); 678 return GetCode(kind(), Code::NORMAL, name);
689 } 679 }
690 680
691 681
692 #undef __ 682 #undef __
693 } 683 }
694 } // namespace v8::internal 684 } // namespace v8::internal
695 685
696 #endif // V8_TARGET_ARCH_MIPS 686 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/ia32/handler-compiler-ia32.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698