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

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

Issue 1496503002: [runtime] [proxy] removing JSFunctionProxy and related code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: doh 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
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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 __ bind(&convert); 1048 __ bind(&convert);
1049 ToObjectStub stub(isolate()); 1049 ToObjectStub stub(isolate());
1050 __ CallStub(&stub); 1050 __ CallStub(&stub);
1051 __ mov(a0, v0); 1051 __ mov(a0, v0);
1052 __ bind(&done_convert); 1052 __ bind(&done_convert);
1053 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); 1053 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG);
1054 __ push(a0); 1054 __ push(a0);
1055 1055
1056 // Check for proxies. 1056 // Check for proxies.
1057 Label call_runtime; 1057 Label call_runtime;
1058 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE);
1059 __ GetObjectType(a0, a1, a1); 1058 __ GetObjectType(a0, a1, a1);
1060 __ Branch(&call_runtime, le, a1, Operand(LAST_JS_PROXY_TYPE)); 1059 __ Branch(&call_runtime, eq, a1, Operand(JS_PROXY_TYPE));
1061 1060
1062 // Check cache validity in generated code. This is a fast case for 1061 // Check cache validity in generated code. This is a fast case for
1063 // the JSObject::IsSimpleEnum cache validity checks. If we cannot 1062 // the JSObject::IsSimpleEnum cache validity checks. If we cannot
1064 // guarantee cache validity, call the runtime system to check cache 1063 // guarantee cache validity, call the runtime system to check cache
1065 // validity or get the property names in a fixed array. 1064 // validity or get the property names in a fixed array.
1066 __ CheckEnumCache(null_value, &call_runtime); 1065 __ CheckEnumCache(null_value, &call_runtime);
1067 1066
1068 // The enum cache is valid. Load the map of the object being 1067 // The enum cache is valid. Load the map of the object being
1069 // iterated over and use the cache for the iteration. 1068 // iterated over and use the cache for the iteration.
1070 Label use_cache; 1069 Label use_cache;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 Label non_proxy; 1109 Label non_proxy;
1111 __ bind(&fixed_array); 1110 __ bind(&fixed_array);
1112 1111
1113 __ EmitLoadTypeFeedbackVector(a1); 1112 __ EmitLoadTypeFeedbackVector(a1);
1114 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1113 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1115 int vector_index = SmiFromSlot(slot)->value(); 1114 int vector_index = SmiFromSlot(slot)->value();
1116 __ sd(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index))); 1115 __ sd(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index)));
1117 1116
1118 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check 1117 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check
1119 __ ld(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1118 __ ld(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1120 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); 1119 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE);
1121 __ GetObjectType(a2, a3, a3); 1120 __ GetObjectType(a2, a3, a3);
1122 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE)); 1121 __ Branch(&non_proxy, gt, a3, Operand(JS_PROXY_TYPE));
1123 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy 1122 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy
1124 __ bind(&non_proxy); 1123 __ bind(&non_proxy);
1125 __ Push(a1, v0); // Smi and array 1124 __ Push(a1, v0); // Smi and array
1126 __ ld(a1, FieldMemOperand(v0, FixedArray::kLengthOffset)); 1125 __ ld(a1, FieldMemOperand(v0, FixedArray::kLengthOffset));
1127 __ li(a0, Operand(Smi::FromInt(0))); 1126 __ li(a0, Operand(Smi::FromInt(0)));
1128 __ Push(a1, a0); // Fixed array length (as smi) and initial index. 1127 __ Push(a1, a0); // Fixed array length (as smi) and initial index.
1129 1128
1130 // Generate code for doing the condition check. 1129 // Generate code for doing the condition check.
1131 __ bind(&loop); 1130 __ bind(&loop);
1132 SetExpressionAsStatementPosition(stmt->each()); 1131 SetExpressionAsStatementPosition(stmt->each());
(...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 VisitForAccumulatorValue(args->at(0)); 3260 VisitForAccumulatorValue(args->at(0));
3262 3261
3263 Label materialize_true, materialize_false; 3262 Label materialize_true, materialize_false;
3264 Label* if_true = NULL; 3263 Label* if_true = NULL;
3265 Label* if_false = NULL; 3264 Label* if_false = NULL;
3266 Label* fall_through = NULL; 3265 Label* fall_through = NULL;
3267 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 3266 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3268 &if_false, &fall_through); 3267 &if_false, &fall_through);
3269 3268
3270 __ JumpIfSmi(v0, if_false); 3269 __ JumpIfSmi(v0, if_false);
3271 Register map = a1; 3270 __ GetObjectType(v0, a1, a1);
3272 Register type_reg = a2;
3273 __ GetObjectType(v0, map, type_reg);
3274 __ Subu(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE));
3275 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3271 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3276 Split(ls, type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE), 3272 Split(eq, a1, Operand(JS_PROXY_TYPE), if_true, if_false, fall_through);
3277 if_true, if_false, fall_through);
3278 3273
3279 context()->Plug(if_true, if_false); 3274 context()->Plug(if_true, if_false);
3280 } 3275 }
3281 3276
3282 3277
3283 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 3278 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
3284 ZoneList<Expression*>* args = expr->arguments(); 3279 ZoneList<Expression*>* args = expr->arguments();
3285 DCHECK(args->length() == 2); 3280 DCHECK(args->length() == 2);
3286 3281
3287 // Load the two objects into registers and perform the comparison. 3282 // Load the two objects into registers and perform the comparison.
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after
4946 reinterpret_cast<uint64_t>( 4941 reinterpret_cast<uint64_t>(
4947 isolate->builtins()->OsrAfterStackCheck()->entry())); 4942 isolate->builtins()->OsrAfterStackCheck()->entry()));
4948 return OSR_AFTER_STACK_CHECK; 4943 return OSR_AFTER_STACK_CHECK;
4949 } 4944 }
4950 4945
4951 4946
4952 } // namespace internal 4947 } // namespace internal
4953 } // namespace v8 4948 } // namespace v8
4954 4949
4955 #endif // V8_TARGET_ARCH_MIPS64 4950 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698