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

Unified Diff: src/typing-asm.h

Issue 1508003002: Retain information on which standard objects are used in asm typer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/typing-asm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing-asm.h
diff --git a/src/typing-asm.h b/src/typing-asm.h
index db624b32d645c33d71e6ce690c3f5761cfb4ded6..b7f53831e6222d96d6552351d55fa7bd7e235db7 100644
--- a/src/typing-asm.h
+++ b/src/typing-asm.h
@@ -25,6 +25,41 @@ class AsmTyper : public AstVisitor {
void set_allow_simd(bool simd);
const char* error_message() { return error_message_; }
+ enum StandardMember {
+ kNone = 0,
+ kStdlib,
+ kInfinity,
+ kNaN,
+ kMathAcos,
+ kMathAsin,
+ kMathAtan,
+ kMathCos,
+ kMathSin,
+ kMathTan,
+ kMathExp,
+ kMathLog,
+ kMathCeil,
+ kMathFloor,
+ kMathSqrt,
+ kMathAbs,
+ kMathMin,
+ kMathMax,
+ kMathAtan2,
+ kMathPow,
+ kMathImul,
+ kMathFround,
+ kMathE,
+ kMathLN10,
+ kMathLN2,
+ kMathLOG2E,
+ kMathLOG10E,
+ kMathPI,
+ kMathSQRT1_2,
+ kMathSQRT2,
+ };
+
+ StandardMember VariableAsStandardMember(Variable* variable);
+
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
private:
@@ -37,17 +72,20 @@ class AsmTyper : public AstVisitor {
struct VariableInfo : public ZoneObject {
Type* type;
- bool is_stdlib_object;
bool is_check_function;
bool is_constructor_function;
+ StandardMember standard_member;
VariableInfo()
: type(NULL),
- is_stdlib_object(false),
is_check_function(false),
- is_constructor_function(false) {}
+ is_constructor_function(false),
+ standard_member(kNone) {}
explicit VariableInfo(Type* t)
- : type(t), is_check_function(false), is_constructor_function(false) {}
+ : type(t),
+ is_check_function(false),
+ is_constructor_function(false),
+ standard_member(kNone) {}
};
// Information for bi-directional typing with a cap on nesting depth.
« no previous file with comments | « no previous file | src/typing-asm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698