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

Side by Side Diff: src/arm64/code-stubs-arm64.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/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 4253 matching lines...) Expand 10 before | Expand all | Expand 10 after
4264 Label allocate, done_allocate; 4264 Label allocate, done_allocate;
4265 __ Allocate(JSArray::kSize, x0, x1, x2, &allocate, NO_ALLOCATION_FLAGS); 4265 __ Allocate(JSArray::kSize, x0, x1, x2, &allocate, NO_ALLOCATION_FLAGS);
4266 __ Bind(&done_allocate); 4266 __ Bind(&done_allocate);
4267 4267
4268 // Setup the rest parameter array in x0. 4268 // Setup the rest parameter array in x0.
4269 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, x1); 4269 __ LoadNativeContextSlot(Context::JS_ARRAY_FAST_ELEMENTS_MAP_INDEX, x1);
4270 __ Str(x1, FieldMemOperand(x0, JSArray::kMapOffset)); 4270 __ Str(x1, FieldMemOperand(x0, JSArray::kMapOffset));
4271 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex); 4271 __ LoadRoot(x1, Heap::kEmptyFixedArrayRootIndex);
4272 __ Str(x1, FieldMemOperand(x0, JSArray::kPropertiesOffset)); 4272 __ Str(x1, FieldMemOperand(x0, JSArray::kPropertiesOffset));
4273 __ Str(x1, FieldMemOperand(x0, JSArray::kElementsOffset)); 4273 __ Str(x1, FieldMemOperand(x0, JSArray::kElementsOffset));
4274 __ Mov(x1, Smi::kZero); 4274 __ Mov(x1, Smi::FromInt(0));
4275 __ Str(x1, FieldMemOperand(x0, JSArray::kLengthOffset)); 4275 __ Str(x1, FieldMemOperand(x0, JSArray::kLengthOffset));
4276 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize); 4276 STATIC_ASSERT(JSArray::kSize == 4 * kPointerSize);
4277 __ Ret(); 4277 __ Ret();
4278 4278
4279 // Fall back to %AllocateInNewSpace. 4279 // Fall back to %AllocateInNewSpace.
4280 __ Bind(&allocate); 4280 __ Bind(&allocate);
4281 { 4281 {
4282 FrameScope scope(masm, StackFrame::INTERNAL); 4282 FrameScope scope(masm, StackFrame::INTERNAL);
4283 __ Push(Smi::FromInt(JSArray::kSize)); 4283 __ Push(Smi::FromInt(JSArray::kSize));
4284 __ CallRuntime(Runtime::kAllocateInNewSpace); 4284 __ CallRuntime(Runtime::kAllocateInNewSpace);
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
5195 Register scratch2 = x5; 5195 Register scratch2 = x5;
5196 Register scratch3 = x6; 5196 Register scratch3 = x6;
5197 DCHECK(!AreAliased(receiver, holder, callback, scratch)); 5197 DCHECK(!AreAliased(receiver, holder, callback, scratch));
5198 5198
5199 __ Push(receiver); 5199 __ Push(receiver);
5200 5200
5201 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); 5201 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
5202 __ Mov(scratch2, Operand(ExternalReference::isolate_address(isolate()))); 5202 __ Mov(scratch2, Operand(ExternalReference::isolate_address(isolate())));
5203 __ Ldr(scratch3, FieldMemOperand(callback, AccessorInfo::kDataOffset)); 5203 __ Ldr(scratch3, FieldMemOperand(callback, AccessorInfo::kDataOffset));
5204 __ Push(scratch3, scratch, scratch, scratch2, holder); 5204 __ Push(scratch3, scratch, scratch, scratch2, holder);
5205 __ Push(Smi::kZero); // should_throw_on_error -> false 5205 __ Push(Smi::FromInt(0)); // should_throw_on_error -> false
5206 __ Ldr(scratch, FieldMemOperand(callback, AccessorInfo::kNameOffset)); 5206 __ Ldr(scratch, FieldMemOperand(callback, AccessorInfo::kNameOffset));
5207 __ Push(scratch); 5207 __ Push(scratch);
5208 5208
5209 // v8::PropertyCallbackInfo::args_ array and name handle. 5209 // v8::PropertyCallbackInfo::args_ array and name handle.
5210 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; 5210 const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1;
5211 5211
5212 // Load address of v8::PropertyAccessorInfo::args_ array and name handle. 5212 // Load address of v8::PropertyAccessorInfo::args_ array and name handle.
5213 __ Mov(x0, masm->StackPointer()); // x0 = Handle<Name> 5213 __ Mov(x0, masm->StackPointer()); // x0 = Handle<Name>
5214 __ Add(x1, x0, 1 * kPointerSize); // x1 = v8::PCI::args_ 5214 __ Add(x1, x0, 1 * kPointerSize); // x1 = v8::PCI::args_
5215 5215
(...skipping 28 matching lines...) Expand all
5244 kStackUnwindSpace, NULL, spill_offset, 5244 kStackUnwindSpace, NULL, spill_offset,
5245 return_value_operand, NULL); 5245 return_value_operand, NULL);
5246 } 5246 }
5247 5247
5248 #undef __ 5248 #undef __
5249 5249
5250 } // namespace internal 5250 } // namespace internal
5251 } // namespace v8 5251 } // namespace v8
5252 5252
5253 #endif // V8_TARGET_ARCH_ARM64 5253 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698