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

Side by Side Diff: src/heap.cc

Issue 3146008: Change lazy compilation stub to a builtin.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 4 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/handles.cc ('k') | src/ia32/builtins-ia32.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 // If this is a full script wrapped in a function we do no flush the code. 2497 // If this is a full script wrapped in a function we do no flush the code.
2498 if (shared_info->is_toplevel()) return; 2498 if (shared_info->is_toplevel()) return;
2499 2499
2500 // If this function is in the compilation cache we do not flush the code. 2500 // If this function is in the compilation cache we do not flush the code.
2501 if (CompilationCache::HasFunction(shared_info)) return; 2501 if (CompilationCache::HasFunction(shared_info)) return;
2502 2502
2503 // Check stack and archived threads for the code. 2503 // Check stack and archived threads for the code.
2504 if (CodeIsActive(shared_info->code())) return; 2504 if (CodeIsActive(shared_info->code())) return;
2505 2505
2506 // Compute the lazy compilable version of the code. 2506 // Compute the lazy compilable version of the code.
2507 HandleScope scope; 2507 Code* code = Builtins::builtin(Builtins::LazyCompile);
2508 Code* code = *ComputeLazyCompile(shared_info->length());
2509 shared_info->set_code(code); 2508 shared_info->set_code(code);
2510 function->set_code(code); 2509 function->set_code(code);
2511 } 2510 }
2512 2511
2513 2512
2514 void Heap::FlushCode() { 2513 void Heap::FlushCode() {
2515 #ifdef ENABLE_DEBUGGER_SUPPORT 2514 #ifdef ENABLE_DEBUGGER_SUPPORT
2516 // Do not flush code if the debugger is loaded or there are breakpoints. 2515 // Do not flush code if the debugger is loaded or there are breakpoints.
2517 if (Debug::IsLoaded() || Debug::has_break_points()) return; 2516 if (Debug::IsLoaded() || Debug::has_break_points()) return;
2518 #endif 2517 #endif
(...skipping 2507 matching lines...) Expand 10 before | Expand all | Expand 10 after
5026 void ExternalStringTable::TearDown() { 5025 void ExternalStringTable::TearDown() {
5027 new_space_strings_.Free(); 5026 new_space_strings_.Free();
5028 old_space_strings_.Free(); 5027 old_space_strings_.Free();
5029 } 5028 }
5030 5029
5031 5030
5032 List<Object*> ExternalStringTable::new_space_strings_; 5031 List<Object*> ExternalStringTable::new_space_strings_;
5033 List<Object*> ExternalStringTable::old_space_strings_; 5032 List<Object*> ExternalStringTable::old_space_strings_;
5034 5033
5035 } } // namespace v8::internal 5034 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698