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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 23036004: Use Cell instead of PropertyCell in DoCheckFunction (in case of new space object). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « no previous file | src/mips/lithium-codegen-mips.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 // 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 5132 matching lines...) Expand 10 before | Expand all | Expand 10 after
5143 } 5143 }
5144 } 5144 }
5145 5145
5146 5146
5147 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 5147 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
5148 Register reg = ToRegister(instr->value()); 5148 Register reg = ToRegister(instr->value());
5149 Handle<JSFunction> target = instr->hydrogen()->target(); 5149 Handle<JSFunction> target = instr->hydrogen()->target();
5150 AllowDeferredHandleDereference smi_check; 5150 AllowDeferredHandleDereference smi_check;
5151 if (isolate()->heap()->InNewSpace(*target)) { 5151 if (isolate()->heap()->InNewSpace(*target)) {
5152 Register reg = ToRegister(instr->value()); 5152 Register reg = ToRegister(instr->value());
5153 Handle<Cell> cell = isolate()->factory()->NewPropertyCell(target); 5153 Handle<Cell> cell = isolate()->factory()->NewCell(target);
5154 __ mov(ip, Operand(Handle<Object>(cell))); 5154 __ mov(ip, Operand(Handle<Object>(cell)));
5155 __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset)); 5155 __ ldr(ip, FieldMemOperand(ip, Cell::kValueOffset));
5156 __ cmp(reg, ip); 5156 __ cmp(reg, ip);
5157 } else { 5157 } else {
5158 __ cmp(reg, Operand(target)); 5158 __ cmp(reg, Operand(target));
5159 } 5159 }
5160 DeoptimizeIf(ne, instr->environment()); 5160 DeoptimizeIf(ne, instr->environment());
5161 } 5161 }
5162 5162
5163 5163
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
5788 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5788 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5789 __ ldr(result, FieldMemOperand(scratch, 5789 __ ldr(result, FieldMemOperand(scratch,
5790 FixedArray::kHeaderSize - kPointerSize)); 5790 FixedArray::kHeaderSize - kPointerSize));
5791 __ bind(&done); 5791 __ bind(&done);
5792 } 5792 }
5793 5793
5794 5794
5795 #undef __ 5795 #undef __
5796 5796
5797 } } // namespace v8::internal 5797 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698