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

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

Issue 7045002: Fix bug 1396: Optimized calls to API functions assumed that the receiver was a JSObject, failed w... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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/ia32/stub-cache-ia32.cc ('k') | src/x64/stub-cache-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 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 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 2248
2249 Isolate* isolate = masm()->isolate(); 2249 Isolate* isolate = masm()->isolate();
2250 Heap* heap = isolate->heap(); 2250 Heap* heap = isolate->heap();
2251 Counters* counters = isolate->counters(); 2251 Counters* counters = isolate->counters();
2252 2252
2253 ASSERT(optimization.is_simple_api_call()); 2253 ASSERT(optimization.is_simple_api_call());
2254 // Bail out if object is a global object as we don't want to 2254 // Bail out if object is a global object as we don't want to
2255 // repatch it to global receiver. 2255 // repatch it to global receiver.
2256 if (object->IsGlobalObject()) return heap->undefined_value(); 2256 if (object->IsGlobalObject()) return heap->undefined_value();
2257 if (cell != NULL) return heap->undefined_value(); 2257 if (cell != NULL) return heap->undefined_value();
2258 if (!object->IsJSObject()) return heap()->undefined_value();
2258 int depth = optimization.GetPrototypeDepthOfExpectedType( 2259 int depth = optimization.GetPrototypeDepthOfExpectedType(
2259 JSObject::cast(object), holder); 2260 JSObject::cast(object), holder);
2260 if (depth == kInvalidProtoDepth) return heap->undefined_value(); 2261 if (depth == kInvalidProtoDepth) return heap->undefined_value();
2261 2262
2262 Label miss, miss_before_stack_reserved; 2263 Label miss, miss_before_stack_reserved;
2263 2264
2264 GenerateNameCheck(name, &miss_before_stack_reserved); 2265 GenerateNameCheck(name, &miss_before_stack_reserved);
2265 2266
2266 // Get the receiver from the stack. 2267 // Get the receiver from the stack.
2267 const int argc = arguments().immediate(); 2268 const int argc = arguments().immediate();
(...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after
4093 4094
4094 return GetCode(flags); 4095 return GetCode(flags);
4095 } 4096 }
4096 4097
4097 4098
4098 #undef __ 4099 #undef __
4099 4100
4100 } } // namespace v8::internal 4101 } } // namespace v8::internal
4101 4102
4102 #endif // V8_TARGET_ARCH_MIPS 4103 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698