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

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

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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/crankshaft/lithium-codegen.cc ('k') | src/crankshaft/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 5352 matching lines...) Expand 10 before | Expand all | Expand 10 after
5363 CallRuntime(Runtime::kForInEnumerate, instr); 5363 CallRuntime(Runtime::kForInEnumerate, instr);
5364 __ bind(&use_cache); 5364 __ bind(&use_cache);
5365 } 5365 }
5366 5366
5367 5367
5368 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { 5368 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) {
5369 Register map = ToRegister(instr->map()); 5369 Register map = ToRegister(instr->map());
5370 Register result = ToRegister(instr->result()); 5370 Register result = ToRegister(instr->result());
5371 Label load_cache, done; 5371 Label load_cache, done;
5372 __ EnumLength(result, map); 5372 __ EnumLength(result, map);
5373 __ Branch(&load_cache, ne, result, Operand(Smi::kZero)); 5373 __ Branch(&load_cache, ne, result, Operand(Smi::FromInt(0)));
5374 __ li(result, Operand(isolate()->factory()->empty_fixed_array())); 5374 __ li(result, Operand(isolate()->factory()->empty_fixed_array()));
5375 __ jmp(&done); 5375 __ jmp(&done);
5376 5376
5377 __ bind(&load_cache); 5377 __ bind(&load_cache);
5378 __ LoadInstanceDescriptors(map, result); 5378 __ LoadInstanceDescriptors(map, result);
5379 __ lw(result, 5379 __ lw(result,
5380 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); 5380 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset));
5381 __ lw(result, 5381 __ lw(result,
5382 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); 5382 FieldMemOperand(result, FixedArray::SizeFor(instr->idx())));
5383 DeoptimizeIf(eq, instr, DeoptimizeReason::kNoCache, result, 5383 DeoptimizeIf(eq, instr, DeoptimizeReason::kNoCache, result,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
5467 __ lw(result, FieldMemOperand(scratch, 5467 __ lw(result, FieldMemOperand(scratch,
5468 FixedArray::kHeaderSize - kPointerSize)); 5468 FixedArray::kHeaderSize - kPointerSize));
5469 __ bind(deferred->exit()); 5469 __ bind(deferred->exit());
5470 __ bind(&done); 5470 __ bind(&done);
5471 } 5471 }
5472 5472
5473 #undef __ 5473 #undef __
5474 5474
5475 } // namespace internal 5475 } // namespace internal
5476 } // namespace v8 5476 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/lithium-codegen.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698