| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // Make sure the cache is large enough to hold the symbol identifier. | 209 // Make sure the cache is large enough to hold the symbol identifier. |
| 210 if (symbol_cache_.length() <= symbol_id) { | 210 if (symbol_cache_.length() <= symbol_id) { |
| 211 // Increase length to index + 1. | 211 // Increase length to index + 1. |
| 212 symbol_cache_.AddBlock(Handle<String>::null(), | 212 symbol_cache_.AddBlock(Handle<String>::null(), |
| 213 symbol_id + 1 - symbol_cache_.length(), zone()); | 213 symbol_id + 1 - symbol_cache_.length(), zone()); |
| 214 } | 214 } |
| 215 Handle<String> result = symbol_cache_.at(symbol_id); | 215 Handle<String> result = symbol_cache_.at(symbol_id); |
| 216 if (result.is_null()) { | 216 if (result.is_null()) { |
| 217 result = scanner()->AllocateInternalizedString(isolate_); | 217 result = scanner()->AllocateInternalizedString(isolate_); |
| 218 ASSERT(!result.is_null()); | 218 ASSERT(!result.is_null()); |
| 219 symbol_cache_.at(symbol_id) = result; | 219 symbol_cache_.Set(symbol_id, result); |
| 220 return result; | 220 return result; |
| 221 } | 221 } |
| 222 isolate()->counters()->total_preparse_symbols_skipped()->Increment(); | 222 isolate()->counters()->total_preparse_symbols_skipped()->Increment(); |
| 223 return result; | 223 return result; |
| 224 } | 224 } |
| 225 | 225 |
| 226 | 226 |
| 227 FunctionEntry ScriptDataImpl::GetFunctionEntry(int start) { | 227 FunctionEntry ScriptDataImpl::GetFunctionEntry(int start) { |
| 228 // The current pre-data entry must be a FunctionEntry with the given | 228 // The current pre-data entry must be a FunctionEntry with the given |
| 229 // start position. | 229 // start position. |
| (...skipping 4467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4697 ASSERT(info()->isolate()->has_pending_exception()); | 4697 ASSERT(info()->isolate()->has_pending_exception()); |
| 4698 } else { | 4698 } else { |
| 4699 result = ParseProgram(); | 4699 result = ParseProgram(); |
| 4700 } | 4700 } |
| 4701 } | 4701 } |
| 4702 info()->SetFunction(result); | 4702 info()->SetFunction(result); |
| 4703 return (result != NULL); | 4703 return (result != NULL); |
| 4704 } | 4704 } |
| 4705 | 4705 |
| 4706 } } // namespace v8::internal | 4706 } } // namespace v8::internal |
| OLD | NEW |