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

Side by Side Diff: src/bootstrapper.cc

Issue 149332: Fix an X64 problem with builtin fixups. Remove an assert from fixups that is... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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/x64/macro-assembler-x64.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 extensions_cache.Initialize(create_heap_objects); 127 extensions_cache.Initialize(create_heap_objects);
128 } 128 }
129 129
130 130
131 void Bootstrapper::TearDown() { 131 void Bootstrapper::TearDown() {
132 natives_cache.Initialize(false); // Yes, symmetrical 132 natives_cache.Initialize(false); // Yes, symmetrical
133 extensions_cache.Initialize(false); 133 extensions_cache.Initialize(false);
134 } 134 }
135 135
136 136
137 // Pending fixups are code positions that have refer to builtin code 137 // Pending fixups are code positions that refer to builtin code
138 // objects that were not available at the time the code was generated. 138 // objects that were not available at the time the code was generated.
139 // The pending list is processed whenever an environment has been 139 // The pending list is processed whenever an environment has been
140 // created. 140 // created.
141 class PendingFixups : public AllStatic { 141 class PendingFixups : public AllStatic {
142 public: 142 public:
143 static void Add(Code* code, MacroAssembler* masm); 143 static void Add(Code* code, MacroAssembler* masm);
144 static bool Process(Handle<JSBuiltinsObject> builtins); 144 static bool Process(Handle<JSBuiltinsObject> builtins);
145 145
146 static void Iterate(ObjectVisitor* v); 146 static void Iterate(ObjectVisitor* v);
147 147
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool use_code_object = Bootstrapper::FixupFlagsUseCodeObject::decode(flags); 209 bool use_code_object = Bootstrapper::FixupFlagsUseCodeObject::decode(flags);
210 210
211 if (use_code_object) { 211 if (use_code_object) {
212 if (is_pc_relative) { 212 if (is_pc_relative) {
213 Assembler::set_target_address_at( 213 Assembler::set_target_address_at(
214 pc, reinterpret_cast<Address>(f->code())); 214 pc, reinterpret_cast<Address>(f->code()));
215 } else { 215 } else {
216 *reinterpret_cast<Object**>(pc) = f->code(); 216 *reinterpret_cast<Object**>(pc) = f->code();
217 } 217 }
218 } else { 218 } else {
219 ASSERT(is_pc_relative);
220 Assembler::set_target_address_at(pc, f->code()->instruction_start()); 219 Assembler::set_target_address_at(pc, f->code()->instruction_start());
221 } 220 }
222 221
223 LOG(StringEvent("resolved", name)); 222 LOG(StringEvent("resolved", name));
224 } 223 }
225 Clear(); 224 Clear();
226 225
227 // TODO(1240818): We should probably try to avoid doing this for all 226 // TODO(1240818): We should probably try to avoid doing this for all
228 // the V8 builtin JS files. It should only happen after running 227 // the V8 builtin JS files. It should only happen after running
229 // runtime.js - just like there shouldn't be any fixups left after 228 // runtime.js - just like there shouldn't be any fixups left after
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 } 1616 }
1618 1617
1619 1618
1620 // Restore statics that are thread local. 1619 // Restore statics that are thread local.
1621 char* Genesis::RestoreState(char* from) { 1620 char* Genesis::RestoreState(char* from) {
1622 current_ = *reinterpret_cast<Genesis**>(from); 1621 current_ = *reinterpret_cast<Genesis**>(from);
1623 return from + sizeof(current_); 1622 return from + sizeof(current_);
1624 } 1623 }
1625 1624
1626 } } // namespace v8::internal 1625 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698