| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 // and we use the empty string for the map cache in that case. If | 107 // and we use the empty string for the map cache in that case. If |
| 108 // there are global objects involved, we need to check global | 108 // there are global objects involved, we need to check global |
| 109 // property cells in the stub and therefore the stub will be | 109 // property cells in the stub and therefore the stub will be |
| 110 // specific to the name. | 110 // specific to the name. |
| 111 Handle<String> cache_name = factory()->empty_string(); | 111 Handle<String> cache_name = factory()->empty_string(); |
| 112 Handle<JSObject> current; | 112 Handle<JSObject> current; |
| 113 Handle<Object> next = receiver; | 113 Handle<Object> next = receiver; |
| 114 Handle<GlobalObject> global; | 114 Handle<GlobalObject> global; |
| 115 do { | 115 do { |
| 116 current = Handle<JSObject>::cast(next); | 116 current = Handle<JSObject>::cast(next); |
| 117 next = Handle<Object>(current->GetPrototype()); | 117 next = Handle<Object>(current->GetPrototype(), isolate_); |
| 118 if (current->IsGlobalObject()) { | 118 if (current->IsGlobalObject()) { |
| 119 global = Handle<GlobalObject>::cast(current); | 119 global = Handle<GlobalObject>::cast(current); |
| 120 cache_name = name; | 120 cache_name = name; |
| 121 } else if (!current->HasFastProperties()) { | 121 } else if (!current->HasFastProperties()) { |
| 122 cache_name = name; | 122 cache_name = name; |
| 123 } | 123 } |
| 124 } while (!next->IsNull()); | 124 } while (!next->IsNull()); |
| 125 | 125 |
| 126 // Compile the stub that is either shared for all names or | 126 // Compile the stub that is either shared for all names or |
| 127 // name specific if there are global objects involved. | 127 // name specific if there are global objects involved. |
| (...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1764 Handle<FunctionTemplateInfo>( | 1764 Handle<FunctionTemplateInfo>( |
| 1765 FunctionTemplateInfo::cast(signature->receiver())); | 1765 FunctionTemplateInfo::cast(signature->receiver())); |
| 1766 } | 1766 } |
| 1767 } | 1767 } |
| 1768 | 1768 |
| 1769 is_simple_api_call_ = true; | 1769 is_simple_api_call_ = true; |
| 1770 } | 1770 } |
| 1771 | 1771 |
| 1772 | 1772 |
| 1773 } } // namespace v8::internal | 1773 } } // namespace v8::internal |
| OLD | NEW |