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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 1228063004: Fix keyed element access wrt string wrappers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | src/objects.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 <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 5967 matching lines...) Expand 10 before | Expand all | Expand 10 after
5978 5978
5979 5979
5980 void MacroAssembler::JumpIfDictionaryInPrototypeChain( 5980 void MacroAssembler::JumpIfDictionaryInPrototypeChain(
5981 Register object, 5981 Register object,
5982 Register scratch0, 5982 Register scratch0,
5983 Register scratch1, 5983 Register scratch1,
5984 Label* found) { 5984 Label* found) {
5985 DCHECK(!scratch1.is(scratch0)); 5985 DCHECK(!scratch1.is(scratch0));
5986 Factory* factory = isolate()->factory(); 5986 Factory* factory = isolate()->factory();
5987 Register current = scratch0; 5987 Register current = scratch0;
5988 Label loop_again; 5988 Label loop_again, end;
5989 5989
5990 // Scratch contained elements pointer. 5990 // Scratch contained elements pointer.
5991 Move(current, object); 5991 Move(current, object);
5992 lw(current, FieldMemOperand(current, HeapObject::kMapOffset));
5993 lw(current, FieldMemOperand(current, Map::kPrototypeOffset));
5994 Branch(&end, eq, current, Operand(factory->null_value()));
5992 5995
5993 // Loop based on the map going up the prototype chain. 5996 // Loop based on the map going up the prototype chain.
5994 bind(&loop_again); 5997 bind(&loop_again);
5995 lw(current, FieldMemOperand(current, HeapObject::kMapOffset)); 5998 lw(current, FieldMemOperand(current, HeapObject::kMapOffset));
5999 lbu(scratch1, FieldMemOperand(current, Map::kInstanceTypeOffset));
6000 STATIC_ASSERT(JS_VALUE_TYPE < JS_OBJECT_TYPE);
6001 STATIC_ASSERT(JS_PROXY_TYPE < JS_OBJECT_TYPE);
6002 Branch(found, lo, scratch1, Operand(JS_OBJECT_TYPE));
5996 lb(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); 6003 lb(scratch1, FieldMemOperand(current, Map::kBitField2Offset));
5997 DecodeField<Map::ElementsKindBits>(scratch1); 6004 DecodeField<Map::ElementsKindBits>(scratch1);
5998 Branch(found, eq, scratch1, Operand(DICTIONARY_ELEMENTS)); 6005 Branch(found, eq, scratch1, Operand(DICTIONARY_ELEMENTS));
5999 lw(current, FieldMemOperand(current, Map::kPrototypeOffset)); 6006 lw(current, FieldMemOperand(current, Map::kPrototypeOffset));
6000 Branch(&loop_again, ne, current, Operand(factory->null_value())); 6007 Branch(&loop_again, ne, current, Operand(factory->null_value()));
6008
6009 bind(&end);
6001 } 6010 }
6002 6011
6003 6012
6004 bool AreAliased(Register reg1, 6013 bool AreAliased(Register reg1,
6005 Register reg2, 6014 Register reg2,
6006 Register reg3, 6015 Register reg3,
6007 Register reg4, 6016 Register reg4,
6008 Register reg5, 6017 Register reg5,
6009 Register reg6, 6018 Register reg6,
6010 Register reg7, 6019 Register reg7,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
6106 if (mag.shift > 0) sra(result, result, mag.shift); 6115 if (mag.shift > 0) sra(result, result, mag.shift);
6107 srl(at, dividend, 31); 6116 srl(at, dividend, 31);
6108 Addu(result, result, Operand(at)); 6117 Addu(result, result, Operand(at));
6109 } 6118 }
6110 6119
6111 6120
6112 } // namespace internal 6121 } // namespace internal
6113 } // namespace v8 6122 } // namespace v8
6114 6123
6115 #endif // V8_TARGET_ARCH_MIPS 6124 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698