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

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

Issue 1134483002: Allow loading holes from holey smi arrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update the DCHECK Created 5 years, 7 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/ia32/lithium-codegen-ia32.cc ('k') | src/mips64/lithium-codegen-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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 3268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 if (instr->hydrogen()->RequiresHoleCheck()) { 3279 if (instr->hydrogen()->RequiresHoleCheck()) {
3280 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { 3280 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
3281 __ SmiTst(result, scratch); 3281 __ SmiTst(result, scratch);
3282 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch, 3282 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch,
3283 Operand(zero_reg)); 3283 Operand(zero_reg));
3284 } else { 3284 } else {
3285 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3285 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3286 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); 3286 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch));
3287 } 3287 }
3288 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { 3288 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) {
3289 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); 3289 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS ||
3290 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS);
3290 Label done; 3291 Label done;
3291 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); 3292 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex);
3292 __ Branch(&done, ne, result, Operand(scratch)); 3293 __ Branch(&done, ne, result, Operand(scratch));
3293 if (info()->IsStub()) { 3294 if (info()->IsStub()) {
3294 // A stub can safely convert the hole to undefined only if the array 3295 // A stub can safely convert the hole to undefined only if the array
3295 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise 3296 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise
3296 // it needs to bail out. 3297 // it needs to bail out.
3297 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); 3298 __ LoadRoot(result, Heap::kArrayProtectorRootIndex);
3298 __ lw(result, FieldMemOperand(result, Cell::kValueOffset)); 3299 __ lw(result, FieldMemOperand(result, Cell::kValueOffset));
3299 DeoptimizeIf(ne, instr, Deoptimizer::kHole, result, 3300 DeoptimizeIf(ne, instr, Deoptimizer::kHole, result,
(...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after
6000 __ li(at, scope_info); 6001 __ li(at, scope_info);
6001 __ Push(at, ToRegister(instr->function())); 6002 __ Push(at, ToRegister(instr->function()));
6002 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6003 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6003 RecordSafepoint(Safepoint::kNoLazyDeopt); 6004 RecordSafepoint(Safepoint::kNoLazyDeopt);
6004 } 6005 }
6005 6006
6006 6007
6007 #undef __ 6008 #undef __
6008 6009
6009 } } // namespace v8::internal 6010 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698