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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 state_.Add(GENERIC); | 550 state_.Add(GENERIC); |
551 } else { | 551 } else { |
552 state_.Add(MONOMORPHIC_MAP); | 552 state_.Add(MONOMORPHIC_MAP); |
553 } | 553 } |
554 TraceTransition(old_state, state_); | 554 TraceTransition(old_state, state_); |
555 } | 555 } |
556 | 556 |
557 | 557 |
558 template<class StateType> | 558 template<class StateType> |
559 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { | 559 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { |
560 // Note: Although a no-op transition is semantically OK, it is hinting at a | |
561 // bug somewhere in our state transition machinery. | |
562 ASSERT(from != to); | |
563 #ifdef DEBUG | 560 #ifdef DEBUG |
564 if (!FLAG_trace_ic) return; | 561 if (!FLAG_trace_ic) return; |
565 char buffer[100]; | 562 char buffer[100]; |
566 NoAllocationStringAllocator allocator(buffer, | 563 NoAllocationStringAllocator allocator(buffer, |
567 static_cast<unsigned>(sizeof(buffer))); | 564 static_cast<unsigned>(sizeof(buffer))); |
568 StringStream stream(&allocator); | 565 StringStream stream(&allocator); |
569 stream.Add("["); | 566 stream.Add("["); |
570 PrintBaseName(&stream); | 567 PrintBaseName(&stream); |
571 stream.Add(": "); | 568 stream.Add(": "); |
572 from.Print(&stream); | 569 from.Print(&stream); |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 InstallDescriptor(isolate, &stub3); | 884 InstallDescriptor(isolate, &stub3); |
888 } | 885 } |
889 | 886 |
890 InternalArrayConstructorStub::InternalArrayConstructorStub( | 887 InternalArrayConstructorStub::InternalArrayConstructorStub( |
891 Isolate* isolate) { | 888 Isolate* isolate) { |
892 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 889 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
893 } | 890 } |
894 | 891 |
895 | 892 |
896 } } // namespace v8::internal | 893 } } // namespace v8::internal |
OLD | NEW |