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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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_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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 __ b(ge, &done_convert); 1045 __ b(ge, &done_convert);
1046 __ bind(&convert); 1046 __ bind(&convert);
1047 ToObjectStub stub(isolate()); 1047 ToObjectStub stub(isolate());
1048 __ CallStub(&stub); 1048 __ CallStub(&stub);
1049 __ bind(&done_convert); 1049 __ bind(&done_convert);
1050 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); 1050 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG);
1051 __ push(r0); 1051 __ push(r0);
1052 1052
1053 // Check for proxies. 1053 // Check for proxies.
1054 Label call_runtime; 1054 Label call_runtime;
1055 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); 1055 __ CompareObjectType(r0, r1, r1, JS_PROXY_TYPE);
1056 __ CompareObjectType(r0, r1, r1, LAST_JS_PROXY_TYPE); 1056 __ b(eq, &call_runtime);
1057 __ b(le, &call_runtime);
1058 1057
1059 // Check cache validity in generated code. This is a fast case for 1058 // Check cache validity in generated code. This is a fast case for
1060 // the JSObject::IsSimpleEnum cache validity checks. If we cannot 1059 // the JSObject::IsSimpleEnum cache validity checks. If we cannot
1061 // guarantee cache validity, call the runtime system to check cache 1060 // guarantee cache validity, call the runtime system to check cache
1062 // validity or get the property names in a fixed array. 1061 // validity or get the property names in a fixed array.
1063 __ CheckEnumCache(null_value, &call_runtime); 1062 __ CheckEnumCache(null_value, &call_runtime);
1064 1063
1065 // The enum cache is valid. Load the map of the object being 1064 // The enum cache is valid. Load the map of the object being
1066 // iterated over and use the cache for the iteration. 1065 // iterated over and use the cache for the iteration.
1067 Label use_cache; 1066 Label use_cache;
(...skipping 42 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(r1); 1112 __ EmitLoadTypeFeedbackVector(r1);
1114 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1113 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1115 int vector_index = SmiFromSlot(slot)->value(); 1114 int vector_index = SmiFromSlot(slot)->value();
1116 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index))); 1115 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index)));
1117 1116
1118 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check 1117 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check
1119 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1118 __ ldr(r2, 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 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE); 1120 __ CompareObjectType(r2, r3, r3, JS_PROXY_TYPE);
1122 __ b(gt, &non_proxy); 1121 __ b(gt, &non_proxy);
1123 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy 1122 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy
1124 __ bind(&non_proxy); 1123 __ bind(&non_proxy);
1125 __ Push(r1, r0); // Smi and array 1124 __ Push(r1, r0); // Smi and array
1126 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset)); 1125 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset));
1127 __ mov(r0, Operand(Smi::FromInt(0))); 1126 __ mov(r0, Operand(Smi::FromInt(0)));
1128 __ Push(r1, r0); // Fixed array length (as smi) and initial index. 1127 __ Push(r1, r0); // 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);
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
3255 VisitForAccumulatorValue(args->at(0)); 3254 VisitForAccumulatorValue(args->at(0));
3256 3255
3257 Label materialize_true, materialize_false; 3256 Label materialize_true, materialize_false;
3258 Label* if_true = NULL; 3257 Label* if_true = NULL;
3259 Label* if_false = NULL; 3258 Label* if_false = NULL;
3260 Label* fall_through = NULL; 3259 Label* fall_through = NULL;
3261 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 3260 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3262 &if_false, &fall_through); 3261 &if_false, &fall_through);
3263 3262
3264 __ JumpIfSmi(r0, if_false); 3263 __ JumpIfSmi(r0, if_false);
3265 Register map = r1; 3264 __ CompareObjectType(r0, r1, r1, JS_PROXY_TYPE);
3266 Register type_reg = r2;
3267 __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset));
3268 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3269 __ sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE));
3270 __ cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE));
3271 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3265 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3272 Split(ls, if_true, if_false, fall_through); 3266 Split(eq, if_true, if_false, fall_through);
3273 3267
3274 context()->Plug(if_true, if_false); 3268 context()->Plug(if_true, if_false);
3275 } 3269 }
3276 3270
3277 3271
3278 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 3272 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
3279 ZoneList<Expression*>* args = expr->arguments(); 3273 ZoneList<Expression*>* args = expr->arguments();
3280 DCHECK(args->length() == 2); 3274 DCHECK(args->length() == 2);
3281 3275
3282 // Load the two objects into registers and perform the comparison. 3276 // Load the two objects into registers and perform the comparison.
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
4973 DCHECK(interrupt_address == 4967 DCHECK(interrupt_address ==
4974 isolate->builtins()->OsrAfterStackCheck()->entry()); 4968 isolate->builtins()->OsrAfterStackCheck()->entry());
4975 return OSR_AFTER_STACK_CHECK; 4969 return OSR_AFTER_STACK_CHECK;
4976 } 4970 }
4977 4971
4978 4972
4979 } // namespace internal 4973 } // namespace internal
4980 } // namespace v8 4974 } // namespace v8
4981 4975
4982 #endif // V8_TARGET_ARCH_ARM 4976 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698