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

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

Issue 2126453002: [intrinsic] Drop the %_ValueOf intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix noi18n build (narf) Created 4 years, 5 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/full-codegen/full-codegen.h ('k') | src/full-codegen/mips/full-codegen-mips.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 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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 __ bind(&non_function_constructor); 2734 __ bind(&non_function_constructor);
2735 __ mov(eax, isolate()->factory()->Object_string()); 2735 __ mov(eax, isolate()->factory()->Object_string());
2736 2736
2737 // All done. 2737 // All done.
2738 __ bind(&done); 2738 __ bind(&done);
2739 2739
2740 context()->Plug(eax); 2740 context()->Plug(eax);
2741 } 2741 }
2742 2742
2743 2743
2744 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
2745 ZoneList<Expression*>* args = expr->arguments();
2746 DCHECK(args->length() == 1);
2747
2748 VisitForAccumulatorValue(args->at(0)); // Load the object.
2749
2750 Label done;
2751 // If the object is a smi return the object.
2752 __ JumpIfSmi(eax, &done, Label::kNear);
2753 // If the object is not a value type, return the object.
2754 __ CmpObjectType(eax, JS_VALUE_TYPE, ebx);
2755 __ j(not_equal, &done, Label::kNear);
2756 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset));
2757
2758 __ bind(&done);
2759 context()->Plug(eax);
2760 }
2761
2762
2763 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { 2744 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2764 ZoneList<Expression*>* args = expr->arguments(); 2745 ZoneList<Expression*>* args = expr->arguments();
2765 DCHECK(args->length() == 1); 2746 DCHECK(args->length() == 1);
2766 2747
2767 VisitForAccumulatorValue(args->at(0)); 2748 VisitForAccumulatorValue(args->at(0));
2768 2749
2769 Label done; 2750 Label done;
2770 StringCharFromCodeGenerator generator(eax, ebx); 2751 StringCharFromCodeGenerator generator(eax, ebx);
2771 generator.GenerateFast(masm_); 2752 generator.GenerateFast(masm_);
2772 __ jmp(&done); 2753 __ jmp(&done);
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
3687 isolate->builtins()->OnStackReplacement()->entry(), 3668 isolate->builtins()->OnStackReplacement()->entry(),
3688 Assembler::target_address_at(call_target_address, unoptimized_code)); 3669 Assembler::target_address_at(call_target_address, unoptimized_code));
3689 return ON_STACK_REPLACEMENT; 3670 return ON_STACK_REPLACEMENT;
3690 } 3671 }
3691 3672
3692 3673
3693 } // namespace internal 3674 } // namespace internal
3694 } // namespace v8 3675 } // namespace v8
3695 3676
3696 #endif // V8_TARGET_ARCH_IA32 3677 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698