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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 STATIC_ASSERT(kPointerSize == 4); 3356 STATIC_ASSERT(kPointerSize == 4);
3357 __ imul(ecx, ecx, DescriptorArray::kDescriptorSize); 3357 __ imul(ecx, ecx, DescriptorArray::kDescriptorSize);
3358 __ lea(ecx, Operand(ebx, ecx, times_4, DescriptorArray::kFirstOffset)); 3358 __ lea(ecx, Operand(ebx, ecx, times_4, DescriptorArray::kFirstOffset));
3359 // Calculate location of the first key name. 3359 // Calculate location of the first key name.
3360 __ add(ebx, Immediate(DescriptorArray::kFirstOffset)); 3360 __ add(ebx, Immediate(DescriptorArray::kFirstOffset));
3361 // Loop through all the keys in the descriptor array. If one of these is the 3361 // Loop through all the keys in the descriptor array. If one of these is the
3362 // internalized string "valueOf" the result is false. 3362 // internalized string "valueOf" the result is false.
3363 __ jmp(&entry); 3363 __ jmp(&entry);
3364 __ bind(&loop); 3364 __ bind(&loop);
3365 __ mov(edx, FieldOperand(ebx, 0)); 3365 __ mov(edx, FieldOperand(ebx, 0));
3366 __ cmp(edx, isolate()->factory()->value_of_string()); 3366 __ cmp(edx, isolate()->factory()->valueOf_string());
3367 __ j(equal, if_false); 3367 __ j(equal, if_false);
3368 __ add(ebx, Immediate(DescriptorArray::kDescriptorSize * kPointerSize)); 3368 __ add(ebx, Immediate(DescriptorArray::kDescriptorSize * kPointerSize));
3369 __ bind(&entry); 3369 __ bind(&entry);
3370 __ cmp(ebx, ecx); 3370 __ cmp(ebx, ecx);
3371 __ j(not_equal, &loop); 3371 __ j(not_equal, &loop);
3372 3372
3373 __ bind(&done); 3373 __ bind(&done);
3374 3374
3375 // Reload map as register ebx was used as temporary above. 3375 // Reload map as register ebx was used as temporary above.
3376 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset)); 3376 __ mov(ebx, FieldOperand(eax, HeapObject::kMapOffset));
(...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5255 Assembler::target_address_at(call_target_address, 5255 Assembler::target_address_at(call_target_address,
5256 unoptimized_code)); 5256 unoptimized_code));
5257 return OSR_AFTER_STACK_CHECK; 5257 return OSR_AFTER_STACK_CHECK;
5258 } 5258 }
5259 5259
5260 5260
5261 } // namespace internal 5261 } // namespace internal
5262 } // namespace v8 5262 } // namespace v8
5263 5263
5264 #endif // V8_TARGET_ARCH_IA32 5264 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698