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

Side by Side Diff: src/code-stubs.cc

Issue 10918067: Refactoring of snapshots. This simplifies and improves (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 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 | « no previous file | src/heap.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 factory->DictionaryAtNumberPut( 135 factory->DictionaryAtNumberPut(
136 Handle<UnseededNumberDictionary>(heap->code_stubs()), 136 Handle<UnseededNumberDictionary>(heap->code_stubs()),
137 GetKey(), 137 GetKey(),
138 new_object); 138 new_object);
139 heap->public_set_code_stubs(*dict); 139 heap->public_set_code_stubs(*dict);
140 } 140 }
141 code = *new_object; 141 code = *new_object;
142 } 142 }
143 143
144 Activate(code); 144 Activate(code);
145 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code)); 145 ASSERT(!NeedsImmovableCode() ||
146 heap->lo_space()->Contains(code) ||
147 heap->code_space()->FirstPage()->Contains(code->address()));
146 return Handle<Code>(code, isolate); 148 return Handle<Code>(code, isolate);
147 } 149 }
148 150
149 151
150 const char* CodeStub::MajorName(CodeStub::Major major_key, 152 const char* CodeStub::MajorName(CodeStub::Major major_key,
151 bool allow_unknown_keys) { 153 bool allow_unknown_keys) {
152 switch (major_key) { 154 switch (major_key) {
153 #define DEF_CASE(name) case name: return #name "Stub"; 155 #define DEF_CASE(name) case name: return #name "Stub";
154 CODE_STUB_LIST(DEF_CASE) 156 CODE_STUB_LIST(DEF_CASE)
155 #undef DEF_CASE 157 #undef DEF_CASE
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // already active, as the hooks won't stack. 496 // already active, as the hooks won't stack.
495 if (entry_hook != 0 && entry_hook_ != 0) 497 if (entry_hook != 0 && entry_hook_ != 0)
496 return false; 498 return false;
497 499
498 entry_hook_ = entry_hook; 500 entry_hook_ = entry_hook;
499 return true; 501 return true;
500 } 502 }
501 503
502 504
503 } } // namespace v8::internal 505 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698