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

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

Issue 2744613006: [object] Add Script::IsUserJavaScript(). (Closed)
Patch Set: Rebase. Created 3 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') | src/wasm/wasm-objects.cc » ('j') | 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 6307 matching lines...) Expand 10 before | Expand all | Expand 10 after
6318 6318
6319 void SharedFunctionInfo::set_disable_optimization_reason(BailoutReason reason) { 6319 void SharedFunctionInfo::set_disable_optimization_reason(BailoutReason reason) {
6320 set_opt_count_and_bailout_reason(DisabledOptimizationReasonBits::update( 6320 set_opt_count_and_bailout_reason(DisabledOptimizationReasonBits::update(
6321 opt_count_and_bailout_reason(), reason)); 6321 opt_count_and_bailout_reason(), reason));
6322 } 6322 }
6323 6323
6324 bool SharedFunctionInfo::IsUserJavaScript() { 6324 bool SharedFunctionInfo::IsUserJavaScript() {
6325 Object* script_obj = script(); 6325 Object* script_obj = script();
6326 if (script_obj->IsUndefined(GetIsolate())) return false; 6326 if (script_obj->IsUndefined(GetIsolate())) return false;
6327 Script* script = Script::cast(script_obj); 6327 Script* script = Script::cast(script_obj);
6328 return static_cast<Script::Type>(script->type()) == Script::TYPE_NORMAL; 6328 return script->IsUserJavaScript();
6329 } 6329 }
6330 6330
6331 bool SharedFunctionInfo::IsSubjectToDebugging() { 6331 bool SharedFunctionInfo::IsSubjectToDebugging() {
6332 return IsUserJavaScript() && !HasAsmWasmData(); 6332 return IsUserJavaScript() && !HasAsmWasmData();
6333 } 6333 }
6334 6334
6335 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { 6335 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const {
6336 return optimized_code_map() == GetHeap()->empty_fixed_array(); 6336 return optimized_code_map() == GetHeap()->empty_fixed_array();
6337 } 6337 }
6338 6338
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after
8269 #undef WRITE_INT64_FIELD 8269 #undef WRITE_INT64_FIELD
8270 #undef READ_BYTE_FIELD 8270 #undef READ_BYTE_FIELD
8271 #undef WRITE_BYTE_FIELD 8271 #undef WRITE_BYTE_FIELD
8272 #undef NOBARRIER_READ_BYTE_FIELD 8272 #undef NOBARRIER_READ_BYTE_FIELD
8273 #undef NOBARRIER_WRITE_BYTE_FIELD 8273 #undef NOBARRIER_WRITE_BYTE_FIELD
8274 8274
8275 } // namespace internal 8275 } // namespace internal
8276 } // namespace v8 8276 } // namespace v8
8277 8277
8278 #endif // V8_OBJECTS_INL_H_ 8278 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/wasm/wasm-objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698