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

Side by Side Diff: src/arm/stub-cache-arm.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 | « no previous file | src/ia32/stub-cache-ia32.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 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2255 JSGlobalPropertyCell* cell, 2255 JSGlobalPropertyCell* cell,
2256 JSFunction* function, 2256 JSFunction* function,
2257 String* name) { 2257 String* name) {
2258 Counters* counters = isolate()->counters(); 2258 Counters* counters = isolate()->counters();
2259 2259
2260 ASSERT(optimization.is_simple_api_call()); 2260 ASSERT(optimization.is_simple_api_call());
2261 // Bail out if object is a global object as we don't want to 2261 // Bail out if object is a global object as we don't want to
2262 // repatch it to global receiver. 2262 // repatch it to global receiver.
2263 if (object->IsGlobalObject()) return heap()->undefined_value(); 2263 if (object->IsGlobalObject()) return heap()->undefined_value();
2264 if (cell != NULL) return heap()->undefined_value(); 2264 if (cell != NULL) return heap()->undefined_value();
2265 if (!object->IsJSObject()) return heap()->undefined_value();
2265 int depth = optimization.GetPrototypeDepthOfExpectedType( 2266 int depth = optimization.GetPrototypeDepthOfExpectedType(
2266 JSObject::cast(object), holder); 2267 JSObject::cast(object), holder);
2267 if (depth == kInvalidProtoDepth) return heap()->undefined_value(); 2268 if (depth == kInvalidProtoDepth) return heap()->undefined_value();
2268 2269
2269 Label miss, miss_before_stack_reserved; 2270 Label miss, miss_before_stack_reserved;
2270 2271
2271 GenerateNameCheck(name, &miss_before_stack_reserved); 2272 GenerateNameCheck(name, &miss_before_stack_reserved);
2272 2273
2273 // Get the receiver from the stack. 2274 // Get the receiver from the stack.
2274 const int argc = arguments().immediate(); 2275 const int argc = arguments().immediate();
(...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after
4061 4062
4062 return GetCode(flags); 4063 return GetCode(flags);
4063 } 4064 }
4064 4065
4065 4066
4066 #undef __ 4067 #undef __
4067 4068
4068 } } // namespace v8::internal 4069 } } // namespace v8::internal
4069 4070
4070 #endif // V8_TARGET_ARCH_ARM 4071 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698