| 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 5381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5392 // Iterate over all fields in the body but take care in dealing with | 5392 // Iterate over all fields in the body but take care in dealing with |
| 5393 // the code entry. | 5393 // the code entry. |
| 5394 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); | 5394 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); |
| 5395 v->VisitCodeEntry(this->address() + kCodeEntryOffset); | 5395 v->VisitCodeEntry(this->address() + kCodeEntryOffset); |
| 5396 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); | 5396 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); |
| 5397 } | 5397 } |
| 5398 | 5398 |
| 5399 | 5399 |
| 5400 void JSFunction::MarkForLazyRecompilation() { | 5400 void JSFunction::MarkForLazyRecompilation() { |
| 5401 ASSERT(is_compiled() && !IsOptimized()); | 5401 ASSERT(is_compiled() && !IsOptimized()); |
| 5402 ASSERT(shared()->allows_lazy_compilation()); | 5402 ASSERT(shared()->allows_lazy_compilation() || |
| 5403 code()->optimizable()); |
| 5403 ReplaceCode(Builtins::builtin(Builtins::LazyRecompile)); | 5404 ReplaceCode(Builtins::builtin(Builtins::LazyRecompile)); |
| 5404 } | 5405 } |
| 5405 | 5406 |
| 5406 | 5407 |
| 5407 uint32_t JSFunction::SourceHash() { | 5408 uint32_t JSFunction::SourceHash() { |
| 5408 uint32_t hash = 0; | 5409 uint32_t hash = 0; |
| 5409 Object* script = shared()->script(); | 5410 Object* script = shared()->script(); |
| 5410 if (!script->IsUndefined()) { | 5411 if (!script->IsUndefined()) { |
| 5411 Object* source = Script::cast(script)->source(); | 5412 Object* source = Script::cast(script)->source(); |
| 5412 if (source->IsUndefined()) hash = String::cast(source)->Hash(); | 5413 if (source->IsUndefined()) hash = String::cast(source)->Hash(); |
| (...skipping 4453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9866 if (break_point_objects()->IsUndefined()) return 0; | 9867 if (break_point_objects()->IsUndefined()) return 0; |
| 9867 // Single beak point. | 9868 // Single beak point. |
| 9868 if (!break_point_objects()->IsFixedArray()) return 1; | 9869 if (!break_point_objects()->IsFixedArray()) return 1; |
| 9869 // Multiple break points. | 9870 // Multiple break points. |
| 9870 return FixedArray::cast(break_point_objects())->length(); | 9871 return FixedArray::cast(break_point_objects())->length(); |
| 9871 } | 9872 } |
| 9872 #endif | 9873 #endif |
| 9873 | 9874 |
| 9874 | 9875 |
| 9875 } } // namespace v8::internal | 9876 } } // namespace v8::internal |
| OLD | NEW |