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

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

Issue 639883002: Add more missing deopts (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 // Convert the object to a JS object. 1109 // Convert the object to a JS object.
1110 Label convert, done_convert; 1110 Label convert, done_convert;
1111 __ JumpIfSmi(a0, &convert); 1111 __ JumpIfSmi(a0, &convert);
1112 __ GetObjectType(a0, a1, a1); 1112 __ GetObjectType(a0, a1, a1);
1113 __ Branch(&done_convert, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); 1113 __ Branch(&done_convert, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE));
1114 __ bind(&convert); 1114 __ bind(&convert);
1115 __ push(a0); 1115 __ push(a0);
1116 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); 1116 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
1117 __ mov(a0, v0); 1117 __ mov(a0, v0);
1118 __ bind(&done_convert); 1118 __ bind(&done_convert);
1119 PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG);
1119 __ push(a0); 1120 __ push(a0);
1120 1121
1121 // Check for proxies. 1122 // Check for proxies.
1122 Label call_runtime; 1123 Label call_runtime;
1123 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); 1124 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
1124 __ GetObjectType(a0, a1, a1); 1125 __ GetObjectType(a0, a1, a1);
1125 __ Branch(&call_runtime, le, a1, Operand(LAST_JS_PROXY_TYPE)); 1126 __ Branch(&call_runtime, le, a1, Operand(LAST_JS_PROXY_TYPE));
1126 1127
1127 // Check cache validity in generated code. This is a fast case for 1128 // Check cache validity in generated code. This is a fast case for
1128 // the JSObject::IsSimpleEnum cache validity checks. If we cannot 1129 // the JSObject::IsSimpleEnum cache validity checks. If we cannot
1129 // guarantee cache validity, call the runtime system to check cache 1130 // guarantee cache validity, call the runtime system to check cache
1130 // validity or get the property names in a fixed array. 1131 // validity or get the property names in a fixed array.
1131 __ CheckEnumCache(null_value, &call_runtime); 1132 __ CheckEnumCache(null_value, &call_runtime);
1132 1133
1133 // The enum cache is valid. Load the map of the object being 1134 // The enum cache is valid. Load the map of the object being
1134 // iterated over and use the cache for the iteration. 1135 // iterated over and use the cache for the iteration.
1135 Label use_cache; 1136 Label use_cache;
1136 __ ld(v0, FieldMemOperand(a0, HeapObject::kMapOffset)); 1137 __ ld(v0, FieldMemOperand(a0, HeapObject::kMapOffset));
1137 __ Branch(&use_cache); 1138 __ Branch(&use_cache);
1138 1139
1139 // Get the set of properties to enumerate. 1140 // Get the set of properties to enumerate.
1140 __ bind(&call_runtime); 1141 __ bind(&call_runtime);
1141 __ push(a0); // Duplicate the enumerable object on the stack. 1142 __ push(a0); // Duplicate the enumerable object on the stack.
1142 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1); 1143 __ CallRuntime(Runtime::kGetPropertyNamesFast, 1);
1144 PrepareForBailoutForId(stmt->EnumId(), TOS_REG);
1143 1145
1144 // If we got a map from the runtime call, we can do a fast 1146 // If we got a map from the runtime call, we can do a fast
1145 // modification check. Otherwise, we got a fixed array, and we have 1147 // modification check. Otherwise, we got a fixed array, and we have
1146 // to do a slow check. 1148 // to do a slow check.
1147 Label fixed_array; 1149 Label fixed_array;
1148 __ ld(a2, FieldMemOperand(v0, HeapObject::kMapOffset)); 1150 __ ld(a2, FieldMemOperand(v0, HeapObject::kMapOffset));
1149 __ LoadRoot(at, Heap::kMetaMapRootIndex); 1151 __ LoadRoot(at, Heap::kMetaMapRootIndex);
1150 __ Branch(&fixed_array, ne, a2, Operand(at)); 1152 __ Branch(&fixed_array, ne, a2, Operand(at));
1151 1153
1152 // We got a map in register v0. Get the enumeration cache from it. 1154 // We got a map in register v0. Get the enumeration cache from it.
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 int properties_count = constant_properties->length() / 2; 1675 int properties_count = constant_properties->length() / 2;
1674 if (expr->may_store_doubles() || expr->depth() > 1 || 1676 if (expr->may_store_doubles() || expr->depth() > 1 ||
1675 masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements || 1677 masm()->serializer_enabled() || flags != ObjectLiteral::kFastElements ||
1676 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) { 1678 properties_count > FastCloneShallowObjectStub::kMaximumClonedProperties) {
1677 __ Push(a3, a2, a1, a0); 1679 __ Push(a3, a2, a1, a0);
1678 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); 1680 __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
1679 } else { 1681 } else {
1680 FastCloneShallowObjectStub stub(isolate(), properties_count); 1682 FastCloneShallowObjectStub stub(isolate(), properties_count);
1681 __ CallStub(&stub); 1683 __ CallStub(&stub);
1682 } 1684 }
1685 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG);
1683 1686
1684 // If result_saved is true the result is on top of the stack. If 1687 // If result_saved is true the result is on top of the stack. If
1685 // result_saved is false the result is in v0. 1688 // result_saved is false the result is in v0.
1686 bool result_saved = false; 1689 bool result_saved = false;
1687 1690
1688 // Mark all computed expressions that are bound to a key that 1691 // Mark all computed expressions that are bound to a key that
1689 // is shadowed by a later occurrence of the same key. For the 1692 // is shadowed by a later occurrence of the same key. For the
1690 // marked expressions, no store code is emitted. 1693 // marked expressions, no store code is emitted.
1691 expr->CalculateEmitStore(zone()); 1694 expr->CalculateEmitStore(zone());
1692 1695
(...skipping 3514 matching lines...) Expand 10 before | Expand all | Expand 10 after
5207 Assembler::target_address_at(pc_immediate_load_address)) == 5210 Assembler::target_address_at(pc_immediate_load_address)) ==
5208 reinterpret_cast<uint64_t>( 5211 reinterpret_cast<uint64_t>(
5209 isolate->builtins()->OsrAfterStackCheck()->entry())); 5212 isolate->builtins()->OsrAfterStackCheck()->entry()));
5210 return OSR_AFTER_STACK_CHECK; 5213 return OSR_AFTER_STACK_CHECK;
5211 } 5214 }
5212 5215
5213 5216
5214 } } // namespace v8::internal 5217 } } // namespace v8::internal
5215 5218
5216 #endif // V8_TARGET_ARCH_MIPS64 5219 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698