| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 new_object); | 301 new_object); |
| 302 } | 302 } |
| 303 | 303 |
| 304 | 304 |
| 305 bool ICCompareStub::FindCodeInSpecialCache(Code** code_out, Isolate* isolate) { | 305 bool ICCompareStub::FindCodeInSpecialCache(Code** code_out, Isolate* isolate) { |
| 306 Factory* factory = isolate->factory(); | 306 Factory* factory = isolate->factory(); |
| 307 Code::Flags flags = Code::ComputeFlags( | 307 Code::Flags flags = Code::ComputeFlags( |
| 308 static_cast<Code::Kind>(GetCodeKind()), | 308 static_cast<Code::Kind>(GetCodeKind()), |
| 309 UNINITIALIZED); | 309 UNINITIALIZED); |
| 310 ASSERT(op_ == Token::EQ || op_ == Token::EQ_STRICT); | 310 ASSERT(op_ == Token::EQ || op_ == Token::EQ_STRICT); |
| 311 Handle<Object> probe( | 311 String* symbol = strict() ? |
| 312 known_map_->FindInCodeCache( | 312 *factory->strict_compare_ic_symbol() : |
| 313 strict() ? | 313 *factory->compare_ic_symbol(); |
| 314 *factory->strict_compare_ic_symbol() : | 314 Handle<Object> probe(known_map_->FindInCodeCache(symbol, flags), isolate); |
| 315 *factory->compare_ic_symbol(), | |
| 316 flags)); | |
| 317 if (probe->IsCode()) { | 315 if (probe->IsCode()) { |
| 318 *code_out = Code::cast(*probe); | 316 *code_out = Code::cast(*probe); |
| 319 #ifdef DEBUG | 317 #ifdef DEBUG |
| 320 Token::Value cached_op; | 318 Token::Value cached_op; |
| 321 ICCompareStub::DecodeMinorKey((*code_out)->stub_info(), NULL, NULL, NULL, | 319 ICCompareStub::DecodeMinorKey((*code_out)->stub_info(), NULL, NULL, NULL, |
| 322 &cached_op); | 320 &cached_op); |
| 323 ASSERT(op_ == cached_op); | 321 ASSERT(op_ == cached_op); |
| 324 #endif | 322 #endif |
| 325 return true; | 323 return true; |
| 326 } | 324 } |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 // already active, as the hooks won't stack. | 627 // already active, as the hooks won't stack. |
| 630 if (entry_hook != 0 && entry_hook_ != 0) | 628 if (entry_hook != 0 && entry_hook_ != 0) |
| 631 return false; | 629 return false; |
| 632 | 630 |
| 633 entry_hook_ = entry_hook; | 631 entry_hook_ = entry_hook; |
| 634 return true; | 632 return true; |
| 635 } | 633 } |
| 636 | 634 |
| 637 | 635 |
| 638 } } // namespace v8::internal | 636 } } // namespace v8::internal |
| OLD | NEW |