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

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

Issue 2117273002: Revert of [intrinsic] Drop the %_ValueOf intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/debug/mirrors.js ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
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 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 // Non-JS objects have class null. 2849 // Non-JS objects have class null.
2850 __ bind(&null); 2850 __ bind(&null);
2851 __ LoadRoot(r0, Heap::kNullValueRootIndex); 2851 __ LoadRoot(r0, Heap::kNullValueRootIndex);
2852 2852
2853 // All done. 2853 // All done.
2854 __ bind(&done); 2854 __ bind(&done);
2855 2855
2856 context()->Plug(r0); 2856 context()->Plug(r0);
2857 } 2857 }
2858 2858
2859
2860 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
2861 ZoneList<Expression*>* args = expr->arguments();
2862 DCHECK(args->length() == 1);
2863 VisitForAccumulatorValue(args->at(0)); // Load the object.
2864
2865 Label done;
2866 // If the object is a smi return the object.
2867 __ JumpIfSmi(r0, &done);
2868 // If the object is not a value type, return the object.
2869 __ CompareObjectType(r0, r1, r1, JS_VALUE_TYPE);
2870 __ ldr(r0, FieldMemOperand(r0, JSValue::kValueOffset), eq);
2871
2872 __ bind(&done);
2873 context()->Plug(r0);
2874 }
2875
2859 2876
2860 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { 2877 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2861 ZoneList<Expression*>* args = expr->arguments(); 2878 ZoneList<Expression*>* args = expr->arguments();
2862 DCHECK(args->length() == 1); 2879 DCHECK(args->length() == 1);
2863 VisitForAccumulatorValue(args->at(0)); 2880 VisitForAccumulatorValue(args->at(0));
2864 2881
2865 Label done; 2882 Label done;
2866 StringCharFromCodeGenerator generator(r0, r1); 2883 StringCharFromCodeGenerator generator(r0, r1);
2867 generator.GenerateFast(masm_); 2884 generator.GenerateFast(masm_);
2868 __ jmp(&done); 2885 __ jmp(&done);
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
3839 DCHECK(interrupt_address == 3856 DCHECK(interrupt_address ==
3840 isolate->builtins()->OnStackReplacement()->entry()); 3857 isolate->builtins()->OnStackReplacement()->entry());
3841 return ON_STACK_REPLACEMENT; 3858 return ON_STACK_REPLACEMENT;
3842 } 3859 }
3843 3860
3844 3861
3845 } // namespace internal 3862 } // namespace internal
3846 } // namespace v8 3863 } // namespace v8
3847 3864
3848 #endif // V8_TARGET_ARCH_ARM 3865 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/debug/mirrors.js ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698