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

Side by Side Diff: src/objects-inl.h

Issue 1019293003: Fix broken JSFunction::is_compiled predicate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove stray assert. Created 5 years, 9 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
« no previous file with comments | « src/objects.cc ('k') | no next file » | 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 // 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 5825 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value)); 5836 WRITE_FIELD(this, kScopeInfoOffset, reinterpret_cast<Object*>(value));
5837 CONDITIONAL_WRITE_BARRIER(GetHeap(), 5837 CONDITIONAL_WRITE_BARRIER(GetHeap(),
5838 this, 5838 this,
5839 kScopeInfoOffset, 5839 kScopeInfoOffset,
5840 reinterpret_cast<Object*>(value), 5840 reinterpret_cast<Object*>(value),
5841 mode); 5841 mode);
5842 } 5842 }
5843 5843
5844 5844
5845 bool SharedFunctionInfo::is_compiled() { 5845 bool SharedFunctionInfo::is_compiled() {
5846 return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy); 5846 Builtins* builtins = GetIsolate()->builtins();
5847 DCHECK(code() != builtins->builtin(Builtins::kCompileOptimizedConcurrent));
5848 DCHECK(code() != builtins->builtin(Builtins::kCompileOptimized));
5849 return code() != builtins->builtin(Builtins::kCompileLazy);
5847 } 5850 }
5848 5851
5849 5852
5850 bool SharedFunctionInfo::is_simple_parameter_list() { 5853 bool SharedFunctionInfo::is_simple_parameter_list() {
5851 return scope_info()->IsSimpleParameterList(); 5854 return scope_info()->IsSimpleParameterList();
5852 } 5855 }
5853 5856
5854 5857
5855 bool SharedFunctionInfo::IsApiFunction() { 5858 bool SharedFunctionInfo::IsApiFunction() {
5856 return function_data()->IsFunctionTemplateInfo(); 5859 return function_data()->IsFunctionTemplateInfo();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
6119 return instance_prototype(); 6122 return instance_prototype();
6120 } 6123 }
6121 6124
6122 6125
6123 bool JSFunction::should_have_prototype() { 6126 bool JSFunction::should_have_prototype() {
6124 return map()->function_with_prototype(); 6127 return map()->function_with_prototype();
6125 } 6128 }
6126 6129
6127 6130
6128 bool JSFunction::is_compiled() { 6131 bool JSFunction::is_compiled() {
6129 return code() != GetIsolate()->builtins()->builtin(Builtins::kCompileLazy); 6132 Builtins* builtins = GetIsolate()->builtins();
6133 return code() != builtins->builtin(Builtins::kCompileLazy) &&
6134 code() != builtins->builtin(Builtins::kCompileOptimized) &&
6135 code() != builtins->builtin(Builtins::kCompileOptimizedConcurrent);
6130 } 6136 }
6131 6137
6132 6138
6133 bool JSFunction::is_simple_parameter_list() { 6139 bool JSFunction::is_simple_parameter_list() {
6134 return shared()->is_simple_parameter_list(); 6140 return shared()->is_simple_parameter_list();
6135 } 6141 }
6136 6142
6137 6143
6138 FixedArray* JSFunction::literals() { 6144 FixedArray* JSFunction::literals() {
6139 DCHECK(!shared()->bound()); 6145 DCHECK(!shared()->bound());
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
7510 #undef READ_SHORT_FIELD 7516 #undef READ_SHORT_FIELD
7511 #undef WRITE_SHORT_FIELD 7517 #undef WRITE_SHORT_FIELD
7512 #undef READ_BYTE_FIELD 7518 #undef READ_BYTE_FIELD
7513 #undef WRITE_BYTE_FIELD 7519 #undef WRITE_BYTE_FIELD
7514 #undef NOBARRIER_READ_BYTE_FIELD 7520 #undef NOBARRIER_READ_BYTE_FIELD
7515 #undef NOBARRIER_WRITE_BYTE_FIELD 7521 #undef NOBARRIER_WRITE_BYTE_FIELD
7516 7522
7517 } } // namespace v8::internal 7523 } } // namespace v8::internal
7518 7524
7519 #endif // V8_OBJECTS_INL_H_ 7525 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698