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

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: 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/factory.cc ('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 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 __ b(ge, &done_convert); 1039 __ b(ge, &done_convert);
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(r0); 1045 __ push(r0);
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 __ CompareObjectType(r0, r1, r1, JS_PROXY_TYPE);
1050 __ CompareObjectType(r0, r1, r1, LAST_JS_PROXY_TYPE); 1050 __ b(eq, &call_runtime);
1051 __ b(le, &call_runtime);
1052 1051
1053 // Check cache validity in generated code. This is a fast case for 1052 // Check cache validity in generated code. This is a fast case for
1054 // the JSObject::IsSimpleEnum cache validity checks. If we cannot 1053 // the JSObject::IsSimpleEnum cache validity checks. If we cannot
1055 // guarantee cache validity, call the runtime system to check cache 1054 // guarantee cache validity, call the runtime system to check cache
1056 // validity or get the property names in a fixed array. 1055 // validity or get the property names in a fixed array.
1057 __ CheckEnumCache(null_value, &call_runtime); 1056 __ CheckEnumCache(null_value, &call_runtime);
1058 1057
1059 // The enum cache is valid. Load the map of the object being 1058 // The enum cache is valid. Load the map of the object being
1060 // iterated over and use the cache for the iteration. 1059 // iterated over and use the cache for the iteration.
1061 Label use_cache; 1060 Label use_cache;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 Label non_proxy; 1103 Label non_proxy;
1105 __ bind(&fixed_array); 1104 __ bind(&fixed_array);
1106 1105
1107 __ EmitLoadTypeFeedbackVector(r1); 1106 __ EmitLoadTypeFeedbackVector(r1);
1108 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1107 __ mov(r2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1109 int vector_index = SmiFromSlot(slot)->value(); 1108 int vector_index = SmiFromSlot(slot)->value();
1110 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index))); 1109 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(vector_index)));
1111 1110
1112 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check 1111 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check
1113 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1112 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1114 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); 1113 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE);
1115 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE); 1114 __ CompareObjectType(r2, r3, r3, JS_PROXY_TYPE);
1116 __ b(gt, &non_proxy); 1115 __ b(gt, &non_proxy);
1117 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy 1116 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy
1118 __ bind(&non_proxy); 1117 __ bind(&non_proxy);
1119 __ Push(r1, r0); // Smi and array 1118 __ Push(r1, r0); // Smi and array
1120 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset)); 1119 __ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset));
1121 __ mov(r0, Operand(Smi::FromInt(0))); 1120 __ mov(r0, Operand(Smi::FromInt(0)));
1122 __ Push(r1, r0); // Fixed array length (as smi) and initial index. 1121 __ Push(r1, r0); // Fixed array length (as smi) and initial index.
1123 1122
1124 // Generate code for doing the condition check. 1123 // Generate code for doing the condition check.
1125 __ bind(&loop); 1124 __ bind(&loop);
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after
3249 VisitForAccumulatorValue(args->at(0)); 3248 VisitForAccumulatorValue(args->at(0));
3250 3249
3251 Label materialize_true, materialize_false; 3250 Label materialize_true, materialize_false;
3252 Label* if_true = NULL; 3251 Label* if_true = NULL;
3253 Label* if_false = NULL; 3252 Label* if_false = NULL;
3254 Label* fall_through = NULL; 3253 Label* fall_through = NULL;
3255 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 3254 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3256 &if_false, &fall_through); 3255 &if_false, &fall_through);
3257 3256
3258 __ JumpIfSmi(r0, if_false); 3257 __ JumpIfSmi(r0, if_false);
3259 Register map = r1; 3258 __ CompareObjectType(r0, r1, r1, JS_PROXY_TYPE);
3260 Register type_reg = r2;
3261 __ ldr(map, FieldMemOperand(r0, HeapObject::kMapOffset));
3262 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3263 __ sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE));
3264 __ cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE));
3265 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3259 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3266 Split(ls, if_true, if_false, fall_through); 3260 Split(eq, if_true, if_false, fall_through);
3267 3261
3268 context()->Plug(if_true, if_false); 3262 context()->Plug(if_true, if_false);
3269 } 3263 }
3270 3264
3271 3265
3272 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 3266 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
3273 ZoneList<Expression*>* args = expr->arguments(); 3267 ZoneList<Expression*>* args = expr->arguments();
3274 DCHECK(args->length() == 2); 3268 DCHECK(args->length() == 2);
3275 3269
3276 // Load the two objects into registers and perform the comparison. 3270 // Load the two objects into registers and perform the comparison.
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
4967 DCHECK(interrupt_address == 4961 DCHECK(interrupt_address ==
4968 isolate->builtins()->OsrAfterStackCheck()->entry()); 4962 isolate->builtins()->OsrAfterStackCheck()->entry());
4969 return OSR_AFTER_STACK_CHECK; 4963 return OSR_AFTER_STACK_CHECK;
4970 } 4964 }
4971 4965
4972 4966
4973 } // namespace internal 4967 } // namespace internal
4974 } // namespace v8 4968 } // namespace v8
4975 4969
4976 #endif // V8_TARGET_ARCH_ARM 4970 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698