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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 __ bge(&done_convert); 996 __ bge(&done_convert);
997 __ bind(&convert); 997 __ bind(&convert);
998 ToObjectStub stub(isolate()); 998 ToObjectStub stub(isolate());
999 __ CallStub(&stub); 999 __ CallStub(&stub);
1000 __ bind(&done_convert); 1000 __ bind(&done_convert);
1001 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); 1001 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG);
1002 __ push(r3); 1002 __ push(r3);
1003 1003
1004 // Check for proxies. 1004 // Check for proxies.
1005 Label call_runtime; 1005 Label call_runtime;
1006 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); 1006 __ CompareObjectType(r3, r4, r4, JS_PROXY_TYPE);
1007 __ CompareObjectType(r3, r4, r4, LAST_JS_PROXY_TYPE); 1007 __ beq(&call_runtime);
1008 __ ble(&call_runtime);
1009 1008
1010 // Check cache validity in generated code. This is a fast case for 1009 // Check cache validity in generated code. This is a fast case for
1011 // the JSObject::IsSimpleEnum cache validity checks. If we cannot 1010 // the JSObject::IsSimpleEnum cache validity checks. If we cannot
1012 // guarantee cache validity, call the runtime system to check cache 1011 // guarantee cache validity, call the runtime system to check cache
1013 // validity or get the property names in a fixed array. 1012 // validity or get the property names in a fixed array.
1014 __ CheckEnumCache(null_value, &call_runtime); 1013 __ CheckEnumCache(null_value, &call_runtime);
1015 1014
1016 // The enum cache is valid. Load the map of the object being 1015 // The enum cache is valid. Load the map of the object being
1017 // iterated over and use the cache for the iteration. 1016 // iterated over and use the cache for the iteration.
1018 Label use_cache; 1017 Label use_cache;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 __ bind(&fixed_array); 1062 __ bind(&fixed_array);
1064 1063
1065 __ EmitLoadTypeFeedbackVector(r4); 1064 __ EmitLoadTypeFeedbackVector(r4);
1066 __ mov(r5, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1065 __ mov(r5, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1067 int vector_index = SmiFromSlot(slot)->value(); 1066 int vector_index = SmiFromSlot(slot)->value();
1068 __ StoreP( 1067 __ StoreP(
1069 r5, FieldMemOperand(r4, FixedArray::OffsetOfElementAt(vector_index)), r0); 1068 r5, FieldMemOperand(r4, FixedArray::OffsetOfElementAt(vector_index)), r0);
1070 1069
1071 __ LoadSmiLiteral(r4, Smi::FromInt(1)); // Smi indicates slow check 1070 __ LoadSmiLiteral(r4, Smi::FromInt(1)); // Smi indicates slow check
1072 __ LoadP(r5, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1071 __ LoadP(r5, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1073 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); 1072 STATIC_ASSERT(JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE);
1074 __ CompareObjectType(r5, r6, r6, LAST_JS_PROXY_TYPE); 1073 __ CompareObjectType(r5, r6, r6, JS_PROXY_TYPE);
1075 __ bgt(&non_proxy); 1074 __ bgt(&non_proxy);
1076 __ LoadSmiLiteral(r4, Smi::FromInt(0)); // Zero indicates proxy 1075 __ LoadSmiLiteral(r4, Smi::FromInt(0)); // Zero indicates proxy
1077 __ bind(&non_proxy); 1076 __ bind(&non_proxy);
1078 __ Push(r4, r3); // Smi and array 1077 __ Push(r4, r3); // Smi and array
1079 __ LoadP(r4, FieldMemOperand(r3, FixedArray::kLengthOffset)); 1078 __ LoadP(r4, FieldMemOperand(r3, FixedArray::kLengthOffset));
1080 __ LoadSmiLiteral(r3, Smi::FromInt(0)); 1079 __ LoadSmiLiteral(r3, Smi::FromInt(0));
1081 __ Push(r4, r3); // Fixed array length (as smi) and initial index. 1080 __ Push(r4, r3); // Fixed array length (as smi) and initial index.
1082 1081
1083 // Generate code for doing the condition check. 1082 // Generate code for doing the condition check.
1084 __ bind(&loop); 1083 __ bind(&loop);
(...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after
3246 VisitForAccumulatorValue(args->at(0)); 3245 VisitForAccumulatorValue(args->at(0));
3247 3246
3248 Label materialize_true, materialize_false; 3247 Label materialize_true, materialize_false;
3249 Label* if_true = NULL; 3248 Label* if_true = NULL;
3250 Label* if_false = NULL; 3249 Label* if_false = NULL;
3251 Label* fall_through = NULL; 3250 Label* fall_through = NULL;
3252 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, 3251 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3253 &if_false, &fall_through); 3252 &if_false, &fall_through);
3254 3253
3255 __ JumpIfSmi(r3, if_false); 3254 __ JumpIfSmi(r3, if_false);
3256 Register map = r4; 3255 __ CompareObjectType(r3, r4, r4, JS_PROXY_TYPE);
3257 Register type_reg = r5;
3258 __ LoadP(map, FieldMemOperand(r3, HeapObject::kMapOffset));
3259 __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3260 __ subi(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE));
3261 __ cmpli(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE));
3262 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3256 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3263 Split(le, if_true, if_false, fall_through); 3257 Split(eq, if_true, if_false, fall_through);
3264 3258
3265 context()->Plug(if_true, if_false); 3259 context()->Plug(if_true, if_false);
3266 } 3260 }
3267 3261
3268 3262
3269 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { 3263 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) {
3270 ZoneList<Expression*>* args = expr->arguments(); 3264 ZoneList<Expression*>* args = expr->arguments();
3271 DCHECK(args->length() == 2); 3265 DCHECK(args->length() == 2);
3272 3266
3273 // Load the two objects into registers and perform the comparison. 3267 // Load the two objects into registers and perform the comparison.
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
4905 return ON_STACK_REPLACEMENT; 4899 return ON_STACK_REPLACEMENT;
4906 } 4900 }
4907 4901
4908 DCHECK(interrupt_address == 4902 DCHECK(interrupt_address ==
4909 isolate->builtins()->OsrAfterStackCheck()->entry()); 4903 isolate->builtins()->OsrAfterStackCheck()->entry());
4910 return OSR_AFTER_STACK_CHECK; 4904 return OSR_AFTER_STACK_CHECK;
4911 } 4905 }
4912 } // namespace internal 4906 } // namespace internal
4913 } // namespace v8 4907 } // namespace v8
4914 #endif // V8_TARGET_ARCH_PPC 4908 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698