Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: src/objects.cc

Issue 18712002: Convert UnaryOpStub to a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address review Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/property-details.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 10592 matching lines...) Expand 10 before | Expand all | Expand 10 after
10603 case INTERCEPTOR: return "INTERCEPTOR"; 10603 case INTERCEPTOR: return "INTERCEPTOR";
10604 case MAP_TRANSITION: return "MAP_TRANSITION"; 10604 case MAP_TRANSITION: return "MAP_TRANSITION";
10605 case NONEXISTENT: return "NONEXISTENT"; 10605 case NONEXISTENT: return "NONEXISTENT";
10606 } 10606 }
10607 UNREACHABLE(); // keep the compiler happy 10607 UNREACHABLE(); // keep the compiler happy
10608 return NULL; 10608 return NULL;
10609 } 10609 }
10610 10610
10611 10611
10612 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) { 10612 void Code::PrintExtraICState(FILE* out, Kind kind, ExtraICState extra) {
10613 PrintF(out, "extra_ic_state = ");
10613 const char* name = NULL; 10614 const char* name = NULL;
10614 switch (kind) { 10615 switch (kind) {
10615 case CALL_IC: 10616 case CALL_IC:
10616 if (extra == STRING_INDEX_OUT_OF_BOUNDS) { 10617 if (extra == STRING_INDEX_OUT_OF_BOUNDS) {
10617 name = "STRING_INDEX_OUT_OF_BOUNDS"; 10618 name = "STRING_INDEX_OUT_OF_BOUNDS";
10618 } 10619 }
10619 break; 10620 break;
10620 case STORE_IC: 10621 case STORE_IC:
10621 case KEYED_STORE_IC: 10622 case KEYED_STORE_IC:
10622 if (extra == kStrictMode) { 10623 if (extra == kStrictMode) {
10623 name = "STRICT"; 10624 name = "STRICT";
10624 } 10625 }
10625 break; 10626 break;
10626 default: 10627 default:
10627 break; 10628 break;
10628 } 10629 }
10629 if (name != NULL) { 10630 if (name != NULL) {
10630 PrintF(out, "extra_ic_state = %s\n", name); 10631 PrintF(out, "%s\n", name);
10631 } else { 10632 } else {
10632 PrintF(out, "extra_ic_state = %d\n", extra); 10633 PrintF(out, "%d\n", extra);
10633 } 10634 }
10634 } 10635 }
10635 10636
10636 10637
10637 void Code::Disassemble(const char* name, FILE* out) { 10638 void Code::Disassemble(const char* name, FILE* out) {
10638 PrintF(out, "kind = %s\n", Kind2String(kind())); 10639 PrintF(out, "kind = %s\n", Kind2String(kind()));
10639 if (is_inline_cache_stub()) { 10640 if (is_inline_cache_stub()) {
10640 PrintF(out, "ic_state = %s\n", ICState2String(ic_state())); 10641 PrintF(out, "ic_state = %s\n", ICState2String(ic_state()));
10641 PrintExtraICState(out, kind(), extra_ic_state()); 10642 PrintExtraICState(out, kind(), needs_extended_extra_ic_state(kind()) ?
10643 extended_extra_ic_state() : extra_ic_state());
10642 if (ic_state() == MONOMORPHIC) { 10644 if (ic_state() == MONOMORPHIC) {
10643 PrintF(out, "type = %s\n", StubType2String(type())); 10645 PrintF(out, "type = %s\n", StubType2String(type()));
10644 } 10646 }
10645 if (is_call_stub() || is_keyed_call_stub()) { 10647 if (is_call_stub() || is_keyed_call_stub()) {
10646 PrintF(out, "argc = %d\n", arguments_count()); 10648 PrintF(out, "argc = %d\n", arguments_count());
10647 } 10649 }
10648 if (is_compare_ic_stub()) { 10650 if (is_compare_ic_stub()) {
10649 ASSERT(major_key() == CodeStub::CompareIC); 10651 ASSERT(major_key() == CodeStub::CompareIC);
10650 CompareIC::State left_state, right_state, handler_state; 10652 CompareIC::State left_state, right_state, handler_state;
10651 Token::Value op; 10653 Token::Value op;
(...skipping 5167 matching lines...) Expand 10 before | Expand all | Expand 10 after
15819 15821
15820 void PropertyCell::AddDependentCode(Handle<Code> code) { 15822 void PropertyCell::AddDependentCode(Handle<Code> code) {
15821 Handle<DependentCode> codes = DependentCode::Insert( 15823 Handle<DependentCode> codes = DependentCode::Insert(
15822 Handle<DependentCode>(dependent_code()), 15824 Handle<DependentCode>(dependent_code()),
15823 DependentCode::kPropertyCellChangedGroup, code); 15825 DependentCode::kPropertyCellChangedGroup, code);
15824 if (*codes != dependent_code()) set_dependent_code(*codes); 15826 if (*codes != dependent_code()) set_dependent_code(*codes);
15825 } 15827 }
15826 15828
15827 15829
15828 } } // namespace v8::internal 15830 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698