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

Side by Side Diff: src/heap.cc

Issue 6075005: Change scanner buffers to not use utf-8. (Closed)
Patch Set: Fixed linto. Created 9 years, 12 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
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 3995 matching lines...) Expand 10 before | Expand all | Expand 10 after
4006 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table; 4006 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table;
4007 } 4007 }
4008 // Can't use set_symbol_table because SymbolTable::cast knows that 4008 // Can't use set_symbol_table because SymbolTable::cast knows that
4009 // SymbolTable is a singleton and checks for identity. 4009 // SymbolTable is a singleton and checks for identity.
4010 roots_[kSymbolTableRootIndex] = new_table; 4010 roots_[kSymbolTableRootIndex] = new_table;
4011 ASSERT(symbol != NULL); 4011 ASSERT(symbol != NULL);
4012 return symbol; 4012 return symbol;
4013 } 4013 }
4014 4014
4015 4015
4016 MaybeObject* Heap::LookupAsciiSymbol(Vector<const char> string) {
4017 Object* symbol = NULL;
4018 Object* new_table;
4019 { MaybeObject* maybe_new_table =
4020 symbol_table()->LookupAsciiSymbol(string, &symbol);
4021 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table;
4022 }
4023 // Can't use set_symbol_table because SymbolTable::cast knows that
4024 // SymbolTable is a singleton and checks for identity.
4025 roots_[kSymbolTableRootIndex] = new_table;
4026 ASSERT(symbol != NULL);
4027 return symbol;
4028 }
4029
4030
4031 MaybeObject* Heap::LookupTwoByteSymbol(Vector<const uc16> string) {
4032 Object* symbol = NULL;
4033 Object* new_table;
4034 { MaybeObject* maybe_new_table =
4035 symbol_table()->LookupTwoByteSymbol(string, &symbol);
4036 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table;
4037 }
4038 // Can't use set_symbol_table because SymbolTable::cast knows that
4039 // SymbolTable is a singleton and checks for identity.
4040 roots_[kSymbolTableRootIndex] = new_table;
4041 ASSERT(symbol != NULL);
4042 return symbol;
4043 }
4044
4045
4016 MaybeObject* Heap::LookupSymbol(String* string) { 4046 MaybeObject* Heap::LookupSymbol(String* string) {
4017 if (string->IsSymbol()) return string; 4047 if (string->IsSymbol()) return string;
4018 Object* symbol = NULL; 4048 Object* symbol = NULL;
4019 Object* new_table; 4049 Object* new_table;
4020 { MaybeObject* maybe_new_table = 4050 { MaybeObject* maybe_new_table =
4021 symbol_table()->LookupString(string, &symbol); 4051 symbol_table()->LookupString(string, &symbol);
4022 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table; 4052 if (!maybe_new_table->ToObject(&new_table)) return maybe_new_table;
4023 } 4053 }
4024 // Can't use set_symbol_table because SymbolTable::cast knows that 4054 // Can't use set_symbol_table because SymbolTable::cast knows that
4025 // SymbolTable is a singleton and checks for identity. 4055 // SymbolTable is a singleton and checks for identity.
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after
5500 void ExternalStringTable::TearDown() { 5530 void ExternalStringTable::TearDown() {
5501 new_space_strings_.Free(); 5531 new_space_strings_.Free();
5502 old_space_strings_.Free(); 5532 old_space_strings_.Free();
5503 } 5533 }
5504 5534
5505 5535
5506 List<Object*> ExternalStringTable::new_space_strings_; 5536 List<Object*> ExternalStringTable::new_space_strings_;
5507 List<Object*> ExternalStringTable::old_space_strings_; 5537 List<Object*> ExternalStringTable::old_space_strings_;
5508 5538
5509 } } // namespace v8::internal 5539 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698