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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1306303003: [es6] Implement spec compliant ToPrimitive in the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Michis comments. Created 5 years, 3 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
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-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after
3162 __ Add(descriptors, descriptors, 3162 __ Add(descriptors, descriptors,
3163 DescriptorArray::kFirstOffset - kHeapObjectTag); 3163 DescriptorArray::kFirstOffset - kHeapObjectTag);
3164 // Calculate the end of the descriptor array. 3164 // Calculate the end of the descriptor array.
3165 __ Add(descriptors_end, descriptors, 3165 __ Add(descriptors_end, descriptors,
3166 Operand(descriptors_length, LSL, kPointerSizeLog2)); 3166 Operand(descriptors_length, LSL, kPointerSizeLog2));
3167 3167
3168 // Loop through all the keys in the descriptor array. If one of these is the 3168 // Loop through all the keys in the descriptor array. If one of these is the
3169 // string "valueOf" the result is false. 3169 // string "valueOf" the result is false.
3170 Register valueof_string = x1; 3170 Register valueof_string = x1;
3171 int descriptor_size = DescriptorArray::kDescriptorSize * kPointerSize; 3171 int descriptor_size = DescriptorArray::kDescriptorSize * kPointerSize;
3172 __ Mov(valueof_string, Operand(isolate()->factory()->value_of_string())); 3172 __ LoadRoot(valueof_string, Heap::kvalueOf_stringRootIndex);
3173 __ Bind(&loop); 3173 __ Bind(&loop);
3174 __ Ldr(x15, MemOperand(descriptors, descriptor_size, PostIndex)); 3174 __ Ldr(x15, MemOperand(descriptors, descriptor_size, PostIndex));
3175 __ Cmp(x15, valueof_string); 3175 __ Cmp(x15, valueof_string);
3176 __ B(eq, if_false); 3176 __ B(eq, if_false);
3177 __ Cmp(descriptors, descriptors_end); 3177 __ Cmp(descriptors, descriptors_end);
3178 __ B(ne, &loop); 3178 __ B(ne, &loop);
3179 3179
3180 __ Bind(&done); 3180 __ Bind(&done);
3181 3181
3182 // Set the bit in the map to indicate that there is no local valueOf field. 3182 // Set the bit in the map to indicate that there is no local valueOf field.
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
5366 } 5366 }
5367 5367
5368 return INTERRUPT; 5368 return INTERRUPT;
5369 } 5369 }
5370 5370
5371 5371
5372 } // namespace internal 5372 } // namespace internal
5373 } // namespace v8 5373 } // namespace v8
5374 5374
5375 #endif // V8_TARGET_ARCH_ARM64 5375 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698