| 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 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1947 Object* object, | 1947 Object* object, |
| 1948 JSObject* holder, | 1948 JSObject* holder, |
| 1949 JSGlobalPropertyCell* cell, | 1949 JSGlobalPropertyCell* cell, |
| 1950 JSFunction* function, | 1950 JSFunction* function, |
| 1951 String* name) { | 1951 String* name) { |
| 1952 ASSERT(optimization.is_simple_api_call()); | 1952 ASSERT(optimization.is_simple_api_call()); |
| 1953 // Bail out if object is a global object as we don't want to | 1953 // Bail out if object is a global object as we don't want to |
| 1954 // repatch it to global receiver. | 1954 // repatch it to global receiver. |
| 1955 if (object->IsGlobalObject()) return heap()->undefined_value(); | 1955 if (object->IsGlobalObject()) return heap()->undefined_value(); |
| 1956 if (cell != NULL) return heap()->undefined_value(); | 1956 if (cell != NULL) return heap()->undefined_value(); |
| 1957 if (!object->IsJSObject()) return heap()->undefined_value(); |
| 1957 int depth = optimization.GetPrototypeDepthOfExpectedType( | 1958 int depth = optimization.GetPrototypeDepthOfExpectedType( |
| 1958 JSObject::cast(object), holder); | 1959 JSObject::cast(object), holder); |
| 1959 if (depth == kInvalidProtoDepth) return heap()->undefined_value(); | 1960 if (depth == kInvalidProtoDepth) return heap()->undefined_value(); |
| 1960 | 1961 |
| 1961 Label miss, miss_before_stack_reserved; | 1962 Label miss, miss_before_stack_reserved; |
| 1962 | 1963 |
| 1963 GenerateNameCheck(name, &miss_before_stack_reserved); | 1964 GenerateNameCheck(name, &miss_before_stack_reserved); |
| 1964 | 1965 |
| 1965 // Get the receiver from the stack. | 1966 // Get the receiver from the stack. |
| 1966 const int argc = arguments().immediate(); | 1967 const int argc = arguments().immediate(); |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3424 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); | 3425 __ TailCallRuntime(Runtime::kSetProperty, 5, 1); |
| 3425 | 3426 |
| 3426 return GetCode(flags); | 3427 return GetCode(flags); |
| 3427 } | 3428 } |
| 3428 | 3429 |
| 3429 #undef __ | 3430 #undef __ |
| 3430 | 3431 |
| 3431 } } // namespace v8::internal | 3432 } } // namespace v8::internal |
| 3432 | 3433 |
| 3433 #endif // V8_TARGET_ARCH_X64 | 3434 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |