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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_X87 5 #if V8_TARGET_ARCH_X87
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 3336 matching lines...) Expand 10 before | Expand all | Expand 10 after
3347 STATIC_ASSERT(kPointerSize == 4); 3347 STATIC_ASSERT(kPointerSize == 4);
3348 __ imul(ecx, ecx, DescriptorArray::kDescriptorSize); 3348 __ imul(ecx, ecx, DescriptorArray::kDescriptorSize);
3349 __ lea(ecx, Operand(ebx, ecx, times_4, DescriptorArray::kFirstOffset)); 3349 __ lea(ecx, Operand(ebx, ecx, times_4, DescriptorArray::kFirstOffset));
3350 // Calculate location of the first key name. 3350 // Calculate location of the first key name.
3351 __ add(ebx, Immediate(DescriptorArray::kFirstOffset)); 3351 __ add(ebx, Immediate(DescriptorArray::kFirstOffset));
3352 // Loop through all the keys in the descriptor array. If one of these is the 3352 // Loop through all the keys in the descriptor array. If one of these is the
3353 // internalized string "valueOf" the result is false. 3353 // internalized string "valueOf" the result is false.
3354 __ jmp(&entry); 3354 __ jmp(&entry);
3355 __ bind(&loop); 3355 __ bind(&loop);
3356 __ mov(edx, FieldOperand(ebx, 0)); 3356 __ mov(edx, FieldOperand(ebx, 0));
3357 __ cmp(edx, isolate()->factory()->value_of_string()); 3357 __ cmp(edx, isolate()->factory()->valueOf_string());
3358 __ j(equal, if_false); 3358 __ j(equal, if_false);
3359 __ add(ebx, Immediate(DescriptorArray::kDescriptorSize * kPointerSize)); 3359 __ add(ebx, Immediate(DescriptorArray::kDescriptorSize * kPointerSize));
3360 __ bind(&entry); 3360 __ bind(&entry);
3361 __ cmp(ebx, ecx); 3361 __ cmp(ebx, ecx);
3362 __ j(not_equal, &loop); 3362 __ j(not_equal, &loop);
3363 3363
3364 __ bind(&done); 3364 __ bind(&done);
3365 3365
3366 // Reload map as register ebx was used as temporary above. 3366 // Reload map as register ebx was used as temporary above.
3367 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); 3367 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
(...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5246 Assembler::target_address_at(call_target_address, 5246 Assembler::target_address_at(call_target_address,
5247 unoptimized_code)); 5247 unoptimized_code));
5248 return OSR_AFTER_STACK_CHECK; 5248 return OSR_AFTER_STACK_CHECK;
5249 } 5249 }
5250 5250
5251 5251
5252 } // namespace internal 5252 } // namespace internal
5253 } // namespace v8 5253 } // namespace v8
5254 5254
5255 #endif // V8_TARGET_ARCH_X87 5255 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/heap/heap.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698