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

Unified Diff: src/builtins/x64/builtins-x64.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/mips64/builtins-mips64.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/x64/builtins-x64.cc
diff --git a/src/builtins/x64/builtins-x64.cc b/src/builtins/x64/builtins-x64.cc
index dfd653fdea1ad75b65b1cd9819522493aa2307a7..a8e15bd0b42473e9dcb4f8e5ae564a2ad4468257 100644
--- a/src/builtins/x64/builtins-x64.cc
+++ b/src/builtins/x64/builtins-x64.cc
@@ -953,30 +953,13 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
const int bailout_id = BailoutId::None().ToInt();
__ cmpl(temp, Immediate(bailout_id));
__ j(not_equal, &loop_bottom);
-
// Literals available?
- Label got_literals, maybe_cleared_weakcell;
__ movp(temp, FieldOperand(map, index, times_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);
- __ movp(r15, FieldOperand(temp, WeakCell::kValueOffset));
- __ JumpIfSmi(r15, &maybe_cleared_weakcell);
- // r15 is a pointer, therefore temp is a WeakCell pointing to a literals
- // array.
__ movp(temp, FieldOperand(temp, WeakCell::kValueOffset));
- __ jmp(&got_literals);
-
- // r15 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);
- __ cmpp(r15, Immediate(0));
- __ j(equal, &gotta_call_runtime);
+ __ JumpIfSmi(temp, &gotta_call_runtime);
// Save the literals in the closure.
- __ bind(&got_literals);
__ movp(FieldOperand(closure, JSFunction::kLiteralsOffset), temp);
__ movp(r15, index);
__ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r15,
« no previous file with comments | « src/builtins/mips64/builtins-mips64.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698