Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 5359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5370 // Iterate over all fields in the body but take care in dealing with | 5370 // Iterate over all fields in the body but take care in dealing with |
| 5371 // the code entry. | 5371 // the code entry. |
| 5372 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); | 5372 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); |
| 5373 v->VisitCodeEntry(this->address() + kCodeEntryOffset); | 5373 v->VisitCodeEntry(this->address() + kCodeEntryOffset); |
| 5374 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); | 5374 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); |
| 5375 } | 5375 } |
| 5376 | 5376 |
| 5377 | 5377 |
| 5378 void JSFunction::MarkForLazyRecompilation() { | 5378 void JSFunction::MarkForLazyRecompilation() { |
| 5379 ASSERT(is_compiled() && !IsOptimized()); | 5379 ASSERT(is_compiled() && !IsOptimized()); |
| 5380 ASSERT(shared()->allows_lazy_compilation()); | 5380 ASSERT(shared()->allows_lazy_compilation() |
| 5381 || code() == shared()->code()); | |
|
Kevin Millikin (Chromium)
2010/12/20 12:05:44
For some reason we like to put || on the first lin
antonm
2010/12/20 20:39:24
Done.
| |
| 5381 ReplaceCode(Builtins::builtin(Builtins::LazyRecompile)); | 5382 ReplaceCode(Builtins::builtin(Builtins::LazyRecompile)); |
| 5382 } | 5383 } |
| 5383 | 5384 |
| 5384 | 5385 |
| 5385 uint32_t JSFunction::SourceHash() { | 5386 uint32_t JSFunction::SourceHash() { |
| 5386 uint32_t hash = 0; | 5387 uint32_t hash = 0; |
| 5387 Object* script = shared()->script(); | 5388 Object* script = shared()->script(); |
| 5388 if (!script->IsUndefined()) { | 5389 if (!script->IsUndefined()) { |
| 5389 Object* source = Script::cast(script)->source(); | 5390 Object* source = Script::cast(script)->source(); |
| 5390 if (source->IsUndefined()) hash = String::cast(source)->Hash(); | 5391 if (source->IsUndefined()) hash = String::cast(source)->Hash(); |
| (...skipping 4354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 9745 if (break_point_objects()->IsUndefined()) return 0; | 9746 if (break_point_objects()->IsUndefined()) return 0; |
| 9746 // Single beak point. | 9747 // Single beak point. |
| 9747 if (!break_point_objects()->IsFixedArray()) return 1; | 9748 if (!break_point_objects()->IsFixedArray()) return 1; |
| 9748 // Multiple break points. | 9749 // Multiple break points. |
| 9749 return FixedArray::cast(break_point_objects())->length(); | 9750 return FixedArray::cast(break_point_objects())->length(); |
| 9750 } | 9751 } |
| 9751 #endif | 9752 #endif |
| 9752 | 9753 |
| 9753 | 9754 |
| 9754 } } // namespace v8::internal | 9755 } } // namespace v8::internal |
| OLD | NEW |