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

Unified Diff: src/builtins/x87/builtins-x87.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/x64/builtins-x64.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/x87/builtins-x87.cc
diff --git a/src/builtins/x87/builtins-x87.cc b/src/builtins/x87/builtins-x87.cc
index ed7179a4f9e35e2efdd2fd2d92af6a715d655098..1a7834665564508377da6314505c8c001cbf2d45 100644
--- a/src/builtins/x87/builtins-x87.cc
+++ b/src/builtins/x87/builtins-x87.cc
@@ -889,30 +889,13 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
const int bailout_id = BailoutId::None().ToInt();
__ cmp(temp, Immediate(Smi::FromInt(bailout_id)));
__ j(not_equal, &loop_bottom);
-
// Literals available?
- Label got_literals, maybe_cleared_weakcell;
__ mov(temp, FieldOperand(map, index, times_half_pointer_size,
SharedFunctionInfo::kOffsetToPreviousLiterals));
-
- // temp contains either a WeakCell pointing to the literals array or the
- // literals array directly.
- STATIC_ASSERT(WeakCell::kValueOffset == FixedArray::kLengthOffset);
- __ JumpIfSmi(FieldOperand(temp, WeakCell::kValueOffset),
- &maybe_cleared_weakcell);
- // The WeakCell value is a pointer, therefore it's a valid literals array.
__ mov(temp, FieldOperand(temp, WeakCell::kValueOffset));
- __ jmp(&got_literals);
-
- // We have 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);
- __ cmp(FieldOperand(temp, WeakCell::kValueOffset), Immediate(0));
- __ j(equal, &gotta_call_runtime);
+ __ JumpIfSmi(temp, &gotta_call_runtime);
// Save the literals in the closure.
- __ bind(&got_literals);
__ mov(ecx, Operand(esp, 0));
__ mov(FieldOperand(ecx, JSFunction::kLiteralsOffset), temp);
__ push(index);
« no previous file with comments | « src/builtins/x64/builtins-x64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698