| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 9122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9133 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { | 9133 void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { |
| 9134 // Iterate over all fields in the body but take care in dealing with | 9134 // Iterate over all fields in the body but take care in dealing with |
| 9135 // the code entry. | 9135 // the code entry. |
| 9136 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); | 9136 IteratePointers(v, kPropertiesOffset, kCodeEntryOffset); |
| 9137 v->VisitCodeEntry(this->address() + kCodeEntryOffset); | 9137 v->VisitCodeEntry(this->address() + kCodeEntryOffset); |
| 9138 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); | 9138 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); |
| 9139 } | 9139 } |
| 9140 | 9140 |
| 9141 | 9141 |
| 9142 void JSFunction::MarkForOptimization() { | 9142 void JSFunction::MarkForOptimization() { |
| 9143 DCHECK(is_compiled() || GetIsolate()->DebuggerHasBreakPoints()); | |
| 9144 DCHECK(!IsOptimized()); | 9143 DCHECK(!IsOptimized()); |
| 9145 DCHECK(shared()->allows_lazy_compilation() || | 9144 DCHECK(shared()->allows_lazy_compilation() || |
| 9146 code()->optimizable()); | 9145 code()->optimizable()); |
| 9147 DCHECK(!shared()->is_generator()); | 9146 DCHECK(!shared()->is_generator()); |
| 9148 set_code_no_write_barrier( | 9147 set_code_no_write_barrier( |
| 9149 GetIsolate()->builtins()->builtin(Builtins::kCompileOptimized)); | 9148 GetIsolate()->builtins()->builtin(Builtins::kCompileOptimized)); |
| 9150 // No write barrier required, since the builtin is part of the root set. | 9149 // No write barrier required, since the builtin is part of the root set. |
| 9151 } | 9150 } |
| 9152 | 9151 |
| 9153 | 9152 |
| (...skipping 7264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16418 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16417 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16419 static const char* error_messages_[] = { | 16418 static const char* error_messages_[] = { |
| 16420 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16419 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16421 }; | 16420 }; |
| 16422 #undef ERROR_MESSAGES_TEXTS | 16421 #undef ERROR_MESSAGES_TEXTS |
| 16423 return error_messages_[reason]; | 16422 return error_messages_[reason]; |
| 16424 } | 16423 } |
| 16425 | 16424 |
| 16426 | 16425 |
| 16427 } } // namespace v8::internal | 16426 } } // namespace v8::internal |
| OLD | NEW |