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

Side by Side Diff: src/heap.cc

Issue 10103035: Share optimized code for closures. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 6 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/hydrogen.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 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 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 3003
3004 MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) { 3004 MaybeObject* Heap::AllocateSharedFunctionInfo(Object* name) {
3005 SharedFunctionInfo* share; 3005 SharedFunctionInfo* share;
3006 MaybeObject* maybe = Allocate(shared_function_info_map(), OLD_POINTER_SPACE); 3006 MaybeObject* maybe = Allocate(shared_function_info_map(), OLD_POINTER_SPACE);
3007 if (!maybe->To<SharedFunctionInfo>(&share)) return maybe; 3007 if (!maybe->To<SharedFunctionInfo>(&share)) return maybe;
3008 3008
3009 // Set pointer fields. 3009 // Set pointer fields.
3010 share->set_name(name); 3010 share->set_name(name);
3011 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal); 3011 Code* illegal = isolate_->builtins()->builtin(Builtins::kIllegal);
3012 share->set_code(illegal); 3012 share->set_code(illegal);
3013 share->ClearOptimizedCodeMap();
3013 share->set_scope_info(ScopeInfo::Empty()); 3014 share->set_scope_info(ScopeInfo::Empty());
3014 Code* construct_stub = 3015 Code* construct_stub =
3015 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); 3016 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric);
3016 share->set_construct_stub(construct_stub); 3017 share->set_construct_stub(construct_stub);
3017 share->set_instance_class_name(Object_symbol()); 3018 share->set_instance_class_name(Object_symbol());
3018 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER); 3019 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER);
3019 share->set_script(undefined_value(), SKIP_WRITE_BARRIER); 3020 share->set_script(undefined_value(), SKIP_WRITE_BARRIER);
3020 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER); 3021 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER);
3021 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER); 3022 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER);
3022 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER); 3023 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER);
(...skipping 4129 matching lines...) Expand 10 before | Expand all | Expand 10 after
7152 } else { 7153 } else {
7153 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. 7154 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died.
7154 } 7155 }
7155 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = 7156 remembered_unmapped_pages_[remembered_unmapped_pages_index_] =
7156 reinterpret_cast<Address>(p); 7157 reinterpret_cast<Address>(p);
7157 remembered_unmapped_pages_index_++; 7158 remembered_unmapped_pages_index_++;
7158 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; 7159 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages;
7159 } 7160 }
7160 7161
7161 } } // namespace v8::internal 7162 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/frames.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698