| 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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 stub.SetKind(kNonStrictEquality); | 912 stub.SetKind(kNonStrictEquality); |
| 913 | 913 |
| 914 Handle<String> name(isolate_->heap()->empty_string()); | 914 Handle<String> name(isolate_->heap()->empty_string()); |
| 915 if (!receiver_map->is_shared()) { | 915 if (!receiver_map->is_shared()) { |
| 916 Handle<Code> cached_ic = FindIC(name, receiver_map, Code::COMPARE_NIL_IC, | 916 Handle<Code> cached_ic = FindIC(name, receiver_map, Code::COMPARE_NIL_IC, |
| 917 Code::NORMAL, stub.GetExtraICState()); | 917 Code::NORMAL, stub.GetExtraICState()); |
| 918 if (!cached_ic.is_null()) return cached_ic; | 918 if (!cached_ic.is_null()) return cached_ic; |
| 919 } | 919 } |
| 920 | 920 |
| 921 Handle<Code> ic = stub.GetCode(isolate_); | 921 Handle<Code> ic = stub.GetCode(isolate_); |
| 922 |
| 922 // For monomorphic maps, use the code as a template, copying and replacing | 923 // For monomorphic maps, use the code as a template, copying and replacing |
| 923 // the monomorphic map that checks the object's type. | 924 // the monomorphic map that checks the object's type. |
| 924 ic = isolate_->factory()->CopyCode(ic); | 925 ic = isolate_->factory()->CopyCode(ic); |
| 925 ic->ReplaceFirstMap(*receiver_map); | 926 ic->ReplaceFirstMap(*receiver_map); |
| 926 | 927 |
| 927 if (!receiver_map->is_shared()) { | 928 if (!receiver_map->is_shared()) { |
| 928 Map::UpdateCodeCache(receiver_map, name, ic); | 929 Map::UpdateCodeCache(receiver_map, name, ic); |
| 929 } | 930 } |
| 930 | 931 |
| 931 return ic; | 932 return ic; |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2103 Handle<FunctionTemplateInfo>( | 2104 Handle<FunctionTemplateInfo>( |
| 2104 FunctionTemplateInfo::cast(signature->receiver())); | 2105 FunctionTemplateInfo::cast(signature->receiver())); |
| 2105 } | 2106 } |
| 2106 } | 2107 } |
| 2107 | 2108 |
| 2108 is_simple_api_call_ = true; | 2109 is_simple_api_call_ = true; |
| 2109 } | 2110 } |
| 2110 | 2111 |
| 2111 | 2112 |
| 2112 } } // namespace v8::internal | 2113 } } // namespace v8::internal |
| OLD | NEW |