| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |