| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4939 CONDITIONAL_WRITE_BARRIER(GetHeap(), | 4939 CONDITIONAL_WRITE_BARRIER(GetHeap(), |
| 4940 this, | 4940 this, |
| 4941 kScopeInfoOffset, | 4941 kScopeInfoOffset, |
| 4942 reinterpret_cast<Object*>(value), | 4942 reinterpret_cast<Object*>(value), |
| 4943 mode); | 4943 mode); |
| 4944 } | 4944 } |
| 4945 | 4945 |
| 4946 | 4946 |
| 4947 bool SharedFunctionInfo::is_compiled() { | 4947 bool SharedFunctionInfo::is_compiled() { |
| 4948 return code() != | 4948 return code() != |
| 4949 GetIsolate()->builtins()->builtin(Builtins::kLazyCompile); | 4949 GetIsolate()->builtins()->builtin(Builtins::kCompileUnoptimized); |
| 4950 } | 4950 } |
| 4951 | 4951 |
| 4952 | 4952 |
| 4953 bool SharedFunctionInfo::IsApiFunction() { | 4953 bool SharedFunctionInfo::IsApiFunction() { |
| 4954 return function_data()->IsFunctionTemplateInfo(); | 4954 return function_data()->IsFunctionTemplateInfo(); |
| 4955 } | 4955 } |
| 4956 | 4956 |
| 4957 | 4957 |
| 4958 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { | 4958 FunctionTemplateInfo* SharedFunctionInfo::get_api_func_data() { |
| 4959 ASSERT(IsApiFunction()); | 4959 ASSERT(IsApiFunction()); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5062 bool JSFunction::IsOptimized() { | 5062 bool JSFunction::IsOptimized() { |
| 5063 return code()->kind() == Code::OPTIMIZED_FUNCTION; | 5063 return code()->kind() == Code::OPTIMIZED_FUNCTION; |
| 5064 } | 5064 } |
| 5065 | 5065 |
| 5066 | 5066 |
| 5067 bool JSFunction::IsOptimizable() { | 5067 bool JSFunction::IsOptimizable() { |
| 5068 return code()->kind() == Code::FUNCTION && code()->optimizable(); | 5068 return code()->kind() == Code::FUNCTION && code()->optimizable(); |
| 5069 } | 5069 } |
| 5070 | 5070 |
| 5071 | 5071 |
| 5072 bool JSFunction::IsMarkedForLazyRecompilation() { | 5072 bool JSFunction::IsMarkedForOptimization() { |
| 5073 return code() == GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile); | 5073 return code() == GetIsolate()->builtins()->builtin( |
| 5074 Builtins::kCompileOptimized); |
| 5074 } | 5075 } |
| 5075 | 5076 |
| 5076 | 5077 |
| 5077 bool JSFunction::IsMarkedForConcurrentRecompilation() { | 5078 bool JSFunction::IsMarkedForConcurrentOptimization() { |
| 5078 return code() == GetIsolate()->builtins()->builtin( | 5079 return code() == GetIsolate()->builtins()->builtin( |
| 5079 Builtins::kConcurrentRecompile); | 5080 Builtins::kCompileOptimizedConcurrent); |
| 5080 } | 5081 } |
| 5081 | 5082 |
| 5082 | 5083 |
| 5083 bool JSFunction::IsInRecompileQueue() { | 5084 bool JSFunction::IsInOptimizationQueue() { |
| 5084 return code() == GetIsolate()->builtins()->builtin( | 5085 return code() == GetIsolate()->builtins()->builtin( |
| 5085 Builtins::kInRecompileQueue); | 5086 Builtins::kInOptimizationQueue); |
| 5086 } | 5087 } |
| 5087 | 5088 |
| 5088 | 5089 |
| 5089 Code* JSFunction::code() { | 5090 Code* JSFunction::code() { |
| 5090 return Code::cast( | 5091 return Code::cast( |
| 5091 Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset))); | 5092 Code::GetObjectFromEntryAddress(FIELD_ADDR(this, kCodeEntryOffset))); |
| 5092 } | 5093 } |
| 5093 | 5094 |
| 5094 | 5095 |
| 5095 void JSFunction::set_code(Code* value) { | 5096 void JSFunction::set_code(Code* value) { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5185 return instance_prototype(); | 5186 return instance_prototype(); |
| 5186 } | 5187 } |
| 5187 | 5188 |
| 5188 | 5189 |
| 5189 bool JSFunction::should_have_prototype() { | 5190 bool JSFunction::should_have_prototype() { |
| 5190 return map()->function_with_prototype(); | 5191 return map()->function_with_prototype(); |
| 5191 } | 5192 } |
| 5192 | 5193 |
| 5193 | 5194 |
| 5194 bool JSFunction::is_compiled() { | 5195 bool JSFunction::is_compiled() { |
| 5195 return code() != GetIsolate()->builtins()->builtin(Builtins::kLazyCompile); | 5196 return code() != |
| 5197 GetIsolate()->builtins()->builtin(Builtins::kCompileUnoptimized); |
| 5196 } | 5198 } |
| 5197 | 5199 |
| 5198 | 5200 |
| 5199 FixedArray* JSFunction::literals() { | 5201 FixedArray* JSFunction::literals() { |
| 5200 ASSERT(!shared()->bound()); | 5202 ASSERT(!shared()->bound()); |
| 5201 return literals_or_bindings(); | 5203 return literals_or_bindings(); |
| 5202 } | 5204 } |
| 5203 | 5205 |
| 5204 | 5206 |
| 5205 void JSFunction::set_literals(FixedArray* literals) { | 5207 void JSFunction::set_literals(FixedArray* literals) { |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6463 #undef WRITE_UINT32_FIELD | 6465 #undef WRITE_UINT32_FIELD |
| 6464 #undef READ_SHORT_FIELD | 6466 #undef READ_SHORT_FIELD |
| 6465 #undef WRITE_SHORT_FIELD | 6467 #undef WRITE_SHORT_FIELD |
| 6466 #undef READ_BYTE_FIELD | 6468 #undef READ_BYTE_FIELD |
| 6467 #undef WRITE_BYTE_FIELD | 6469 #undef WRITE_BYTE_FIELD |
| 6468 | 6470 |
| 6469 | 6471 |
| 6470 } } // namespace v8::internal | 6472 } } // namespace v8::internal |
| 6471 | 6473 |
| 6472 #endif // V8_OBJECTS_INL_H_ | 6474 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |