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

Side by Side Diff: src/ia32/stub-cache-ia32.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/arm/stub-cache-arm.cc ('k') | src/mips/stub-cache-mips.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 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 Object* object, 2108 Object* object,
2109 JSObject* holder, 2109 JSObject* holder,
2110 JSGlobalPropertyCell* cell, 2110 JSGlobalPropertyCell* cell,
2111 JSFunction* function, 2111 JSFunction* function,
2112 String* name) { 2112 String* name) {
2113 ASSERT(optimization.is_simple_api_call()); 2113 ASSERT(optimization.is_simple_api_call());
2114 // Bail out if object is a global object as we don't want to 2114 // Bail out if object is a global object as we don't want to
2115 // repatch it to global receiver. 2115 // repatch it to global receiver.
2116 if (object->IsGlobalObject()) return heap()->undefined_value(); 2116 if (object->IsGlobalObject()) return heap()->undefined_value();
2117 if (cell != NULL) return heap()->undefined_value(); 2117 if (cell != NULL) return heap()->undefined_value();
2118 if (!object->IsJSObject()) return heap()->undefined_value();
2118 int depth = optimization.GetPrototypeDepthOfExpectedType( 2119 int depth = optimization.GetPrototypeDepthOfExpectedType(
2119 JSObject::cast(object), holder); 2120 JSObject::cast(object), holder);
2120 if (depth == kInvalidProtoDepth) return heap()->undefined_value(); 2121 if (depth == kInvalidProtoDepth) return heap()->undefined_value();
2121 2122
2122 Label miss, miss_before_stack_reserved; 2123 Label miss, miss_before_stack_reserved;
2123 2124
2124 GenerateNameCheck(name, &miss_before_stack_reserved); 2125 GenerateNameCheck(name, &miss_before_stack_reserved);
2125 2126
2126 // Get the receiver from the stack. 2127 // Get the receiver from the stack.
2127 const int argc = arguments().immediate(); 2128 const int argc = arguments().immediate();
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 3676
3676 return GetCode(flags); 3677 return GetCode(flags);
3677 } 3678 }
3678 3679
3679 3680
3680 #undef __ 3681 #undef __
3681 3682
3682 } } // namespace v8::internal 3683 } } // namespace v8::internal
3683 3684
3684 #endif // V8_TARGET_ARCH_IA32 3685 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698