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

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

Issue 1496503002: [runtime] [proxy] removing JSFunctionProxy and related code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing merge artifacts Created 5 years 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/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 __ JumpIfObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE, &done_convert, ge); 1039 __ JumpIfObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE, &done_convert, ge);
1040 __ Bind(&convert); 1040 __ Bind(&convert);
1041 ToObjectStub stub(isolate()); 1041 ToObjectStub stub(isolate());
1042 __ CallStub(&stub); 1042 __ CallStub(&stub);
1043 __ Bind(&done_convert); 1043 __ Bind(&done_convert);
1044 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); 1044 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG);
1045 __ Push(x0); 1045 __ Push(x0);
1046 1046
1047 // Check for proxies. 1047 // Check for proxies.
1048 Label call_runtime; 1048 Label call_runtime;
1049 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); 1049 __ JumpIfObjectType(x0, x10, x11, JS_PROXY_TYPE, &call_runtime, eq);
1050 __ JumpIfObjectType(x0, x10, x11, LAST_JS_PROXY_TYPE, &call_runtime, le);
1051 1050
1052 // Check cache validity in generated code. This is a fast case for 1051 // Check cache validity in generated code. This is a fast case for
1053 // the JSObject::IsSimpleEnum cache validity checks. If we cannot 1052 // the JSObject::IsSimpleEnum cache validity checks. If we cannot
1054 // guarantee cache validity, call the runtime system to check cache 1053 // guarantee cache validity, call the runtime system to check cache
1055 // validity or get the property names in a fixed array. 1054 // validity or get the property names in a fixed array.
1056 __ CheckEnumCache(x0, null_value, x10, x11, x12, x13, &call_runtime); 1055 __ CheckEnumCache(x0, null_value, x10, x11, x12, x13, &call_runtime);
1057 1056
1058 // The enum cache is valid. Load the map of the object being 1057 // The enum cache is valid. Load the map of the object being
1059 // iterated over and use the cache for the iteration. 1058 // iterated over and use the cache for the iteration.
1060 Label use_cache; 1059 Label use_cache;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 // We got a fixed array in register x0. Iterate through that. 1097 // We got a fixed array in register x0. Iterate through that.
1099 __ Bind(&fixed_array); 1098 __ Bind(&fixed_array);
1100 1099
1101 __ EmitLoadTypeFeedbackVector(x1); 1100 __ EmitLoadTypeFeedbackVector(x1);
1102 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1101 __ Mov(x10, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1103 int vector_index = SmiFromSlot(slot)->value(); 1102 int vector_index = SmiFromSlot(slot)->value();
1104 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(vector_index))); 1103 __ Str(x10, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(vector_index)));
1105 1104
1106 __ Mov(x1, Smi::FromInt(1)); // Smi indicates slow check. 1105 __ Mov(x1, Smi::FromInt(1)); // Smi indicates slow check.
1107 __ Peek(x10, 0); // Get enumerated object. 1106 __ Peek(x10, 0); // Get enumerated object.
1108 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); 1107 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE);
1109 // TODO(all): similar check was done already. Can we avoid it here? 1108 __ CompareObjectType(x10, x11, x12, JS_PROXY_TYPE);
1110 __ CompareObjectType(x10, x11, x12, LAST_JS_PROXY_TYPE);
1111 DCHECK(Smi::FromInt(0) == 0); 1109 DCHECK(Smi::FromInt(0) == 0);
1112 __ CzeroX(x1, le); // Zero indicates proxy. 1110 __ CzeroX(x1, eq); // Zero indicates proxy.
1113 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset)); 1111 __ Ldr(x2, FieldMemOperand(x0, FixedArray::kLengthOffset));
1114 // Smi and array, fixed array length (as smi) and initial index. 1112 // Smi and array, fixed array length (as smi) and initial index.
1115 __ Push(x1, x0, x2, xzr); 1113 __ Push(x1, x0, x2, xzr);
1116 1114
1117 // Generate code for doing the condition check. 1115 // Generate code for doing the condition check.
1118 __ Bind(&loop); 1116 __ Bind(&loop);
1119 SetExpressionAsStatementPosition(stmt->each()); 1117 SetExpressionAsStatementPosition(stmt->each());
1120 1118
1121 // Load the current count to x0, load the length to x1. 1119 // Load the current count to x0, load the length to x1.
1122 __ PeekPair(x0, x1, 0); 1120 __ PeekPair(x0, x1, 0);
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
2958 VisitForAccumulatorValue(args->at(0)); 2956 VisitForAccumulatorValue(args->at(0));
2959 2957
2960 Label materialize_true, materialize_false; 2958 Label materialize_true, materialize_false;
2961 Label* if_true = NULL; 2959 Label* if_true = NULL;
2962 Label* if_false = NULL; 2960 Label* if_false = NULL;
2963 Label* fall_through = NULL; 2961 Label* fall_through = NULL;
2964 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 2962 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
2965 &if_false, &fall_through); 2963 &if_false, &fall_through);
2966 2964
2967 __ JumpIfSmi(x0, if_false); 2965 __ JumpIfSmi(x0, if_false);
2968 Register map = x10; 2966 __ CompareObjectType(x0, x10, x11, JS_PROXY_TYPE);
2969 Register type_reg = x11;
2970 __ Ldr(map, FieldMemOperand(x0, HeapObject::kMapOffset));
2971 __ Ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
2972 __ Sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE));
2973 __ Cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE));
2974 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 2967 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
2975 Split(ls, if_true, if_false, fall_through); 2968 Split(eq, if_true, if_false, fall_through);
2976 2969
2977 context()->Plug(if_true, if_false); 2970 context()->Plug(if_true, if_false);
2978 } 2971 }
2979 2972
2980 2973
2981 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 2974 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
2982 ZoneList<Expression*>* args = expr->arguments(); 2975 ZoneList<Expression*>* args = expr->arguments();
2983 DCHECK(args->length() == 2); 2976 DCHECK(args->length() == 2);
2984 2977
2985 // Load the two objects into registers and perform the comparison. 2978 // Load the two objects into registers and perform the comparison.
(...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after
4941 } 4934 }
4942 4935
4943 return INTERRUPT; 4936 return INTERRUPT;
4944 } 4937 }
4945 4938
4946 4939
4947 } // namespace internal 4940 } // namespace internal
4948 } // namespace v8 4941 } // namespace v8
4949 4942
4950 #endif // V8_TARGET_ARCH_ARM64 4943 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698