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

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

Issue 2505493002: [inspector] make console.assert much faster (Closed)
Patch Set: Created 4 years, 1 month 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
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 6489 matching lines...) Expand 10 before | Expand all | Expand 10 after
6500 6500
6501 bool SharedFunctionInfo::IsBuiltin() { 6501 bool SharedFunctionInfo::IsBuiltin() {
6502 Object* script_obj = script(); 6502 Object* script_obj = script();
6503 if (script_obj->IsUndefined(GetIsolate())) return true; 6503 if (script_obj->IsUndefined(GetIsolate())) return true;
6504 Script* script = Script::cast(script_obj); 6504 Script* script = Script::cast(script_obj);
6505 Script::Type type = static_cast<Script::Type>(script->type()); 6505 Script::Type type = static_cast<Script::Type>(script->type());
6506 return type != Script::TYPE_NORMAL; 6506 return type != Script::TYPE_NORMAL;
6507 } 6507 }
6508 6508
6509 bool SharedFunctionInfo::IsSubjectToDebugging() { 6509 bool SharedFunctionInfo::IsSubjectToDebugging() {
6510 return !IsBuiltin() && !HasAsmWasmData(); 6510 bool result = !IsBuiltin() && !HasAsmWasmData();
6511 if (!result) return false;
6512 Object* script_obj = script();
6513 if (script_obj->IsUndefined(GetIsolate())) return true;
6514 Script* script = Script::cast(script_obj);
6515 return !script->origin_options().IsEmbedderDebugScript();
6511 } 6516 }
6512 6517
6513 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const { 6518 bool SharedFunctionInfo::OptimizedCodeMapIsCleared() const {
6514 return optimized_code_map() == GetHeap()->empty_fixed_array(); 6519 return optimized_code_map() == GetHeap()->empty_fixed_array();
6515 } 6520 }
6516 6521
6517 6522
6518 bool JSFunction::IsOptimized() { 6523 bool JSFunction::IsOptimized() {
6519 return code()->kind() == Code::OPTIMIZED_FUNCTION; 6524 return code()->kind() == Code::OPTIMIZED_FUNCTION;
6520 } 6525 }
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
8440 #undef WRITE_INT64_FIELD 8445 #undef WRITE_INT64_FIELD
8441 #undef READ_BYTE_FIELD 8446 #undef READ_BYTE_FIELD
8442 #undef WRITE_BYTE_FIELD 8447 #undef WRITE_BYTE_FIELD
8443 #undef NOBARRIER_READ_BYTE_FIELD 8448 #undef NOBARRIER_READ_BYTE_FIELD
8444 #undef NOBARRIER_WRITE_BYTE_FIELD 8449 #undef NOBARRIER_WRITE_BYTE_FIELD
8445 8450
8446 } // namespace internal 8451 } // namespace internal
8447 } // namespace v8 8452 } // namespace v8
8448 8453
8449 #endif // V8_OBJECTS_INL_H_ 8454 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698