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 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |