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/heap.cc

Issue 6793013: Cache optimized code on shared function info. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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/frames.cc ('k') | src/ia32/code-stubs-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 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 2325 matching lines...) Expand 10 before | Expand all | Expand 10 after
2336 Object* result; 2336 Object* result;
2337 { MaybeObject* maybe_result = 2337 { MaybeObject* maybe_result =
2338 Allocate(shared_function_info_map(), OLD_POINTER_SPACE); 2338 Allocate(shared_function_info_map(), OLD_POINTER_SPACE);
2339 if (!maybe_result->ToObject(&result)) return maybe_result; 2339 if (!maybe_result->ToObject(&result)) return maybe_result;
2340 } 2340 }
2341 2341
2342 SharedFunctionInfo* share = SharedFunctionInfo::cast(result); 2342 SharedFunctionInfo* share = SharedFunctionInfo::cast(result);
2343 share->set_name(name); 2343 share->set_name(name);
2344 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal); 2344 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal);
2345 share->set_code(illegal); 2345 share->set_code(illegal);
2346 share->set_optimized_code_map(Smi::FromInt(0));
2346 share->set_scope_info(SerializedScopeInfo::Empty()); 2347 share->set_scope_info(SerializedScopeInfo::Empty());
2347 Code* construct_stub = isolate_->builtins()->builtin( 2348 Code* construct_stub = isolate_->builtins()->builtin(
2348 Builtins::kJSConstructStubGeneric); 2349 Builtins::kJSConstructStubGeneric);
2349 share->set_construct_stub(construct_stub); 2350 share->set_construct_stub(construct_stub);
2350 share->set_expected_nof_properties(0); 2351 share->set_expected_nof_properties(0);
2351 share->set_length(0); 2352 share->set_length(0);
2352 share->set_formal_parameter_count(0); 2353 share->set_formal_parameter_count(0);
2353 share->set_instance_class_name(Object_symbol()); 2354 share->set_instance_class_name(Object_symbol());
2354 share->set_function_data(undefined_value()); 2355 share->set_function_data(undefined_value());
2355 share->set_script(undefined_value()); 2356 share->set_script(undefined_value());
(...skipping 3491 matching lines...) Expand 10 before | Expand all | Expand 10 after
5847 } 5848 }
5848 5849
5849 5850
5850 void ExternalStringTable::TearDown() { 5851 void ExternalStringTable::TearDown() {
5851 new_space_strings_.Free(); 5852 new_space_strings_.Free();
5852 old_space_strings_.Free(); 5853 old_space_strings_.Free();
5853 } 5854 }
5854 5855
5855 5856
5856 } } // namespace v8::internal 5857 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698