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

Side by Side Diff: src/json-parser.h

Issue 11271020: Get rid of obsolete unchecked accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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/heap-inl.h ('k') | src/objects.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 uint32_t hash = (length <= String::kMaxHashCalcLength) 621 uint32_t hash = (length <= String::kMaxHashCalcLength)
622 ? StringHasher::GetHashCore(running_hash) : length; 622 ? StringHasher::GetHashCore(running_hash) : length;
623 Vector<const char> string_vector( 623 Vector<const char> string_vector(
624 seq_source_->GetChars() + position_, length); 624 seq_source_->GetChars() + position_, length);
625 SymbolTable* symbol_table = isolate()->heap()->symbol_table(); 625 SymbolTable* symbol_table = isolate()->heap()->symbol_table();
626 uint32_t capacity = symbol_table->Capacity(); 626 uint32_t capacity = symbol_table->Capacity();
627 uint32_t entry = SymbolTable::FirstProbe(hash, capacity); 627 uint32_t entry = SymbolTable::FirstProbe(hash, capacity);
628 uint32_t count = 1; 628 uint32_t count = 1;
629 while (true) { 629 while (true) {
630 Object* element = symbol_table->KeyAt(entry); 630 Object* element = symbol_table->KeyAt(entry);
631 if (element == isolate()->heap()->raw_unchecked_undefined_value()) { 631 if (element == isolate()->heap()->undefined_value()) {
632 // Lookup failure. 632 // Lookup failure.
633 break; 633 break;
634 } 634 }
635 if (element != isolate()->heap()->raw_unchecked_the_hole_value() && 635 if (element != isolate()->heap()->the_hole_value() &&
636 String::cast(element)->IsAsciiEqualTo(string_vector)) { 636 String::cast(element)->IsAsciiEqualTo(string_vector)) {
637 // Lookup success, update the current position. 637 // Lookup success, update the current position.
638 position_ = position; 638 position_ = position;
639 // Advance past the last '"'. 639 // Advance past the last '"'.
640 AdvanceSkipWhitespace(); 640 AdvanceSkipWhitespace();
641 return Handle<String>(String::cast(element)); 641 return Handle<String>(String::cast(element));
642 } 642 }
643 entry = SymbolTable::NextProbe(entry, count++, capacity); 643 entry = SymbolTable::NextProbe(entry, count++, capacity);
644 } 644 }
645 } 645 }
(...skipping 30 matching lines...) Expand all
676 } 676 }
677 ASSERT_EQ('"', c0_); 677 ASSERT_EQ('"', c0_);
678 // Advance past the last '"'. 678 // Advance past the last '"'.
679 AdvanceSkipWhitespace(); 679 AdvanceSkipWhitespace();
680 return result; 680 return result;
681 } 681 }
682 682
683 } } // namespace v8::internal 683 } } // namespace v8::internal
684 684
685 #endif // V8_JSON_PARSER_H_ 685 #endif // V8_JSON_PARSER_H_
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698