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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased version. Created 9 years, 1 month 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 2166
2167 // Patch the receiver on the stack with the global proxy if 2167 // Patch the receiver on the stack with the global proxy if
2168 // necessary. 2168 // necessary.
2169 if (object->IsGlobalObject()) { 2169 if (object->IsGlobalObject()) {
2170 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset)); 2170 __ mov(edx, FieldOperand(edx, GlobalObject::kGlobalReceiverOffset));
2171 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx); 2171 __ mov(Operand(esp, (argc + 1) * kPointerSize), edx);
2172 } 2172 }
2173 break; 2173 break;
2174 2174
2175 case STRING_CHECK: 2175 case STRING_CHECK:
2176 if (function->IsBuiltin() || function->shared()->strict_mode()) { 2176 if (function->IsBuiltin() ||
2177 function->shared()->is_strict_or_extended_mode()) {
2177 // Check that the object is a string or a symbol. 2178 // Check that the object is a string or a symbol.
2178 __ CmpObjectType(edx, FIRST_NONSTRING_TYPE, eax); 2179 __ CmpObjectType(edx, FIRST_NONSTRING_TYPE, eax);
2179 __ j(above_equal, &miss); 2180 __ j(above_equal, &miss);
2180 // Check that the maps starting from the prototype haven't changed. 2181 // Check that the maps starting from the prototype haven't changed.
2181 GenerateDirectLoadGlobalFunctionPrototype( 2182 GenerateDirectLoadGlobalFunctionPrototype(
2182 masm(), Context::STRING_FUNCTION_INDEX, eax, &miss); 2183 masm(), Context::STRING_FUNCTION_INDEX, eax, &miss);
2183 CheckPrototypes( 2184 CheckPrototypes(
2184 Handle<JSObject>(JSObject::cast(object->GetPrototype())), 2185 Handle<JSObject>(JSObject::cast(object->GetPrototype())),
2185 eax, holder, ebx, edx, edi, name, &miss); 2186 eax, holder, ebx, edx, edi, name, &miss);
2186 } else { 2187 } else {
2187 // Calling non-strict non-builtins with a value as the receiver 2188 // Calling non-strict non-builtins with a value as the receiver
2188 // requires boxing. 2189 // requires boxing.
2189 __ jmp(&miss); 2190 __ jmp(&miss);
2190 } 2191 }
2191 break; 2192 break;
2192 2193
2193 case NUMBER_CHECK: 2194 case NUMBER_CHECK:
2194 if (function->IsBuiltin() || function->shared()->strict_mode()) { 2195 if (function->IsBuiltin() ||
2196 function->shared()->is_strict_or_extended_mode()) {
2195 Label fast; 2197 Label fast;
2196 // Check that the object is a smi or a heap number. 2198 // Check that the object is a smi or a heap number.
2197 __ JumpIfSmi(edx, &fast); 2199 __ JumpIfSmi(edx, &fast);
2198 __ CmpObjectType(edx, HEAP_NUMBER_TYPE, eax); 2200 __ CmpObjectType(edx, HEAP_NUMBER_TYPE, eax);
2199 __ j(not_equal, &miss); 2201 __ j(not_equal, &miss);
2200 __ bind(&fast); 2202 __ bind(&fast);
2201 // Check that the maps starting from the prototype haven't changed. 2203 // Check that the maps starting from the prototype haven't changed.
2202 GenerateDirectLoadGlobalFunctionPrototype( 2204 GenerateDirectLoadGlobalFunctionPrototype(
2203 masm(), Context::NUMBER_FUNCTION_INDEX, eax, &miss); 2205 masm(), Context::NUMBER_FUNCTION_INDEX, eax, &miss);
2204 CheckPrototypes( 2206 CheckPrototypes(
2205 Handle<JSObject>(JSObject::cast(object->GetPrototype())), 2207 Handle<JSObject>(JSObject::cast(object->GetPrototype())),
2206 eax, holder, ebx, edx, edi, name, &miss); 2208 eax, holder, ebx, edx, edi, name, &miss);
2207 } else { 2209 } else {
2208 // Calling non-strict non-builtins with a value as the receiver 2210 // Calling non-strict non-builtins with a value as the receiver
2209 // requires boxing. 2211 // requires boxing.
2210 __ jmp(&miss); 2212 __ jmp(&miss);
2211 } 2213 }
2212 break; 2214 break;
2213 2215
2214 case BOOLEAN_CHECK: 2216 case BOOLEAN_CHECK:
2215 if (function->IsBuiltin() || function->shared()->strict_mode()) { 2217 if (function->IsBuiltin() ||
2218 function->shared()->is_strict_or_extended_mode()) {
2216 Label fast; 2219 Label fast;
2217 // Check that the object is a boolean. 2220 // Check that the object is a boolean.
2218 __ cmp(edx, factory()->true_value()); 2221 __ cmp(edx, factory()->true_value());
2219 __ j(equal, &fast); 2222 __ j(equal, &fast);
2220 __ cmp(edx, factory()->false_value()); 2223 __ cmp(edx, factory()->false_value());
2221 __ j(not_equal, &miss); 2224 __ j(not_equal, &miss);
2222 __ bind(&fast); 2225 __ bind(&fast);
2223 // Check that the maps starting from the prototype haven't changed. 2226 // Check that the maps starting from the prototype haven't changed.
2224 GenerateDirectLoadGlobalFunctionPrototype( 2227 GenerateDirectLoadGlobalFunctionPrototype(
2225 masm(), Context::BOOLEAN_FUNCTION_INDEX, eax, &miss); 2228 masm(), Context::BOOLEAN_FUNCTION_INDEX, eax, &miss);
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
3851 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 3854 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
3852 __ jmp(ic_miss, RelocInfo::CODE_TARGET); 3855 __ jmp(ic_miss, RelocInfo::CODE_TARGET);
3853 } 3856 }
3854 3857
3855 3858
3856 #undef __ 3859 #undef __
3857 3860
3858 } } // namespace v8::internal 3861 } } // namespace v8::internal
3859 3862
3860 #endif // V8_TARGET_ARCH_IA32 3863 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698