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

Unified Diff: src/builtins/mips/builtins-mips.cc

Issue 2144183002: Revert "Avoid creating weak cells for literal arrays that are empty of literals." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/mips/builtins-mips.cc
diff --git a/src/builtins/mips/builtins-mips.cc b/src/builtins/mips/builtins-mips.cc
index b8d91e01ee93dad828903e2d828d46e58c5e2671..dd4ad5b3e5ad91db87882972d43d325e46cde81c 100644
--- a/src/builtins/mips/builtins-mips.cc
+++ b/src/builtins/mips/builtins-mips.cc
@@ -1321,28 +1321,13 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
SharedFunctionInfo::kOffsetToPreviousOsrAstId));
const int bailout_id = BailoutId::None().ToInt();
__ Branch(&loop_bottom, ne, temp, Operand(Smi::FromInt(bailout_id)));
-
// Literals available?
- Label got_literals, maybe_cleared_weakcell;
__ lw(temp, FieldMemOperand(array_pointer,
SharedFunctionInfo::kOffsetToPreviousLiterals));
- // temp contains either a WeakCell pointing to the literals array or the
- // literals array directly.
- STATIC_ASSERT(WeakCell::kValueOffset == FixedArray::kLengthOffset);
- __ lw(t0, FieldMemOperand(temp, WeakCell::kValueOffset));
- __ JumpIfSmi(t0, &maybe_cleared_weakcell);
- // t0 is a pointer, therefore temp is a WeakCell pointing to a literals array.
__ lw(temp, FieldMemOperand(temp, WeakCell::kValueOffset));
- __ jmp(&got_literals);
-
- // t0 is a smi. If it's 0, then we are looking at a cleared WeakCell
- // around the literals array, and we should visit the runtime. If it's > 0,
- // then temp already contains the literals array.
- __ bind(&maybe_cleared_weakcell);
- __ Branch(&gotta_call_runtime, eq, t0, Operand(Smi::FromInt(0)));
+ __ JumpIfSmi(temp, &gotta_call_runtime);
// Save the literals in the closure.
- __ bind(&got_literals);
__ lw(t0, MemOperand(sp, 0));
__ sw(temp, FieldMemOperand(t0, JSFunction::kLiteralsOffset));
__ push(index);
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698