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

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

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments. 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
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/objects.h » ('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 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 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 2275
2276 // Patch the receiver on the stack with the global proxy if 2276 // Patch the receiver on the stack with the global proxy if
2277 // necessary. 2277 // necessary.
2278 if (object->IsGlobalObject()) { 2278 if (object->IsGlobalObject()) {
2279 __ lw(a3, FieldMemOperand(a1, GlobalObject::kGlobalReceiverOffset)); 2279 __ lw(a3, FieldMemOperand(a1, GlobalObject::kGlobalReceiverOffset));
2280 __ sw(a3, MemOperand(sp, argc * kPointerSize)); 2280 __ sw(a3, MemOperand(sp, argc * kPointerSize));
2281 } 2281 }
2282 break; 2282 break;
2283 2283
2284 case STRING_CHECK: 2284 case STRING_CHECK:
2285 if (function->IsBuiltin() || function->shared()->strict_mode()) { 2285 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) {
2286 // Check that the object is a two-byte string or a symbol. 2286 // Check that the object is a two-byte string or a symbol.
2287 __ GetObjectType(a1, a3, a3); 2287 __ GetObjectType(a1, a3, a3);
2288 __ Branch(&miss, Ugreater_equal, a3, Operand(FIRST_NONSTRING_TYPE)); 2288 __ Branch(&miss, Ugreater_equal, a3, Operand(FIRST_NONSTRING_TYPE));
2289 // Check that the maps starting from the prototype haven't changed. 2289 // Check that the maps starting from the prototype haven't changed.
2290 GenerateDirectLoadGlobalFunctionPrototype( 2290 GenerateDirectLoadGlobalFunctionPrototype(
2291 masm(), Context::STRING_FUNCTION_INDEX, a0, &miss); 2291 masm(), Context::STRING_FUNCTION_INDEX, a0, &miss);
2292 CheckPrototypes( 2292 CheckPrototypes(
2293 Handle<JSObject>(JSObject::cast(object->GetPrototype())), 2293 Handle<JSObject>(JSObject::cast(object->GetPrototype())),
2294 a0, holder, a3, a1, t0, name, &miss); 2294 a0, holder, a3, a1, t0, name, &miss);
2295 } else { 2295 } else {
2296 // Calling non-strict non-builtins with a value as the receiver 2296 // Calling non-strict non-builtins with a value as the receiver
2297 // requires boxing. 2297 // requires boxing.
2298 __ jmp(&miss); 2298 __ jmp(&miss);
2299 } 2299 }
2300 break; 2300 break;
2301 2301
2302 case NUMBER_CHECK: 2302 case NUMBER_CHECK:
2303 if (function->IsBuiltin() || function->shared()->strict_mode()) { 2303 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) {
2304 Label fast; 2304 Label fast;
2305 // Check that the object is a smi or a heap number. 2305 // Check that the object is a smi or a heap number.
2306 __ JumpIfSmi(a1, &fast); 2306 __ JumpIfSmi(a1, &fast);
2307 __ GetObjectType(a1, a0, a0); 2307 __ GetObjectType(a1, a0, a0);
2308 __ Branch(&miss, ne, a0, Operand(HEAP_NUMBER_TYPE)); 2308 __ Branch(&miss, ne, a0, Operand(HEAP_NUMBER_TYPE));
2309 __ bind(&fast); 2309 __ bind(&fast);
2310 // Check that the maps starting from the prototype haven't changed. 2310 // Check that the maps starting from the prototype haven't changed.
2311 GenerateDirectLoadGlobalFunctionPrototype( 2311 GenerateDirectLoadGlobalFunctionPrototype(
2312 masm(), Context::NUMBER_FUNCTION_INDEX, a0, &miss); 2312 masm(), Context::NUMBER_FUNCTION_INDEX, a0, &miss);
2313 CheckPrototypes( 2313 CheckPrototypes(
2314 Handle<JSObject>(JSObject::cast(object->GetPrototype())), 2314 Handle<JSObject>(JSObject::cast(object->GetPrototype())),
2315 a0, holder, a3, a1, t0, name, &miss); 2315 a0, holder, a3, a1, t0, name, &miss);
2316 } else { 2316 } else {
2317 // Calling non-strict non-builtins with a value as the receiver 2317 // Calling non-strict non-builtins with a value as the receiver
2318 // requires boxing. 2318 // requires boxing.
2319 __ jmp(&miss); 2319 __ jmp(&miss);
2320 } 2320 }
2321 break; 2321 break;
2322 2322
2323 case BOOLEAN_CHECK: 2323 case BOOLEAN_CHECK:
2324 if (function->IsBuiltin() || function->shared()->strict_mode()) { 2324 if (function->IsBuiltin() || !function->shared()->is_classic_mode()) {
2325 Label fast; 2325 Label fast;
2326 // Check that the object is a boolean. 2326 // Check that the object is a boolean.
2327 __ LoadRoot(t0, Heap::kTrueValueRootIndex); 2327 __ LoadRoot(t0, Heap::kTrueValueRootIndex);
2328 __ Branch(&fast, eq, a1, Operand(t0)); 2328 __ Branch(&fast, eq, a1, Operand(t0));
2329 __ LoadRoot(t0, Heap::kFalseValueRootIndex); 2329 __ LoadRoot(t0, Heap::kFalseValueRootIndex);
2330 __ Branch(&miss, ne, a1, Operand(t0)); 2330 __ Branch(&miss, ne, a1, Operand(t0));
2331 __ bind(&fast); 2331 __ bind(&fast);
2332 // Check that the maps starting from the prototype haven't changed. 2332 // Check that the maps starting from the prototype haven't changed.
2333 GenerateDirectLoadGlobalFunctionPrototype( 2333 GenerateDirectLoadGlobalFunctionPrototype(
2334 masm(), Context::BOOLEAN_FUNCTION_INDEX, a0, &miss); 2334 masm(), Context::BOOLEAN_FUNCTION_INDEX, a0, &miss);
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
4313 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); 4313 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss();
4314 __ Jump(ic_miss, RelocInfo::CODE_TARGET); 4314 __ Jump(ic_miss, RelocInfo::CODE_TARGET);
4315 } 4315 }
4316 4316
4317 4317
4318 #undef __ 4318 #undef __
4319 4319
4320 } } // namespace v8::internal 4320 } } // namespace v8::internal
4321 4321
4322 #endif // V8_TARGET_ARCH_MIPS 4322 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698