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

Side by Side Diff: src/objects.h

Issue 1730853005: [interpreter] Make setting of function data more resilient. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-test-enable-strong
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 6706 matching lines...) Expand 10 before | Expand all | Expand 10 after
6717 DECL_ACCESSORS(instance_class_name, Object) 6717 DECL_ACCESSORS(instance_class_name, Object)
6718 6718
6719 // [function data]: This field holds some additional data for function. 6719 // [function data]: This field holds some additional data for function.
6720 // Currently it has one of: 6720 // Currently it has one of:
6721 // - a FunctionTemplateInfo to make benefit the API [IsApiFunction()]. 6721 // - a FunctionTemplateInfo to make benefit the API [IsApiFunction()].
6722 // - a Smi identifying a builtin function [HasBuiltinFunctionId()]. 6722 // - a Smi identifying a builtin function [HasBuiltinFunctionId()].
6723 // - a BytecodeArray for the interpreter [HasBytecodeArray()]. 6723 // - a BytecodeArray for the interpreter [HasBytecodeArray()].
6724 // In the long run we don't want all functions to have this field but 6724 // In the long run we don't want all functions to have this field but
6725 // we can fix that when we have a better model for storing hidden data 6725 // we can fix that when we have a better model for storing hidden data
6726 // on objects. 6726 // on objects.
6727 DECL_ACCESSORS(function_data, Object) 6727 DECL_ACCESSORS(function_data, Object)
rmcilroy 2016/02/25 14:18:06 Can we make this accessor private now?
Michael Starzinger 2016/02/25 14:43:43 Acknowledged. Unfortunately not, heap still needs
6728 6728
6729 inline bool IsApiFunction(); 6729 inline bool IsApiFunction();
6730 inline FunctionTemplateInfo* get_api_func_data(); 6730 inline FunctionTemplateInfo* get_api_func_data();
6731 inline void set_api_func_data(FunctionTemplateInfo* data);
6731 inline bool HasBuiltinFunctionId(); 6732 inline bool HasBuiltinFunctionId();
6732 inline BuiltinFunctionId builtin_function_id(); 6733 inline BuiltinFunctionId builtin_function_id();
6734 inline void set_builtin_function_id(BuiltinFunctionId id);
6733 inline bool HasBytecodeArray(); 6735 inline bool HasBytecodeArray();
6734 inline BytecodeArray* bytecode_array(); 6736 inline BytecodeArray* bytecode_array();
6737 inline void set_bytecode_array(Object* bytecode);
6735 6738
6736 // [script info]: Script from which the function originates. 6739 // [script info]: Script from which the function originates.
6737 DECL_ACCESSORS(script, Object) 6740 DECL_ACCESSORS(script, Object)
6738 6741
6739 // [num_literals]: Number of literals used by this function. 6742 // [num_literals]: Number of literals used by this function.
6740 inline int num_literals() const; 6743 inline int num_literals() const;
6741 inline void set_num_literals(int value); 6744 inline void set_num_literals(int value);
6742 6745
6743 // [start_position_and_type]: Field used to store both the source code 6746 // [start_position_and_type]: Field used to store both the source code
6744 // position, whether or not the function is a function expression, 6747 // position, whether or not the function is a function expression,
(...skipping 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after
10833 } 10836 }
10834 return value; 10837 return value;
10835 } 10838 }
10836 }; 10839 };
10837 10840
10838 10841
10839 } // NOLINT, false-positive due to second-order macros. 10842 } // NOLINT, false-positive due to second-order macros.
10840 } // NOLINT, false-positive due to second-order macros. 10843 } // NOLINT, false-positive due to second-order macros.
10841 10844
10842 #endif // V8_OBJECTS_H_ 10845 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/objects-inl.h » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698