-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Rename `CalleeInterval` to `CallClassIntervalContext`, within which we have the fields `callee_interval` and `preserves_type_context`, the latter actually applies to how the caller calls the callee. Reviewed By: anwesht Differential Revision: D48141877 fbshipit-source-id: b8566e8d362680db3c9d0c88b882b51ab04bdc4a
- Loading branch information
1 parent
b554e07
commit cc5057b
Showing
34 changed files
with
350 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
#include <ostream> | ||
|
||
#include <mariana-trench/CallClassIntervalContext.h> | ||
#include <mariana-trench/Frame.h> | ||
#include <mariana-trench/TaintConfig.h> | ||
|
||
namespace marianatrench { | ||
|
||
CallClassIntervalContext::CallClassIntervalContext( | ||
ClassIntervals::Interval interval, | ||
bool preserves_type_context) | ||
: callee_interval_(std::move(interval)), | ||
preserves_type_context_(preserves_type_context) {} | ||
|
||
CallClassIntervalContext::CallClassIntervalContext(const TaintConfig& config) | ||
: CallClassIntervalContext(config.class_interval_context()) {} | ||
|
||
CallClassIntervalContext::CallClassIntervalContext(const Frame& frame) | ||
: CallClassIntervalContext(frame.class_interval_context()) {} | ||
|
||
Json::Value CallClassIntervalContext::to_json() const { | ||
auto value = Json::Value(Json::objectValue); | ||
value["callee_interval"] = ClassIntervals::interval_to_json(callee_interval_); | ||
value["preserves_type_context"] = Json::Value(preserves_type_context_); | ||
return value; | ||
} | ||
|
||
std::ostream& operator<<( | ||
std::ostream& out, | ||
const CallClassIntervalContext& class_interval_context) { | ||
return out << "{" << class_interval_context.callee_interval() | ||
<< ", preserves_type_context=" | ||
<< class_interval_context.preserves_type_context() << "}"; | ||
} | ||
|
||
} // namespace marianatrench |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.