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

Unified Diff: src/ia32/stub-cache-ia32.cc

Issue 5745005: Provide baseline GC version. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 352eae1f927577d815d76c7089df232c6dfdb627..2f13d43c98e39372f2daf6ed070b1e732aaee020 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -1478,7 +1478,10 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
__ j(not_equal, &call_builtin);
if (argc == 1) { // Otherwise fall through to call builtin.
- Label exit, with_write_barrier, attempt_to_grow_elements;
+ Label exit, attempt_to_grow_elements;
+#ifndef BASELINE_GC
+ Label with_write_barrier;
+#endif
// Get the array's length into eax and calculate new length.
__ mov(eax, FieldOperand(edx, JSArray::kLengthOffset));
@@ -1503,19 +1506,23 @@ MaybeObject* CallStubCompiler::CompileArrayPushCall(Object* object,
__ mov(ecx, Operand(esp, argc * kPointerSize));
__ mov(Operand(edx, 0), ecx);
+#ifndef BASELINE_GC
// Check if value is a smi.
__ test(ecx, Immediate(kSmiTagMask));
__ j(not_zero, &with_write_barrier);
+#endif
__ bind(&exit);
__ ret((argc + 1) * kPointerSize);
+#ifndef BASELINE_GC
__ bind(&with_write_barrier);
__ InNewSpace(ebx, ecx, equal, &exit);
__ RecordWriteHelper(ebx, edx, ecx);
__ ret((argc + 1) * kPointerSize);
+#endif
__ bind(&attempt_to_grow_elements);
if (!FLAG_inline_new) {

Powered by Google App Engine
This is Rietveld 408576698