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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | src/js/harmony-simd.js » ('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_X87 5 #if V8_TARGET_ARCH_X87
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 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after
2726 __ bind(&non_function_constructor); 2726 __ bind(&non_function_constructor);
2727 __ mov(eax, isolate()->factory()->Object_string()); 2727 __ mov(eax, isolate()->factory()->Object_string());
2728 2728
2729 // All done. 2729 // All done.
2730 __ bind(&done); 2730 __ bind(&done);
2731 2731
2732 context()->Plug(eax); 2732 context()->Plug(eax);
2733 } 2733 }
2734 2734
2735 2735
2736 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
2737 ZoneList<Expression*>* args = expr->arguments();
2738 DCHECK(args->length() == 1);
2739
2740 VisitForAccumulatorValue(args->at(0)); // Load the object.
2741
2742 Label done;
2743 // If the object is a smi return the object.
2744 __ JumpIfSmi(eax, &done, Label::kNear);
2745 // If the object is not a value type, return the object.
2746 __ CmpObjectType(eax, JS_VALUE_TYPE, ebx);
2747 __ j(not_equal, &done, Label::kNear);
2748 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset));
2749
2750 __ bind(&done);
2751 context()->Plug(eax);
2752 }
2753
2754
2755 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { 2736 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2756 ZoneList<Expression*>* args = expr->arguments(); 2737 ZoneList<Expression*>* args = expr->arguments();
2757 DCHECK(args->length() == 1); 2738 DCHECK(args->length() == 1);
2758 2739
2759 VisitForAccumulatorValue(args->at(0)); 2740 VisitForAccumulatorValue(args->at(0));
2760 2741
2761 Label done; 2742 Label done;
2762 StringCharFromCodeGenerator generator(eax, ebx); 2743 StringCharFromCodeGenerator generator(eax, ebx);
2763 generator.GenerateFast(masm_); 2744 generator.GenerateFast(masm_);
2764 __ jmp(&done); 2745 __ jmp(&done);
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
3679 isolate->builtins()->OnStackReplacement()->entry(), 3660 isolate->builtins()->OnStackReplacement()->entry(),
3680 Assembler::target_address_at(call_target_address, unoptimized_code)); 3661 Assembler::target_address_at(call_target_address, unoptimized_code));
3681 return ON_STACK_REPLACEMENT; 3662 return ON_STACK_REPLACEMENT;
3682 } 3663 }
3683 3664
3684 3665
3685 } // namespace internal 3666 } // namespace internal
3686 } // namespace v8 3667 } // namespace v8
3687 3668
3688 #endif // V8_TARGET_ARCH_X87 3669 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/js/harmony-simd.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698