| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 | 962 |
| 963 // Ensure no transitions to deprecated maps are followed. | 963 // Ensure no transitions to deprecated maps are followed. |
| 964 __ CheckMapDeprecated(transition, scratch1(), &miss); | 964 __ CheckMapDeprecated(transition, scratch1(), &miss); |
| 965 | 965 |
| 966 // Check that we are allowed to write this. | 966 // Check that we are allowed to write this. |
| 967 bool is_nonexistent = holder()->map() == transition->GetBackPointer(); | 967 bool is_nonexistent = holder()->map() == transition->GetBackPointer(); |
| 968 if (is_nonexistent) { | 968 if (is_nonexistent) { |
| 969 // Find the top object. | 969 // Find the top object. |
| 970 Handle<JSObject> last; | 970 Handle<JSObject> last; |
| 971 PrototypeIterator iter(isolate(), holder()); | 971 PrototypeIterator iter(isolate(), holder()); |
| 972 do { | 972 while (!iter.IsAtEnd()) { |
| 973 last = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)); | 973 last = Handle<JSObject>::cast(PrototypeIterator::GetCurrent(iter)); |
| 974 iter.Advance(); | 974 iter.Advance(); |
| 975 } while (!iter.IsAtEnd()); | 975 } |
| 976 set_holder(last); | 976 if (!last.is_null()) set_holder(last); |
| 977 } | 977 } |
| 978 | 978 |
| 979 Register holder_reg = FrontendHeader(receiver(), name, &miss); | 979 Register holder_reg = FrontendHeader(receiver(), name, &miss); |
| 980 | 980 |
| 981 // If no property was found, and the holder (the last object in the | 981 // If no property was found, and the holder (the last object in the |
| 982 // prototype chain) is in slow mode, we need to do a negative lookup on the | 982 // prototype chain) is in slow mode, we need to do a negative lookup on the |
| 983 // holder. | 983 // holder. |
| 984 if (is_nonexistent) { | 984 if (is_nonexistent) { |
| 985 GenerateNegativeHolderLookup(masm(), holder(), holder_reg, name, &miss); | 985 GenerateNegativeHolderLookup(masm(), holder(), holder_reg, name, &miss); |
| 986 } | 986 } |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 Handle<FunctionTemplateInfo>( | 1324 Handle<FunctionTemplateInfo>( |
| 1325 FunctionTemplateInfo::cast(signature->receiver())); | 1325 FunctionTemplateInfo::cast(signature->receiver())); |
| 1326 } | 1326 } |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 is_simple_api_call_ = true; | 1329 is_simple_api_call_ = true; |
| 1330 } | 1330 } |
| 1331 | 1331 |
| 1332 | 1332 |
| 1333 } } // namespace v8::internal | 1333 } } // namespace v8::internal |
| OLD | NEW |